@opensumi/cli-engine 3.7.1-next-1737534874.0 → 3.7.1-next-1737628833.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6603,7 +6603,7 @@ h5,
6603
6603
  h6 {
6604
6604
  margin-top: 0;
6605
6605
  margin-bottom: 0.5em;
6606
- color: rgba(0, 0, 0, 0.85);
6606
+ color: inherit;
6607
6607
  font-weight: 500;
6608
6608
  }
6609
6609
  p {
@@ -15726,6 +15726,10 @@ html li {
15726
15726
  border-radius: 4px;
15727
15727
  margin: 0 5px;
15728
15728
  }
15729
+ .design_left_slot [role='treeitem'] [class*='mod_actived__'],
15730
+ .design_right_slot [role='treeitem'] [class*='mod_actived__'] {
15731
+ outline: 1px solid var(--kt-tree-inactiveSelectionBackground);
15732
+ }
15729
15733
  .design_left_slot .LjM98If_5ZDOb5o_NkGE,
15730
15734
  .design_right_slot .LjM98If_5ZDOb5o_NkGE {
15731
15735
  padding-bottom: 8px;
@@ -15969,7 +15973,7 @@ html li {
15969
15973
  .cwtenkeh7ivkrZt2MiAq .rJCGdWT8dB8kb2yUnrDh span {
15970
15974
  font-size: 16px;
15971
15975
  }
15972
- `,"",{version:3,sources:["webpack://./../../packages/design/lib/browser/style/design.module.less"],names:[],mappings:"AAAA;EACE,yDAA4D;EAC5D,4BAA4B;EAC5B,sBAAsB;AACxB;AACA;EACE,yDAA6D;EAC7D,4BAA4B;EAC5B,sBAAsB;AACxB;AACA;EACE,oBAAoB;AACtB;AACA;;EAEE,gDAAgD;AAClD;AACA;EACE,qCAAqC;EACrC,yBAAyB;EACzB,8KAA8K;AAChL;AACA;EACE,kBAAkB;EAClB,4CAA4C;EAC5C,yBAAyB;EACzB,8KAA8K;AAChL;AACA;EACE,kBAAkB;EAClB,yBAAyB;EACzB,8KAA8K;AAChL;AACA;EACE,eAAe;AACjB;AACA;EACE,YAAY;EACZ,WAAW;EACX,gBAAgB;EAChB,4BAA4B;EAC5B,6BAA6B;EAC7B,gBAAgB;EAChB,gBAAgB;AAClB;AACA;;CAEC;AACD;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,UAAU;EACV,kBAAkB;EAClB,mBAAmB;EACnB,6BAA6B;AAC/B;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,oCAAoC;AACtC;AACA;EACE,qDAAqD;EACrD,yCAAyC;AAC3C;AACA;EACE,cAAc;AAChB;AACA;EACE,oCAAoC;AACtC;AACA;;EAEE,aAAa;AACf;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,yBAAyB;EACzB,yDAAyD;AAC3D;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,yDAAyD;EACzD,yBAAyB;AAC3B;AACA;EACE,aAAa;AACf;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,8BAA8B;AAChC;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,UAAU;EACV,QAAQ;EACR,MAAM;EACN,WAAW;EACX,YAAY;EACZ,yDAAyD;EACzD,yBAAyB;AAC3B;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,UAAU;EACV,MAAM;EACN,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,yCAAyC;AAC3C;AACA;;EAEE,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,eAAe;EACf,oCAAoC;EACpC,gBAAgB;EAChB,kBAAkB;AACpB;AACA;EACE,yCAAyC;EACzC,UAAU;AACZ;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,UAAU;EACV,eAAe;EACf,gBAAgB;AAClB;AACA;EACE,kBAAkB;EAClB,gDAAgD;EAChD,yCAAyC;AAC3C;AACA;EACE,oCAAoC;AACtC;AACA;EACE,yCAAyC;EACzC,gDAAgD;AAClD;AACA;EACE,eAAe;AACjB;AACA;EACE,aAAa;EACb,gCAAgC;EAChC,2BAA2B;AAC7B;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,cAAc;EACd,0BAA0B;AAC5B;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,qBAAqB;EACrB,UAAU;EACV,YAAY;EACZ,2CAA2C;AAC7C;AACA;EACE,4BAA4B;EAC5B,cAAc;EACd,YAAY;AACd;AACA;EACE,eAAe;EACf,qBAAqB;EACrB,wBAAwB;EACxB,oBAAoB;EACpB,oCAAoC;AACtC;AACA;EACE,6CAA6C;EAC7C,kCAAkC;AACpC;AACA;EACE,aAAa;AACf;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;EACpC,8BAA8B;AAChC;AACA;EACE,oCAAoC;AACtC;AACA;EACE,oCAAoC;AACtC;AACA;;CAEC;AACD;EACE,YAAY;EACZ,qBAAqB;AACvB;AACA;EACE,+CAA+C;AACjD;AACA;EACE,gBAAgB;AAClB;AACA;EACE,qBAAqB;EACrB,2BAA2B;EAC3B,gBAAgB;EAChB,iBAAiB;AACnB;AACA;EACE,oCAAoC;AACtC;AACA;;CAEC;AACD;EACE,yCAAyC;AAC3C;AACA;;CAEC;AACD;EACE,aAAa;AACf;AACA;EACE,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,WAAW;AACb;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,cAAc;AAChB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,eAAe;EACf,WAAW;EACX,YAAY;EACZ,oCAAoC;EACpC,kBAAkB;EAClB,sBAAsB;AACxB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,YAAY;EACZ,eAAe;AACjB;AACA;EACE,gDAAgD;EAChD,yCAAyC;AAC3C;AACA;EACE,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,sBAAsB;AACxB;AACA;EACE,YAAY;EACZ,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,YAAY;EACZ,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,qCAAqC;AACvC;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,SAAS;EACT,qBAAqB;EACrB,UAAU;EACV,YAAY;EACZ,2CAA2C;AAC7C;AACA;EACE,gBAAgB;EAChB,iBAAiB;AACnB;AACA;EACE,UAAU;EACV,oCAAoC;EACpC,aAAa;EACb,WAAW;EACX,YAAY;EACZ,mBAAmB;EACnB,uBAAuB;AACzB;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,UAAU;EACV,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,yCAAyC;EACzC,gDAAgD;AAClD;AACA;;;;EAIE,aAAa;AACf;AACA;EACE,YAAY;AACd;AACA;EACE,gDAAgD;AAClD;AACA;EACE,iBAAiB;AACnB;AACA;EACE,gBAAgB;AAClB;AACA;;EAEE,mBAAmB;EACnB,gBAAgB;AAClB;AACA;;EAEE,YAAY;AACd;AACA;;EAEE,eAAe;AACjB;AACA;;;;;;;;EAQE,kBAAkB;EAClB,aAAa;AACf;AACA;;EAEE,mBAAmB;AACrB;AACA;;EAEE,UAAU;AACZ;AACA;;EAEE,WAAW;AACb;AACA;;EAEE,aAAa;AACf;AACA;;EAEE,aAAa;AACf;AACA;;EAEE,aAAa;EACb,UAAU;EACV,mBAAmB;EACnB,6BAA6B;EAC7B,gBAAgB;AAClB;AACA;;EAEE,6BAA6B;AAC/B;AACA;;EAEE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,oCAAoC;EACpC,sBAAsB;EACtB,kBAAkB;AACpB;AACA;;EAEE,eAAe;AACjB;AACA;;EAEE,yCAAyC;EACzC,8BAA8B;EAC9B,kBAAkB;EAClB,UAAU;AACZ;AACA;;EAEE,aAAa;EACb,gCAAgC;EAChC,2BAA2B;AAC7B;AACA;;EAEE,qCAAqC;AACvC;AACA;;EAEE,qCAAqC;AACvC;AACA;;EAEE,+CAA+C;AACjD;AACA;;EAEE,wDAAwD;AAC1D;AACA;;EAEE,wDAAwD;AAC1D;AACA;;EAEE,uBAAuB;EACvB,sBAAsB;EACtB,kBAAkB;AACpB;AACA;;EAEE,yCAAyC;EACzC,8BAA8B;AAChC;AACA;;EAEE,eAAe;EACf,WAAW;EACX,YAAY;AACd;AACA;;EAEE,uBAAuB;AACzB;AACA;;EAEE,aAAa;AACf;AACA;;EAEE,kBAAkB;AACpB;AACA;;EAEE,kBAAkB;AACpB;AACA;EACE,wBAAwB;AAC1B;AACA;;;;EAIE,WAAW;EACX,aAAa;EACb,uBAAuB;AACzB;AACA;;;;EAIE,aAAa;AACf;AACA;;;;EAIE,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;AACb;AACA;;;;EAIE,WAAW;EACX,gBAAgB;EAChB,iBAAiB;AACnB;AACA;;;;EAIE,yCAAyC;EACzC,8BAA8B;AAChC;AACA;;;;EAIE,aAAa;AACf;AACA;;;;EAIE,wBAAwB;AAC1B;AACA;;EAEE,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,yCAAyC;EACzC,YAAY;AACd;AACA,YAAY;AACZ;EACE,UAAU;EACV,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;;CAEC;AACD;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,WAAW;EACX,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB;EACnB,gBAAgB;AAClB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,iBAAiB;AACnB;AACA;;EAEE,sBAAsB;EACtB,kBAAkB;EAClB,2CAA2C;EAC3C,eAAe;AACjB;AACA;;EAEE,kBAAkB;EAClB,aAAa;EACb,uBAAuB;EACvB,mBAAmB;AACrB;AACA;;EAEE,oCAAoC;AACtC;AACA;EACE,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,uCAAuC;AACzC;AACA;EACE,sDAAsD;EACtD,iDAAiD;AACnD;AACA;EACE,sCAAsC;AACxC;AACA;EACE,sCAAsC;AACxC;AACA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,qBAAqB;AACvB;AACA;EACE,eAAe;AACjB",sourcesContent:[`:global(.design-dark) .design-box-panel {
15976
+ `,"",{version:3,sources:["webpack://./../../packages/design/lib/browser/style/design.module.less"],names:[],mappings:"AAAA;EACE,yDAA4D;EAC5D,4BAA4B;EAC5B,sBAAsB;AACxB;AACA;EACE,yDAA6D;EAC7D,4BAA4B;EAC5B,sBAAsB;AACxB;AACA;EACE,oBAAoB;AACtB;AACA;;EAEE,gDAAgD;AAClD;AACA;EACE,qCAAqC;EACrC,yBAAyB;EACzB,8KAA8K;AAChL;AACA;EACE,kBAAkB;EAClB,4CAA4C;EAC5C,yBAAyB;EACzB,8KAA8K;AAChL;AACA;EACE,kBAAkB;EAClB,yBAAyB;EACzB,8KAA8K;AAChL;AACA;EACE,eAAe;AACjB;AACA;EACE,YAAY;EACZ,WAAW;EACX,gBAAgB;EAChB,4BAA4B;EAC5B,6BAA6B;EAC7B,gBAAgB;EAChB,gBAAgB;AAClB;AACA;;CAEC;AACD;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,UAAU;EACV,kBAAkB;EAClB,mBAAmB;EACnB,6BAA6B;AAC/B;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,oCAAoC;AACtC;AACA;EACE,qDAAqD;EACrD,yCAAyC;AAC3C;AACA;EACE,cAAc;AAChB;AACA;EACE,oCAAoC;AACtC;AACA;;EAEE,aAAa;AACf;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,yBAAyB;EACzB,yDAAyD;AAC3D;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,yDAAyD;EACzD,yBAAyB;AAC3B;AACA;EACE,aAAa;AACf;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,8BAA8B;AAChC;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,UAAU;EACV,QAAQ;EACR,MAAM;EACN,WAAW;EACX,YAAY;EACZ,yDAAyD;EACzD,yBAAyB;AAC3B;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,UAAU;EACV,MAAM;EACN,QAAQ;EACR,WAAW;EACX,YAAY;EACZ,yCAAyC;AAC3C;AACA;;EAEE,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,eAAe;EACf,oCAAoC;EACpC,gBAAgB;EAChB,kBAAkB;AACpB;AACA;EACE,yCAAyC;EACzC,UAAU;AACZ;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,UAAU;EACV,eAAe;EACf,gBAAgB;AAClB;AACA;EACE,kBAAkB;EAClB,gDAAgD;EAChD,yCAAyC;AAC3C;AACA;EACE,oCAAoC;AACtC;AACA;EACE,yCAAyC;EACzC,gDAAgD;AAClD;AACA;EACE,eAAe;AACjB;AACA;EACE,aAAa;EACb,gCAAgC;EAChC,2BAA2B;AAC7B;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,4BAA4B;EAC5B,cAAc;EACd,0BAA0B;AAC5B;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,qBAAqB;EACrB,UAAU;EACV,YAAY;EACZ,2CAA2C;AAC7C;AACA;EACE,4BAA4B;EAC5B,cAAc;EACd,YAAY;AACd;AACA;EACE,eAAe;EACf,qBAAqB;EACrB,wBAAwB;EACxB,oBAAoB;EACpB,oCAAoC;AACtC;AACA;EACE,6CAA6C;EAC7C,kCAAkC;AACpC;AACA;EACE,aAAa;AACf;AACA;EACE,oBAAoB;AACtB;AACA;EACE,oCAAoC;EACpC,8BAA8B;AAChC;AACA;EACE,oCAAoC;AACtC;AACA;EACE,oCAAoC;AACtC;AACA;;CAEC;AACD;EACE,YAAY;EACZ,qBAAqB;AACvB;AACA;EACE,+CAA+C;AACjD;AACA;EACE,gBAAgB;AAClB;AACA;EACE,qBAAqB;EACrB,2BAA2B;EAC3B,gBAAgB;EAChB,iBAAiB;AACnB;AACA;EACE,oCAAoC;AACtC;AACA;;CAEC;AACD;EACE,yCAAyC;AAC3C;AACA;;CAEC;AACD;EACE,aAAa;AACf;AACA;EACE,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,WAAW;AACb;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,cAAc;AAChB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,eAAe;EACf,WAAW;EACX,YAAY;EACZ,oCAAoC;EACpC,kBAAkB;EAClB,sBAAsB;AACxB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,YAAY;EACZ,eAAe;AACjB;AACA;EACE,gDAAgD;EAChD,yCAAyC;AAC3C;AACA;EACE,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,sBAAsB;AACxB;AACA;EACE,YAAY;EACZ,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,YAAY;EACZ,eAAe;EACf,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,qCAAqC;AACvC;AACA;EACE,6BAA6B;AAC/B;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,aAAa;AACf;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,SAAS;EACT,qBAAqB;EACrB,UAAU;EACV,YAAY;EACZ,2CAA2C;AAC7C;AACA;EACE,gBAAgB;EAChB,iBAAiB;AACnB;AACA;EACE,UAAU;EACV,oCAAoC;EACpC,aAAa;EACb,WAAW;EACX,YAAY;EACZ,mBAAmB;EACnB,uBAAuB;AACzB;AACA;EACE,eAAe;AACjB;AACA;EACE,yCAAyC;AAC3C;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,UAAU;EACV,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,yCAAyC;EACzC,gDAAgD;AAClD;AACA;;;;EAIE,aAAa;AACf;AACA;EACE,YAAY;AACd;AACA;EACE,gDAAgD;AAClD;AACA;EACE,iBAAiB;AACnB;AACA;EACE,gBAAgB;AAClB;AACA;;EAEE,mBAAmB;EACnB,gBAAgB;AAClB;AACA;;EAEE,YAAY;AACd;AACA;;EAEE,eAAe;AACjB;AACA;;;;;;;;EAQE,kBAAkB;EAClB,aAAa;AACf;AACA;;EAEE,6DAA6D;AAC/D;AACA;;EAEE,mBAAmB;AACrB;AACA;;EAEE,UAAU;AACZ;AACA;;EAEE,WAAW;AACb;AACA;;EAEE,aAAa;AACf;AACA;;EAEE,aAAa;AACf;AACA;;EAEE,aAAa;EACb,UAAU;EACV,mBAAmB;EACnB,6BAA6B;EAC7B,gBAAgB;AAClB;AACA;;EAEE,6BAA6B;AAC/B;AACA;;EAEE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,oCAAoC;EACpC,sBAAsB;EACtB,kBAAkB;AACpB;AACA;;EAEE,eAAe;AACjB;AACA;;EAEE,yCAAyC;EACzC,8BAA8B;EAC9B,kBAAkB;EAClB,UAAU;AACZ;AACA;;EAEE,aAAa;EACb,gCAAgC;EAChC,2BAA2B;AAC7B;AACA;;EAEE,qCAAqC;AACvC;AACA;;EAEE,qCAAqC;AACvC;AACA;;EAEE,+CAA+C;AACjD;AACA;;EAEE,wDAAwD;AAC1D;AACA;;EAEE,wDAAwD;AAC1D;AACA;;EAEE,uBAAuB;EACvB,sBAAsB;EACtB,kBAAkB;AACpB;AACA;;EAEE,yCAAyC;EACzC,8BAA8B;AAChC;AACA;;EAEE,eAAe;EACf,WAAW;EACX,YAAY;AACd;AACA;;EAEE,uBAAuB;AACzB;AACA;;EAEE,aAAa;AACf;AACA;;EAEE,kBAAkB;AACpB;AACA;;EAEE,kBAAkB;AACpB;AACA;EACE,wBAAwB;AAC1B;AACA;;;;EAIE,WAAW;EACX,aAAa;EACb,uBAAuB;AACzB;AACA;;;;EAIE,aAAa;AACf;AACA;;;;EAIE,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;AACb;AACA;;;;EAIE,WAAW;EACX,gBAAgB;EAChB,iBAAiB;AACnB;AACA;;;;EAIE,yCAAyC;EACzC,8BAA8B;AAChC;AACA;;;;EAIE,aAAa;AACf;AACA;;;;EAIE,wBAAwB;AAC1B;AACA;;EAEE,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,yCAAyC;EACzC,YAAY;AACd;AACA,YAAY;AACZ;EACE,UAAU;EACV,WAAW;AACb;AACA;EACE,WAAW;AACb;AACA;;CAEC;AACD;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,WAAW;EACX,iBAAiB;EACjB,kBAAkB;EAClB,mBAAmB;EACnB,gBAAgB;AAClB;AACA;EACE,oBAAoB;AACtB;AACA;EACE,iBAAiB;AACnB;AACA;;EAEE,sBAAsB;EACtB,kBAAkB;EAClB,2CAA2C;EAC3C,eAAe;AACjB;AACA;;EAEE,kBAAkB;EAClB,aAAa;EACb,uBAAuB;EACvB,mBAAmB;AACrB;AACA;;EAEE,oCAAoC;AACtC;AACA;EACE,OAAO;EACP,mBAAmB;AACrB;AACA;EACE,uCAAuC;AACzC;AACA;EACE,sDAAsD;EACtD,iDAAiD;AACnD;AACA;EACE,sCAAsC;AACxC;AACA;EACE,sCAAsC;AACxC;AACA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,qBAAqB;AACvB;AACA;EACE,eAAe;AACjB",sourcesContent:[`:global(.design-dark) .design-box-panel {
15973
15977
  background-image: url('./images/design-background-dark.png');
15974
15978
  background-repeat: no-repeat;
15975
15979
  background-size: cover;
@@ -16418,6 +16422,10 @@ html li {
16418
16422
  border-radius: 4px;
16419
16423
  margin: 0 5px;
16420
16424
  }
16425
+ :global(.design_left_slot) [role='treeitem'] [class*='mod_actived__'],
16426
+ :global(.design_right_slot) [role='treeitem'] [class*='mod_actived__'] {
16427
+ outline: 1px solid var(--kt-tree-inactiveSelectionBackground);
16428
+ }
16421
16429
  :global(.design_left_slot) .design-kt_split_panel,
16422
16430
  :global(.design_right_slot) .design-kt_split_panel {
16423
16431
  padding-bottom: 8px;
@@ -19220,10 +19228,14 @@ html li {
19220
19228
  }
19221
19229
  .B2Wzp_NnsCQOjWh072UK {
19222
19230
  height: 100%;
19231
+ display: flex;
19232
+ justify-content: center;
19233
+ align-items: center;
19234
+ padding: 40px;
19223
19235
  }
19224
19236
  .QJvnFH9dOsa8R2NeYjZs {
19225
- width: 100%;
19226
- height: 100%;
19237
+ max-width: 100%;
19238
+ max-height: 100%;
19227
19239
  }
19228
19240
  .jXdybFnzpr36IG2RHDY6 {
19229
19241
  display: flex;
@@ -19254,7 +19266,7 @@ html li {
19254
19266
  margin-top: 20px;
19255
19267
  font-size: 13px;
19256
19268
  }
19257
- `,"",{version:3,sources:["webpack://./../../packages/file-scheme/lib/browser/style.module.less"],names:[],mappings:"AAAA;EACE,YAAY;EACZ,aAAa;AACf;AACA;EACE,wXAAwX;EACxX,0BAA0B;EAC1B,iCAAiC;EACjC,0CAA0C;EAC1C,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,OAAO;EACP,aAAa;AACf;AACA;EACE,cAAc;EACd,cAAc;EACd,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;AAClB;AACA;EACE,YAAY;AACd;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,eAAe;EACf,aAAa;EACb,YAAY;EACZ,WAAW;EACX,iBAAiB;AACnB;AACA;EACE,0BAA0B;EAC1B,4CAA4C;AAC9C;AACA;EACE,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,aAAa;EACb,WAAW;AACb;AACA;EACE,gBAAgB;EAChB,eAAe;AACjB",sourcesContent:[`.kt_image_preview {
19269
+ `,"",{version:3,sources:["webpack://./../../packages/file-scheme/lib/browser/style.module.less"],names:[],mappings:"AAAA;EACE,YAAY;EACZ,aAAa;AACf;AACA;EACE,wXAAwX;EACxX,0BAA0B;EAC1B,iCAAiC;EACjC,0CAA0C;EAC1C,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,OAAO;EACP,aAAa;AACf;AACA;EACE,cAAc;EACd,cAAc;EACd,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,eAAe;EACf,gBAAgB;AAClB;AACA;EACE,YAAY;EACZ,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;AACA;EACE,eAAe;EACf,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,eAAe;EACf,aAAa;EACb,YAAY;EACZ,WAAW;EACX,iBAAiB;AACnB;AACA;EACE,0BAA0B;EAC1B,4CAA4C;AAC9C;AACA;EACE,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,aAAa;EACb,WAAW;AACb;AACA;EACE,gBAAgB;EAChB,eAAe;AACjB",sourcesContent:[`.kt_image_preview {
19258
19270
  height: 100%;
19259
19271
  display: flex;
19260
19272
  }
@@ -19281,10 +19293,14 @@ html li {
19281
19293
  }
19282
19294
  .kt_video_preview {
19283
19295
  height: 100%;
19296
+ display: flex;
19297
+ justify-content: center;
19298
+ align-items: center;
19299
+ padding: 40px;
19284
19300
  }
19285
19301
  .kt_video {
19286
- width: 100%;
19287
- height: 100%;
19302
+ max-width: 100%;
19303
+ max-height: 100%;
19288
19304
  }
19289
19305
  .error-page {
19290
19306
  display: flex;
@@ -28447,7 +28463,11 @@ Tokenizing line: ${O}`);for(let K=0;K<N.tokens.length;K++){const U=N.tokens[K];j
28447
28463
 
28448
28464
  `),this}appendMarkdown(s){return this.value+=s,this}appendCodeblock(s,g){return this.value+="\n```",this.value+=s,this.value+=`
28449
28465
  `,this.value+=g,this.value+="\n```\n",this}}t.MarkdownString=m;function E(_){return _ instanceof m?!0:_&&typeof _=="object"?typeof _.value=="string"&&(typeof _.isTrusted=="boolean"||_.isTrusted===void 0)&&(typeof _.supportThemeIcons=="boolean"||_.supportThemeIcons===void 0):!1}function p(_){const s=[],g=_.split("|").map(h=>h.trim());_=g[0];const c=g[1];if(c){const h=/height=(\d+)/.exec(c),u=/width=(\d+)/.exec(c),d=h?h[1]:"",v=u?u[1]:"",f=isFinite(parseInt(v,10)),a=isFinite(parseInt(d,10));f&&s.push(`width="${v}"`),a&&s.push(`height="${d}"`)}return{href:_,dimensions:s}}},53886:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(84811),t),n.__exportStar(e(38677),t),n.__exportStar(e(32112),t),n.__exportStar(e(58063),t),n.__exportStar(e(3484),t),n.__exportStar(e(84569),t),n.__exportStar(e(92771),t),n.__exportStar(e(87330),t),n.__exportStar(e(37070),t),n.__exportStar(e(32504),t),n.__exportStar(e(78941),t),n.__exportStar(e(69403),t)},32112:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69403:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerLane=void 0;var e;(function(n){n[n.Left=1]="Left",n[n.Center=2]="Center",n[n.Right=4]="Right",n[n.Full=7]="Full"})(e||(t.OverviewRulerLane=e={}))},58063:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3484:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92771:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51418:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},73294:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50288:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37846:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.knownProtocols=void 0;const n=e(11431),r=e(46147);t.knownProtocols=new Map,t.knownProtocols.set(r.ExtHostAPIIdentifier.ExtHostDocuments,n.ExtensionDocumentProtocol)},35250:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectIdentifier=void 0;var e;(function(n){n.name="$ident";function r(l,m){return Object.defineProperty(l,n.name,{value:m,enumerable:!0}),l}n.mixin=r;function o(l){return l[n.name]}n.of=o})(e||(t.ObjectIdentifier=e={}))},16363:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70858:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLittleEndian=m,t.encodeSemanticTokensDto=E,t.decodeSemanticTokensDto=_;function e(s){for(let g=0,c=s.length;g<c;g+=4){const h=s[g+0],u=s[g+1],d=s[g+2],v=s[g+3];s[g+0]=v,s[g+1]=d,s[g+2]=u,s[g+3]=h}}function n(s){const g=new Uint8Array(s.buffer,s.byteOffset,s.length*4);return m()||e(g),g}function r(s){const g=s;if(m()||e(g),g.byteOffset%4===0)return new Uint32Array(g.buffer,g.byteOffset,g.length/4);{const c=new Uint8Array(g.byteLength);return c.set(g),new Uint32Array(c.buffer,c.byteOffset,c.length/4)}}let o=!0,l=!1;function m(){if(!l){l=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,o=new Uint16Array(s.buffer)[0]===513}return o}function E(s){const g=new Uint32Array(p(s));let c=0;if(g[c++]=s.id,s.type==="full")g[c++]=1,g[c++]=s.data.length,g.set(s.data,c),c+=s.data.length;else{g[c++]=2,g[c++]=s.deltas.length;for(const h of s.deltas)g[c++]=h.start,g[c++]=h.deleteCount,h.data?(g[c++]=h.data.length,g.set(h.data,c),c+=h.data.length):g[c++]=0}return n(g)}function p(s){let g=0;if(g+=2,s.type==="full")g+=1+s.data.length;else{g+=1,g+=3*s.deltas.length;for(const c of s.deltas)c.data&&(g+=c.data.length)}return g}function _(s){const g=r(s);let c=0;const h=g[c++];if(g[c++]===1){const f=g[c++],a=g.subarray(c,c+f);return c+=f,{id:h,type:"full",data:a}}const d=g[c++],v=[];for(let f=0;f<d;f++){const a=g[c++],b=g[c++],y=g[c++];let S;y>0&&(S=g.subarray(c,c+y),c+=y),v[f]={start:a,deleteCount:b,data:S}}return{id:h,type:"delta",deltas:v}}},29490:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89225:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=e,t.endsWith=n,t.isLowerAsciiLetter=r,t.isUpperAsciiLetter=o,t.equalsIgnoreCase=m,t.escapeRegExpCharacters=p,t.startsWithIgnoreCase=_;function e(s,g){if(s.length<g.length)return!1;if(s===g)return!0;for(let c=0;c<g.length;c++)if(s[c]!==g[c])return!1;return!0}function n(s,g){const c=s.length-g.length;return c>0?s.indexOf(g,c)===c:c===0?s===g:!1}function r(s){return s>=97&&s<=122}function o(s){return s>=65&&s<=90}function l(s){return r(s)||o(s)}function m(s,g){const c=s?s.length:0,h=g?g.length:0;return c!==h?!1:E(s,g)}function E(s,g,c=s.length){if(typeof s!="string"||typeof g!="string")return!1;for(let h=0;h<c;h++){const u=s.charCodeAt(h),d=g.charCodeAt(h);if(u!==d){if(l(u)&&l(d)){const v=Math.abs(u-d);if(v!==0&&v!==32)return!1}else if(String.fromCharCode(u).toLowerCase()!==String.fromCharCode(d).toLowerCase())return!1}}return!0}function p(s){return s.replace(/[-\\{}*+?|^$.[\]()#]/g,"\\$&")}function _(s,g){const c=g.length;return g.length>s.length?!1:E(s,g,c)}},54741:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskFilterDTO=void 0;var e;(function(n){function r(l){return l}n.from=r;function o(l){if(l)return Object.assign(Object.create(null),l)}n.to=o})(e||(t.TaskFilterDTO=e={}))},25535:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54056:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestItemRootImpl=t.TestItemImpl=t.MixedTestItemController=t.InvalidTestItemError=t.DuplicateTestItemError=t.diffTestItems=t.getPrivateApiFor=t.createPrivateApiFor=void 0;const e=new WeakMap,n=(v,f)=>{const a={controllerId:f};return e.set(v,a),a};t.createPrivateApiFor=n;const r=v=>e.get(v);t.getPrivateApiFor=r;const o=(v,f,a,b)=>{let y=a;return{enumerable:!0,configurable:!1,get(){return y},set(S){var A;if(!b(y,S)){const T=y;y=S,(A=v.listener)===null||A===void 0||A.call(v,{op:3,key:f,value:S,previous:T})}}}},l=(v,f)=>v===f,m={range:(v,f)=>v===f?!0:!v||!f?!1:v.isEqual(f),label:l,description:l,sortText:l,busy:l,error:l,canResolveChildren:l,tags:(v,f)=>!(v.length!==f.length||v.some(a=>!f.find(b=>a.id===b.id)))},E=Object.keys(m),p=(v,f)=>({range:o(v,"range",void 0,m.range),label:o(v,"label",f,m.label),description:o(v,"description",void 0,m.description),sortText:o(v,"sortText",void 0,m.sortText),canResolveChildren:o(v,"canResolveChildren",!1,m.canResolveChildren),busy:o(v,"busy",!1,m.busy),error:o(v,"error",void 0,m.error),tags:o(v,"tags",[],m.tags)}),_=(v,f)=>{const a=new Map;for(const b of E){const y=m[b];y(v[b],f[b])||a.set(b,f[b])}return a};t.diffTestItems=_;class s extends Error{constructor(f){super(`Attempted to insert a duplicate test item ID ${f}`)}}t.DuplicateTestItemError=s;class g extends Error{constructor(f){super(`TestItem with ID "${f}" is invalid. Make sure to create it from the createTestItem method.`)}}t.InvalidTestItemError=g;class c extends Error{constructor(f,a,b){super(`TestItem with ID "${f}" is from controller "${a}" and cannot be added as a child of an item from controller "${b}".`)}}t.MixedTestItemController=c;const h=v=>{const f=(0,t.getPrivateApiFor)(v);let a=new Map;return{get size(){return a.size},forEach(b,y){for(const S of a.values())b.call(y,S,this)},replace(b){var y;const S=new Map,A=new Set(a.keys()),T={op:4,ops:[]};for(const w of b){if(!(w instanceof u))throw new g(w.id);const D=(0,t.getPrivateApiFor)(w).controllerId;if(D!==f.controllerId)throw new c(w.id,D,f.controllerId);if(S.has(w.id))throw new s(w.id);S.set(w.id,w),A.delete(w.id),T.ops.push({op:0,item:w})}for(const w of A.keys())T.ops.push({op:1,id:w});(y=f.listener)===null||y===void 0||y.call(f,T),a=S},add(b){var y;if(!(b instanceof u))throw new g(b.id);a.set(b.id,b),(y=f.listener)===null||y===void 0||y.call(f,{op:0,item:b})},delete(b){var y;a.delete(b)&&((y=f.listener)===null||y===void 0||y.call(f,{op:1,id:b}))},get(b){return a.get(b)},toJSON(){return Array.from(a.values())},[Symbol.iterator](){return a.values()}}};class u{constructor(f,a,b,y){if(a.includes("\0"))throw new Error(`Test IDs may not include the ${JSON.stringify(a)} symbol`);const S=(0,t.createPrivateApiFor)(this,f);Object.defineProperties(this,{id:{value:a,enumerable:!0,writable:!1},uri:{value:y,enumerable:!0,writable:!1},parent:{enumerable:!1,get(){return S.parent instanceof d?void 0:S.parent}},children:{value:h(this),enumerable:!0,writable:!1},...p(S,b)})}invalidateResults(){var f,a;(a=(f=(0,t.getPrivateApiFor)(this)).listener)===null||a===void 0||a.call(f,{op:2})}}t.TestItemImpl=u;class d extends u{constructor(f,a){super(f,f,a,void 0)}}t.TestItemRootImpl=d},82086:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4809:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86162:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeviewsService=t.ITreeViewsService=t.TreeViewSelection=t.TreeViewItem=t.TreeItemCheckboxState=void 0;var e;(function(l){l[l.Unchecked=0]="Unchecked",l[l.Checked=1]="Checked"})(e||(t.TreeItemCheckboxState=e={}));class n{}t.TreeViewItem=n;var r;(function(l){function m(E){return!!E&&typeof E=="object"&&"treeViewId"in E&&"treeItemId"in E}l.is=m})(r||(t.TreeViewSelection=r={})),t.ITreeViewsService=Symbol("ITreeViewsService");class o{constructor(){this._dragOperations=new Map,this._renderedElements=new Map}removeDragOperationTransfer(m){if(m&&this._dragOperations.has(m)){const E=this._dragOperations.get(m);return this._dragOperations.delete(m),E}}addDragOperationTransfer(m,E){this._dragOperations.set(m,E)}getRenderedTreeElement(m){if(this._renderedElements.has(m))return this._renderedElements.get(m)}addRenderedTreeItemElement(m,E){this._renderedElements.set(m,E)}removeRenderedTreeItemElement(m){this._renderedElements.has(m)&&this._renderedElements.delete(m)}}t.TreeviewsService=o},64945:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},43710:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=o,t.mixin=l,t.illegalArgument=m,t.isLocationArray=E,t.isDefinitionLinkArray=p,t.reviveRegExp=_,t.reviveIndentationRule=s,t.reviveOnEnterRule=g,t.reviveOnEnterRules=c,t.serializeEnterRules=h,t.serializeRegExp=u,t.serializeIndentation=d,t.serializeAutoClosingPairs=v;const r=e(85608).__importStar(e(51328));function o(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)&&!(f instanceof RegExp)&&!(f instanceof Date)}function l(f,a,b=!0){return o(f)?(o(a)&&Object.keys(a).forEach(y=>{y in f?b&&(o(f[y])&&o(a[y])?l(f[y],a[y],b):f[y]=a[y]):f[y]=a[y]}),f):a}function m(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function E(f){return Array.isArray(f)&&f.length>0&&f[0]instanceof r.Location}function p(f){return Array.isArray(f)&&f.length>0&&f[0].hasOwnProperty("targetUri")&&f[0].hasOwnProperty("targetRange")}function _(f){if(!(typeof f>"u"||f===null))return new RegExp(f.pattern,f.flags)}function s(f){if(!(typeof f>"u"||f===null))return{increaseIndentPattern:_(f.increaseIndentPattern),decreaseIndentPattern:_(f.decreaseIndentPattern),indentNextLinePattern:_(f.indentNextLinePattern),unIndentedLinePattern:_(f.unIndentedLinePattern)}}function g(f){return{beforeText:_(f.beforeText),afterText:_(f.afterText),action:f.action,previousLineText:_(f.previousLineText)}}function c(f){if(!(typeof f>"u"||f===null))return f.map(g)}function h(f){if(!(typeof f>"u"||f===null))return f.map(a=>({action:a.action,beforeText:u(a.beforeText),afterText:u(a.afterText),previousLineText:u(a.previousLineText)}))}function u(f){if(!(typeof f>"u"||f===null))return{pattern:f.source,flags:(f.global?"g":"")+(f.ignoreCase?"i":"")+(f.multiline?"m":"")}}function d(f){if(!(typeof f>"u"||f===null))return{increaseIndentPattern:u(f.increaseIndentPattern),decreaseIndentPattern:u(f.decreaseIndentPattern),indentNextLinePattern:u(f.indentNextLinePattern),unIndentedLinePattern:u(f.unIndentedLinePattern)}}function v(f){if(f)return f.map(a=>({open:a.open,close:a.close,notIn:a.notIn?a.notIn.map(b=>r.SyntaxTokenType.toString(b)):void 0}))}},96833:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98116:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebviewViewResolverRegistrationRemovalEvent=t.WebviewViewResolverRegistrationEvent=void 0;const n=e(43718);class r extends n.BasicEvent{}t.WebviewViewResolverRegistrationEvent=r;class o extends n.BasicEvent{}t.WebviewViewResolverRegistrationRemovalEvent=o},55467:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92622:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationTarget=void 0,t.reviveWorkspaceEditDto=o;const n=e(43718);var r;(function(l){l[l.Global=1]="Global",l[l.Workspace=2]="Workspace",l[l.WorkspaceFolder=3]="WorkspaceFolder"})(r||(t.ConfigurationTarget=r={}));function o(l){if(l&&l.edits)for(const m of l.edits)if(typeof m.resource=="object")m.resource=n.URI.from(m.resource),m.options={openDirtyInEditor:!0},m.textEdit=m.textEdit,m.versionId=m.versionId;else{const E=m;E.newResource=m.newResource?n.URI.from(m.newResource):void 0,E.oldResource=m.oldResource?n.URI.from(m.oldResource):void 0,E.options={...E.options,showInEditor:!1}}return l}},57646:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(76003),l=e(41869),m=e(37406),E=e(57517),p=e(88819),_=s=>{const g=s.resource.uri.codeUri.fsPath,c=(0,l.useInjectable)(o.INJECTOR_TOKEN),h=(0,l.useInjectable)(l.AppConfig),u=(0,l.useInjectable)(E.WorkbenchEditorService),d=(0,l.useInjectable)(l.IEventBus),v=()=>{const a=u.currentResource;a&&(a.metadata={...a.metadata,skipPreventBinary:!0},d.fire(new E.ResourceOpenTypeChangedEvent(a.uri)))},f=[{label:(0,l.localize)("editor.file.prevent.stillOpen"),onClick:()=>v()}];return h.isElectronRenderer&&f.push({label:(0,l.localize)("editor.openExternal"),onClick:()=>c.get(m.IElectronMainUIService).openPath(g)}),r.default.createElement(p.PreventComponent,{description:(0,l.localize)("editor.cannotOpenBinary"),actions:f})};t.BinaryEditorComponent=_},60387:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkThroughSnippetSchemeDocumentProvider=t.VscodeSchemeDocumentProvider=t.FileSchemeDocumentProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(96405),m=e(68692),E=e(14951),p=e(80449);let _=class extends m.BaseFileSystemEditorDocumentProvider{handlesUri(h){return h.scheme===o.Schemes.file?20:-1}handlesScheme(){return!1}provideEncoding(h){return super.provideEncoding(h)}preferLanguageForUri(h){if(["settings.json"].includes(h.path.base))return"jsonc"}async saveDocumentModel(h,u,d,v,f,a=!1,b=`
28450
- `,y){const S=this.hashCalculateService.calculate(d);return u.length>p.FILE_SAVE_BY_CHANGE_THRESHOLD?await this.fileSchemeDocClient.saveByChange(h.toString(),{baseMd5:S,changes:v,eol:b},f,a,y):await this.fileSchemeDocClient.saveByContent(h.toString(),{baseMd5:S,content:u},f,a,y)}async provideEditorDocumentModelContentMd5(h,u){return this.fileSchemeDocClient.getMd5(h.toString(),u)}};t.FileSchemeDocumentProvider=_,n.__decorate([(0,r.Autowired)(E.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.IFileSchemeDocClient),n.__metadata("design:type",Object)],_.prototype,"fileSchemeDocClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),t.FileSchemeDocumentProvider=_=n.__decorate([(0,r.Injectable)()],_);let s=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this.listeners={}}isReadonly(h){return!0}handlesScheme(h){return h==="vscode"}async provideEditorDocumentModelContent(h,u){return this.getSchemaContent(h)}getSchemaContent(h){const u=h.toString(),d=this.jsonRegistry.getSchemaContributions().schemas[u];if(d){const v=JSON.stringify(d);if(!this.listeners[u]){const f=o.Disposable.create(()=>{this.jsonRegistry.onDidChangeSchema(a=>{a===u&&this._onDidChangeContent.fire(h)})});this.listeners[u]=f}return v}return"{}"}onDidDisposeModel(h){h.toString()&&(this.listeners[h.toString()].dispose(),delete this.listeners[h.toString()])}};t.VscodeSchemeDocumentProvider=s,n.__decorate([(0,r.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],s.prototype,"schemaStore",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],s.prototype,"jsonRegistry",void 0),t.VscodeSchemeDocumentProvider=s=n.__decorate([(0,r.Injectable)()],s);let g=class{constructor(){this.documentContentMaps=new Map,this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(h){return h===o.Schemes.walkThroughSnippet}provideEditorDocumentModelContent(h,u){return this.documentContentMaps.has(h.toString())||this.documentContentMaps.set(h.toString(),""),this.documentContentMaps.get(h.toString())}isReadonly(){return!1}preferLanguageForUri(){return"plaintext"}};t.WalkThroughSnippetSchemeDocumentProvider=g,t.WalkThroughSnippetSchemeDocumentProvider=g=n.__decorate([(0,r.Injectable)()],g)},41352:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeDocClientService=void 0;const n=e(85608),r=e(76003),o=e(80449);let l=class{saveByChange(E,p,_,s,g){return this.fileDocBackendService.$saveByChange(E,p,_,s,g)}saveByContent(E,p,_,s,g){return this.fileDocBackendService.$saveByContent(E,p,_,s,g)}getMd5(E,p){return this.fileDocBackendService.$getMd5(E,p)}};t.FileSchemeDocClientService=l,n.__decorate([(0,r.Autowired)(o.FileSchemeDocNodeServicePath),n.__metadata("design:type",Object)],l.prototype,"fileDocBackendService",void 0),t.FileSchemeDocClientService=l=n.__decorate([(0,r.Injectable)()],l)},17276:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemEditorComponentContribution=t.FileSystemEditorResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),m=e(57517),E=e(17878),p=e(42933),_=e(57646),s=e(60387),g=e(88819),c=e(99025),h="video-preview",u="image-preview",d="external-file",v="large-file-prevent";let f=class{registerResource(y){y.registerResourceProvider(this.untitledResourceProvider)}registerEditorDocumentModelContentProvider(y){y.registerEditorDocumentModelContentProvider(this.fileSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.vscodeSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.walkThroughSnippetSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.untitledSchemeDocumentProvider)}};t.FileSystemEditorResourceContribution=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.FileSchemeDocumentProvider)],f.prototype,"fileSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.VscodeSchemeDocumentProvider)],f.prototype,"vscodeSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.WalkThroughSnippetSchemeDocumentProvider)],f.prototype,"walkThroughSnippetSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",E.UntitledSchemeResourceProvider)],f.prototype,"untitledResourceProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",E.UntitledSchemeDocumentProvider)],f.prototype,"untitledSchemeDocumentProvider",void 0),t.FileSystemEditorResourceContribution=f=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution)],f);let a=class{constructor(){this.cachedFileType=new o.LRUMap(200,100),this.fileServiceClient.onFilesChanged(y=>{y.forEach(S=>{this.cachedFileType.delete(S.uri.toString())})})}registerEditorComponent(y){y.registerEditorComponent({component:c.ImagePreview,uid:u,scheme:o.Schemes.file}),y.registerEditorComponent({component:c.VideoPreview,uid:h,scheme:o.Schemes.file}),y.registerEditorComponent({component:_.BinaryEditorComponent,uid:d,scheme:o.Schemes.file}),y.registerEditorComponent({component:g.LargeFilePrevent,uid:v,scheme:o.Schemes.file}),y.registerEditorComponentResolver(S=>S===o.Schemes.file||this.fileServiceClient.handlesScheme(S)?10:-1,(S,A)=>{A.length===0&&A.push({type:m.EditorOpenType.component,componentId:d})}),y.registerEditorComponentResolver(S=>S===o.Schemes.file||this.fileServiceClient.handlesScheme(S)?10:-1,async(S,A)=>{const T=await this.getFileType(S.uri.toString());switch(T){case"image":{A.push({type:m.EditorOpenType.component,componentId:u});break}case"video":{A.push({type:m.EditorOpenType.component,componentId:h});break}case"binary":case"text":{const{metadata:w,uri:D}=S,I=w||{};if(T==="binary"&&!I.skipPreventBinary)break;const O=await this.fileServiceClient.getFileStat(D.toString());await this.preference.ready;const P=this.preference.getValid("editor.largeFile",4*1024*1024*1024);O&&(O.size||0)>P&&!I.skipPreventTooLarge?A.push({type:m.EditorOpenType.component,componentId:v}):A.push({type:m.EditorOpenType.code,title:(0,o.localize)("editorOpenType.code")});break}}}),y.registerEditorComponentResolver(o.Schemes.untitled,(S,A,T)=>{T([{type:m.EditorOpenType.code,priority:"default"}])})}async getFileType(y){return this.cachedFileType.has(y)||((0,l.getLanguageIdFromMonaco)(new o.URI(y))?this.cachedFileType.set(y,"text"):this.cachedFileType.set(y,await this.getRealFileType(y))),this.cachedFileType.get(y)}async getRealFileType(y){try{return await this.fileServiceClient.getFileType(y)}catch{return"text"}}};t.FileSystemEditorComponentContribution=a,n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],a.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],a.prototype,"preference",void 0),t.FileSystemEditorComponentContribution=a=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution),n.__metadata("design:paramtypes",[])],a)},52568:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(80449),m=e(41352),E=e(17276);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[E.FileSystemEditorResourceContribution,E.FileSystemEditorComponentContribution,{token:l.IFileSchemeDocClient,useClass:m.FileSchemeDocClientService}],this.backServices=[{servicePath:l.FileSchemeDocNodeServicePath}]}};t.FileSchemeModule=p,t.FileSchemeModule=p=n.__decorate([(0,r.Injectable)()],p)},88819:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFilePrevent=t.PreventComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),m=e(81878),E=e(54414),p=e(82196),_=n.__importDefault(e(19996)),s=c=>o.default.createElement("div",{className:_.default["error-page"]},o.default.createElement("div",{className:(0,r.default)(_.default.icon,(0,l.getExternalIcon)("warning"))}),o.default.createElement("div",{className:_.default.description},c.description),o.default.createElement("div",{className:_.default["actions-wrapper"]},c.actions.map((h,u)=>o.default.createElement(m.Button,{key:u,onClick:()=>h.onClick(),className:_.default["action-button"]},h.label))));t.PreventComponent=s;const g=()=>{const c=(0,l.useInjectable)(E.WorkbenchEditorService),h=(0,l.useInjectable)(l.IEventBus),u=()=>{const d=c.currentResource;d&&(d.metadata={...d.metadata,skipPreventTooLarge:!0},h.fire(new p.ResourceOpenTypeChangedEvent(d.uri)))};return o.default.createElement(t.PreventComponent,{description:(0,l.localize)("editor.largeFile.prevent"),actions:[{label:(0,l.localize)("editor.file.prevent.stillOpen"),onClick:()=>u()}]})};t.LargeFilePrevent=g},99025:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreview=t.VideoPreview=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(40827),m=n.__importDefault(e(19996)),E=s=>{const g=(0,o.useInjectable)(l.StaticResourceService);return{src:r.default.useMemo(()=>g.resolveStaticResource(s.uri).toString(),[s])}},p=s=>{const{src:g}=E(s.resource);return r.default.createElement("div",{className:m.default.kt_video_preview},r.default.createElement("video",{autoPlay:!0,controls:!0,className:m.default.kt_video,src:g}))};t.VideoPreview=p;const _=s=>{const g=r.default.useRef(),c=r.default.useRef(),{src:h}=E(s.resource);return r.default.useEffect(()=>{const u=new o.Disposable;return g.current&&(g.current.src=h),()=>{u.dispose()}},[s.resource]),r.default.createElement("div",{className:m.default.kt_image_preview},r.default.createElement("div",{ref:c},r.default.createElement("img",{ref:u=>u&&(g.current=u)})))};t.ImagePreview=_},80449:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeType=t.FileSchemeDocNodeServicePath=t.IFileSchemeDocNodeService=t.IFileSchemeDocClient=t.FILE_SAVE_BY_CHANGE_THRESHOLD=t.FILE_ON_DISK_SCHEME=void 0,t.FILE_ON_DISK_SCHEME="fileOnDisk",t.FILE_SAVE_BY_CHANGE_THRESHOLD=1e5,t.IFileSchemeDocClient=Symbol("IFileSchemeDocClient"),t.IFileSchemeDocNodeService=Symbol("FileSchemeDocNodeService"),t.FileSchemeDocNodeServicePath="FileSchemeDocNodeService";var e;(function(n){n[n.ADDED=1]="ADDED",n[n.REMOVED=2]="REMOVED"})(e||(t.ChangeType=e={}))},15625:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSearchService=t.FileSearchServicePath=void 0,t.FileSearchServicePath="FileSearchServicePath",t.IFileSearchService=Symbol("FileSearchService")},84660:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(15625),t)},2156:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClient=t.BrowserFileSystemRegistryImpl=void 0;const n=e(85608),r=e(32852),o=e(76003),l=e(41869),m=e(43718),E=e(37406),p=e(8170),_=e(41682),s=e(42933),g=e(81952);let c=class{constructor(){this.providers=new Map}registerFileSystemProvider(d){const v=d.scheme;return this.providers.set(v,d),{dispose:()=>{this.providers.delete(v)}}}};t.BrowserFileSystemRegistryImpl=c,t.BrowserFileSystemRegistryImpl=c=n.__decorate([(0,o.Injectable)()],c);let h=class{get clientId(){return this.applicationService.clientId}constructor(){this.watcherWithSchemaMap=new Map,this.watcherDisposerMap=new Map,this.onFileChangedEmitter=new l.Emitter,this.onFileProviderChangedEmitter=new l.Emitter,this._onFilesChanged=new l.Emitter,this.onFilesChanged=this._onFilesChanged.event,this._onFileProviderChanged=new l.Emitter,this.onFileProviderChanged=this._onFileProviderChanged.event,this._onDidChangeFileSystemProviderRegistrations=new l.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=new l.Emitter,this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=new l.Emitter,this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.filesExcludesMatcherList=[],this.watcherId=0,this.toDisposable=new l.DisposableCollection,this.watchFileExcludes=[],this.watchFileExcludesMatcherList=[],this.filesExcludes=[],this.workspaceRoots=[],this._providerChanged=new Set,this.fsProviders=new Map,this.userHomeDeferred=new l.Deferred,this.options={encoding:"utf8",overwrite:!1,recursive:!0,moveToTrash:!0},this.uriWatcherMap=new Map,this.toDisposable.push(this.onDidChangeFileSystemProviderRegistrations(d=>{d.added&&d.scheme===m.Schemes.file&&this.doGetCurrentUserHome()}))}async initialize(){const d=await this.getProvider(m.Schemes.file);d.initialize&&await d.initialize(this.clientId)}async doGetCurrentUserHome(){const v=(await this.getProvider(m.Schemes.file)).getCurrentUserHome();this.userHomeDeferred.resolve(v)}handlesScheme(d){return this.registry.providers.has(d)||this.fsProviders.has(d)}dispose(){return this.toDisposable.dispose()}async resolveContent(d,v){const f=this.convertUri(d),b=await(await this.getProvider(f.scheme)).readFile(f.codeUri),y=b.data||b;return{content:l.BinaryBuffer.wrap(Uint8Array.from(y)).toString(v?.encoding)}}async readFile(d){const v=this.convertUri(d),a=await(await this.getProvider(v.scheme)).readFile(v.codeUri),b=a.data||a;return{content:l.BinaryBuffer.wrap(Uint8Array.from(b))}}async readFileStream(d){const v=this.convertUri(d);return await(await this.getProvider(v.scheme)).readFileStream(v.codeUri)}async getFileStat(d,v=!0){const f=this.convertUri(d),a=await this.getProvider(f.scheme);try{const b=await a.stat(f.codeUri);if(!b)throw s.FileSystemError.FileNotFound(f.codeUri.toString(),"File not found.");return this.filterStat(b,v)}catch(b){if(s.FileSystemError.FileNotFound.is(b))return}}async setContent(d,v,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!await this.isInSync(d,y))throw this.createOutOfSyncError(d);return await b.writeFile(a.codeUri,typeof v=="string"?l.BinaryBuffer.fromString(v).buffer:v,{create:!1,overwrite:!0,encoding:f?.encoding}),await b.stat(a.codeUri)}async updateContent(d,v,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!this.checkInSync(d,y))throw this.createOutOfSyncError(d);if(v.length===0)return y;const S=await b.readFile(a.codeUri),A=this.applyContentChanges(l.BinaryBuffer.wrap(S).toString(f?.encoding),v);await b.writeFile(a.codeUri,l.BinaryBuffer.fromString(A).buffer,{create:!1,overwrite:!0,encoding:f?.encoding});const T=await b.stat(a.codeUri);if(!T)throw s.FileSystemError.FileNotFound(a.codeUri.toString(),"File not found.");return T}async createFile(d,v){const f=this.convertUri(d),a=await this.getProvider(f.scheme),b=l.BinaryBuffer.fromString(v?.content||"").buffer;let y=await a.writeFile(f.codeUri,b,{create:!0,overwrite:v&&v.overwrite||!1,encoding:v?.encoding});return y=y||await a.stat(f.codeUri),y}async createFolder(d){const v=this.convertUri(d),f=await this.getProvider(v.scheme),a=await f.createDirectory(v.codeUri);return a||await f.stat(v.codeUri)}async move(d,v,f){const a=this.convertUri(d),b=this.convertUri(v),y=await this.getProvider(a.scheme),S=await y.rename(a.codeUri,b.codeUri,{overwrite:!!(f&&f.overwrite)});return S||await y.stat(b.codeUri)}async copy(d,v,f){const a=this.convertUri(d),b=this.convertUri(v),y=await this.getProvider(a.scheme),S=await this.doGetOverwrite(f);if(!(0,s.containsExtraFileMethod)(y,"copy"))throw this.getErrorProvideNotSupport(a.scheme,"copy");const A=await y.copy(a.codeUri,b.codeUri,{overwrite:!!S});return A||await y.stat(b.codeUri)}async getFsPath(d){if(d.startsWith("file:/"))return l.FileUri.fsPath(d)}fireFilesChange(d){const v=d.changes.map(f=>({uri:f.uri,type:f.type}));this._onFilesChanged.fire(v),this.eventBus.fire(new l.FilesChangeEvent(v))}async watchFileChanges(d,v){const a=(this.appConfig.unRecursiveDirectories||[]).some(I=>d.path.toString().startsWith(I)),b=this.convertUri(d.toString()),y=this.uriWatcherMap.get(b.toString());if(y)if(y.isDisposed())this.uriWatcherMap.delete(b.toString());else return y;const S=this.watcherId++,A=await this.getProvider(b.scheme),T=this.watcherWithSchemaMap.get(b.scheme)||[],w=await A.watch(b.codeUri,{excludes:v,recursive:!a});this.watcherDisposerMap.set(S,{dispose:async()=>{const I=this.uriWatcherMap.get(b.toString());await Promise.all([A.unwatch&&A.unwatch(w),I&&I.dispose()]),this.uriWatcherMap.delete(b.toString())}}),T.push(S),this.watcherWithSchemaMap.set(b.scheme,T);const D=new g.FileSystemWatcher({fileServiceClient:this,watchId:S,uri:d});return this.uriWatcherMap.set(b.toString(),D),D}async setWatchFileExcludes(d){return await(await this.getProvider(m.Schemes.file)).setWatchFileExcludes(d)}async getWatchFileExcludes(){return await(await this.getProvider(m.Schemes.file)).getWatchFileExcludes()}async setFilesExcludes(d,v){this.filesExcludes=d,this.filesExcludesMatcherList=[],v&&this.setWorkspaceRoots(v),this.updateExcludeMatcher()}async setWorkspaceRoots(d){this.workspaceRoots=d,this.updateExcludeMatcher()}async unwatchFileChanges(d){const v=this.watcherDisposerMap.get(d);if(!(!v||!v.dispose))return this.watcherDisposerMap.delete(d),v.dispose()}async delete(d,v){if(this.appConfig.isElectronRenderer&&v?.moveToTrash!==!1){const b=new l.URI(d);if(b.scheme===m.Schemes.file)return this.injector.get(E.IElectronMainUIService).moveToTrash(b.codeUri.fsPath)}const f=this.convertUri(d),a=await this.getProvider(f.scheme);await a.stat(f.codeUri),await a.delete(f.codeUri,{recursive:!0,moveToTrash:await this.doGetMoveToTrash(v)})}async getEncoding(d){return"utf8"}listCapabilities(){return _.Iterable.map(this.fsProviders,([d,v])=>({scheme:d,capabilities:v.capabilities}))}registerProvider(d,v){if(this.fsProviders.has(d))throw new Error(`The file system provider for \`${d}\` already registered`);const f=[];this.fsProviders.set(d,v),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:d,provider:v}),f.push({dispose:()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:d,provider:v}),this.fsProviders.delete(d),this._providerChanged.add(d)}}),v.onDidChangeFile&&f.push(v.onDidChangeFile(b=>this.fireFilesChange({changes:b}))),this.toDisposable.push(v.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:v,scheme:d}))),f.push({dispose:async()=>{const b=[];(this.watcherWithSchemaMap.get(d)||[]).forEach(y=>b.push(this.unwatchFileChanges(y))),await Promise.all(b)}}),this._providerChanged.add(d),this.onFileProviderChangedEmitter.fire(Array.from(this._providerChanged)),this.toDisposable.pushAll(f);const a=new l.DisposableCollection;return a.pushAll(f),this._onFileProviderChanged.fire(Array.from(this._providerChanged)),a}async access(d,v=s.FileAccess.Constants.F_OK){const f=this.convertUri(d),a=await this.getProvider(f.scheme);if(!(0,s.containsExtraFileMethod)(a,"access"))throw this.getErrorProvideNotSupport(f.scheme,"access");return await a.access(f.codeUri,v)}async getFileType(d){const v=this.convertUri(d),f=await this.getProvider(v.scheme);if(!(0,s.containsExtraFileMethod)(f,"getFileType"))throw this.getErrorProvideNotSupport(v.scheme,"getFileType");return await f.getFileType(d)}async getCurrentUserHome(){return this.userHomeDeferred.promise}getErrorProvideNotSupport(d,v){return`Scheme ${d} not support this function: ${v}.`}convertUri(d){const v=new l.URI(d);if(!v.scheme)throw new Error(`Unsupported convert Uri with non-scheme Uri: ${d}`);return v}updateExcludeMatcher(){this.filesExcludes.forEach(d=>{this.workspaceRoots.length>0?this.workspaceRoots.forEach(v=>{const a=new l.URI(v).resolve(d).path.toString();this.filesExcludesMatcherList.push((0,l.parseGlob)(a))}):this.filesExcludesMatcherList.push((0,l.parseGlob)(d))})}async shouldWaitProvider(d){const v=await this._onWillActivateFileSystemProvider.fireAndAwait({scheme:d}),{result:f}=v[0];if(f&&f.includes(d)){const a=await l.Event.toPromise(l.Event.filter(this.onFileProviderChanged,b=>b.includes(d)));if(!(0,m.isUndefined)(a))return!0}return!1}async getProvider(d){this._providerChanged.has(d)&&(await this.eventBus.fireAndAwait(new l.ExtensionActivateEvent({topic:"onFileSystem",data:d}),{timeout:3e3}),this._providerChanged.delete(d));const v=this.fsProviders.get(d);if(!v)throw new Error(`Not find ${d} provider.`);return v}async isReadonly(d){try{const v=new l.URI(d);return!!(await(await this.getProvider(v.scheme)).stat(this.convertUri(d).codeUri)).readonly}catch{return!1}}isExclude(d){const v=new l.URI(d);return this.filesExcludesMatcherList.some(f=>f(v.path.toString()))}filterStat(d,v=!0){if(d&&!this.isExclude(d.uri))return d.children&&v&&(d.children=this.filterStatChildren(d.children)),d}filterStatChildren(d){const v=[];return d.forEach(f=>{if(this.isExclude(f.uri))return!1;const a=this.filterStat(f);a&&v.push(a)}),v}applyContentChanges(d,v){let f=r.TextDocument.create("","",1,d);for(const a of v){let b=a.text;if(a.range){const y=f.offsetAt(a.range.start),S=f.offsetAt(a.range.end);b=f.getText().substr(0,y)+a.text+f.getText().substr(S)}f=r.TextDocument.create(f.uri,f.languageId,f.version,b)}return f.getText()}async isInSync(d,v){return!!this.checkInSync(d,v)}checkInSync(d,v){return v.lastModification===d.lastModification&&v.size===d.size}createOutOfSyncError(d){return s.FileSystemError.FileIsOutOfSync(d.uri)}async doGetEncoding(d){return d&&typeof d.encoding<"u"?d.encoding:this.options.encoding}async doGetOverwrite(d){return d&&typeof d.overwrite<"u"?d.overwrite:this.options.overwrite}async doGetRecursive(d){return d&&typeof d.recursive<"u"?d.recursive:this.options.recursive}async doGetMoveToTrash(d){return d&&typeof d.moveToTrash<"u"?d.moveToTrash:this.options.moveToTrash}};t.FileServiceClient=h,n.__decorate([(0,o.Autowired)(s.IBrowserFileSystemRegistry),n.__metadata("design:type",c)],h.prototype,"registry",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(m.IEventBus),n.__metadata("design:type",Object)],h.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(p.IApplicationService),n.__metadata("design:type",Object)],h.prototype,"applicationService",void 0),t.FileServiceClient=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},69037:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),m=e(2156);let E=class{constructor(){this._disposables=new o.DisposableStore,this._disposables.add(this.fileSystem.registerProvider(o.Schemes.file,this.diskFileServiceProvider))}async initialize(){const _=this.contributionProvider.getContributions();await Promise.all(_.map(async s=>{s.registerProvider&&await s.registerProvider(this.fileSystem)})),await Promise.all(_.map(async s=>{s.onFileServiceReady&&await s.onFileServiceReady()})),this.fileSystem.initialize&&await this.fileSystem.initialize()}dispose(){this._disposables.dispose()}};t.FileServiceContribution=E,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",m.FileServiceClient)],E.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(l.IDiskFileProvider),n.__metadata("design:type",Object)],E.prototype,"diskFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(o.FsProviderContribution),n.__metadata("design:type",Object)],E.prototype,"contributionProvider",void 0),t.FileServiceContribution=E=n.__decorate([(0,o.Domain)(o.ClientAppContribution),n.__metadata("design:paramtypes",[])],E)},60476:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFsProviderClient=t.CoreFileServiceProviderClient=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(42933);class m{constructor(){this.onDidChangeFileEmitter=new o.Emitter,this.onDidChangeFile=this.onDidChangeFileEmitter.event}watch(_,s){return this.fileServiceProvider.watch(_,s)}unwatch(_){return this.fileServiceProvider.unwatch&&this.fileServiceProvider.unwatch(_)}async stat(_){return await this.fileServiceProvider.stat(_)}readDirectory(_){return this.fileServiceProvider.readDirectory(_)}createDirectory(_){return this.fileServiceProvider.createDirectory(_)}async readFile(_,s){return s&&(0,o.getDebugLogger)("fileService.fsProvider").warn("encoding option for fsProvider.readFile is deprecated"),await this.fileServiceProvider.readFile(_)}readFileStream(_){if(this.fileServiceProvider.readFileStream)return this.fileServiceProvider.readFileStream(_);throw new Error("readFileStream not supported")}writeFile(_,s,g){return this.fileServiceProvider.writeFile(_,Array.from(s),g)}delete(_,s){return this.fileServiceProvider.delete(_,s)}rename(_,s,g){return this.fileServiceProvider.rename(_,s,g)}}t.CoreFileServiceProviderClient=m,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0);let E=class extends m{constructor(){super(...arguments),this.onDidChangeCapabilities=o.Event.None}get capabilities(){return this._capabilities||(this._capabilities=12318,o.isLinux&&(this._capabilities|=1024)),this._capabilities}async initialize(_){var s,g;if(!((s=this.fileServiceProvider)===null||s===void 0)&&s.initialize)try{await((g=this.fileServiceProvider)===null||g===void 0?void 0:g.initialize(_))}catch(c){(0,o.getDebugLogger)("fileService.fsProvider").error("initialize error",c)}}setWatchFileExcludes(_){return this.fileServiceProvider.setWatchFileExcludes(_)}getWatchFileExcludes(){return this.fileServiceProvider.getWatchFileExcludes()}onDidFilesChanged(_){const s=_.changes.map(g=>({uri:g.uri,type:g.type}));this.onDidChangeFileEmitter.fire(s)}copy(_,s,g){return this.fileServiceProvider.copy(_,s,g)}access(_,s){return this.fileServiceProvider.access(_,s)}getCurrentUserHome(){return this.fileServiceProvider.getCurrentUserHome()}getFileType(_){return this.fileServiceProvider.getFileType(_)}};t.DiskFsProviderClient=E,n.__decorate([(0,r.Autowired)(l.DiskFileServicePath),n.__metadata("design:type",Object)],E.prototype,"fileServiceProvider",void 0),n.__decorate([(0,o.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array]),n.__metadata("design:returntype",void 0)],E.prototype,"setWatchFileExcludes",null),t.DiskFsProviderClient=E=n.__decorate([(0,r.Injectable)()],E)},96708:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClientModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),m=e(70671),E=e(2156),p=e(69037),_=e(60476),s=e(23188);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IFileServiceClient,useClass:E.FileServiceClient},{token:l.IBrowserFileSystemRegistry,useClass:E.BrowserFileSystemRegistryImpl},{token:l.IDiskFileProvider,useClass:_.DiskFsProviderClient},{token:l.IShadowFileProvider,useClass:s.ShadowFileSystemProvider},p.FileServiceContribution],this.backServices=[{servicePath:l.DiskFileServicePath,clientToken:l.IDiskFileProvider,protocol:m.DiskFileServiceProtocol}]}};t.FileServiceClientModule=g,t.FileServiceClientModule=g=n.__decorate([(0,r.Injectable)()],g)},23188:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.readonly=!0,this.shadowFiles=new Map,this.fileChangeEmitter=new o.Emitter,this.onDidChangeFile=this.fileChangeEmitter.event}unwatch(E){throw new Error("Method not implemented.")}readFileStream(E){throw new Error("Method not implemented.")}watch(E,p){throw new Error("Method not implemented.")}stat(E){return Promise.resolve({uri:E.toString(),lastModification:0})}readDirectory(E){throw new Error("Method not implemented.")}createDirectory(E){throw new Error("Method not implemented.")}readFile(E){return this.shadowFiles.get(E.toString())||o.BinaryBuffer.fromString("no available").buffer}writeFile(E,p,_){this.shadowFiles.set(E.toString(),p)}delete(E,p){throw new Error("Method not implemented.")}rename(E,p,_){throw new Error("Method not implemented.")}copy(E,p,_){throw new Error("Method not implemented.")}exists(E){throw new Error("Method not implemented.")}access(E,p){throw new Error("Method not implemented.")}};t.ShadowFileSystemProvider=l,t.ShadowFileSystemProvider=l=n.__decorate([(0,r.Injectable)()],l)},81952:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcher=void 0;const n=e(43718);function r(l,m){return l.filter(E=>!!E.uri.startsWith(m))}class o{constructor(m){this.toDispose=new n.DisposableCollection,this.changeEmitter=new n.Emitter,this.toDispose.push(this.changeEmitter),this.fileServiceClient=m.fileServiceClient,this.watchId=m.watchId,this.uri=m.uri,this.fileServiceClient.onFilesChanged(E=>{const p=r(E,this.uri.toString());p&&p.length>0&&this.changeEmitter.fire(p)})}get onFilesChanged(){return this.changeEmitter.event}dispose(){return Promise.all([this.toDispose.dispose(),this.fileServiceClient.unwatchFileChanges(this.watchId)])}isDisposed(){return this.toDispose.disposed}}t.FileSystemWatcher=o},91813:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXT_LIST_TEXT=t.EXT_LIST_IMAGE=t.EXT_LIST_VIDEO=void 0,t.getFileTypeByExt=e,t.EXT_LIST_VIDEO=new Set(["mp4","webm","mkv","mov","mts","flv","avi","wmv"]),t.EXT_LIST_IMAGE=new Set(["png","gif","jpg","jpeg","svg","bmp","avif","cr2","cr3","dng","flif","heic","icns","jxl","jpm","jpx","nef","raf","rw2","tif","orf","webp","apng"]),t.EXT_LIST_TEXT=new Set(["xml"]);function e(n){let r="text";return n&&(t.EXT_LIST_IMAGE.has(n)?r="image":t.EXT_LIST_VIDEO.has(n)?r="video":t.EXT_LIST_TEXT.has(n)?r="text":r="binary"),r}},79929:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBrowserFileSystemRegistry=t.IFileServiceClient=void 0;const n=e(43718);t.IFileServiceClient=n.IFileServiceClient,t.IBrowserFileSystemRegistry=Symbol("IBrowserFileSystemRegistry")},49818:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemError=t.FileOperationError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.FileAccess=t.IFileService=t.IShadowFileProvider=t.IDiskFileProvider=t.FileStat=t.FileType=void 0,t.createFileSystemProviderError=_,t.markAsFileSystemProviderError=s,t.containsExtraFileMethod=c,t.notEmpty=h,t.isErrnoException=u,t.handleError=d;const n=e(85608),r=e(43718);var o=e(31036);Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return o.FileType}}),Object.defineProperty(t,"FileStat",{enumerable:!0,get:function(){return o.FileStat}}),n.__exportStar(e(11854),t),t.IDiskFileProvider=Symbol("IDiskFileProvider"),t.IShadowFileProvider=Symbol("IShadowFileProvider"),t.IFileService=Symbol("IFileService");var l;(function(v){let f;(function(a){a.F_OK=0,a.R_OK=4,a.W_OK=2,a.X_OK=1})(f=v.Constants||(v.Constants={}))})(l||(t.FileAccess=l={}));var m;(function(v){v.FileExists="EntryExists",v.FileNotFound="EntryNotFound",v.FileNotADirectory="EntryNotADirectory",v.FileIsADirectory="EntryIsADirectory",v.FileIsOutOfSync="FileIsOutOfSync",v.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",v.FileTooLarge="EntryTooLarge",v.FileWriteLocked="EntryWriteLocked",v.NoPermissions="NoPermissions",v.Unavailable="Unavailable",v.Unknown="Unknown"})(m||(t.FileSystemProviderErrorCode=m={}));class E extends Error{static declare(f,a){return Object.assign((...b)=>_(a(...b),f),{is:b=>{var y;return(y=b.stack)===null||y===void 0?void 0:y.startsWith(f)}})}constructor(f,a){super(f),this.code=a}is(f){return this.name===f.name}}t.FileSystemProviderError=E;class p extends Error{constructor(f,a,b){super(f),this.fileOperationResult=a,this.options=b}static isFileOperationError(f){return f instanceof Error&&!(0,r.isUndefinedOrNull)(f.fileOperationResult)}}t.FileOperationError=p;function _(v,f){const a=new E(v.toString(),f);return s(a,f),a}function s(v,f){return v.name=f?`${f} (FileSystemError)`:"FileSystemError",v}var g;(function(v){v.FileNotFound=E.declare(m.FileNotFound,(f,a)=>`${a?a+" ":""} '${f}' is not found.`),v.FileExists=E.declare(m.FileExists,(f,a)=>`${a?a+" ":""}'${f}' already exists.`),v.FileNotADirectory=E.declare(m.FileNotADirectory,(f,a)=>`${a?a+" ":""}'${f}' is not a directory.`),v.FileIsADirectory=E.declare(m.FileIsADirectory,(f,a)=>`${a?a+" ":""}'${f}' is a directory.`),v.FileIsOutOfSync=E.declare(m.FileIsOutOfSync,(f,a)=>`${a?a+" ":""}'${f}' is out of sync.`),v.FileExceedsMemoryLimit=E.declare(m.FileExceedsMemoryLimit,(f,a)=>`${a?a+" ":""}'${f}' is exceeds memory limit.`),v.FileTooLarge=E.declare(m.FileTooLarge,(f,a)=>`${a?a+" ":""}'${f}' is too large.`),v.FileWriteLocked=E.declare(m.FileWriteLocked,(f,a)=>`${a?a+" ":""}'${f}' is locked.`),v.FileIsNoPermissions=E.declare(m.NoPermissions,(f,a)=>`${a?a+" ":""}'${f}' is no permissions.`),v.Unavailable=E.declare(m.Unavailable,(f,a)=>`${a?a+" ":""}'${f}' is unavailable.`),v.Unknown=E.declare(m.Unknown,(f,a)=>`${a?a+" ":""}'${f}' is unkonw.`)})(g||(t.FileSystemError=g={}));function c(v,f){return(0,r.hasProperty)(v,f)&&(0,r.isFunction)(v[f])}function h(v){return v!==void 0}function u(v){return v.code!==void 0&&v.errno!==void 0}function d(v){var f,a,b,y,S;if(u(v))switch(v.code){case"EEXIST":throw g.FileExists(r.Uri.file((f=v.path)!==null&&f!==void 0?f:""));case"EPERM":case"EACCESS":throw g.FileIsNoPermissions(r.Uri.file((a=v.path)!==null&&a!==void 0?a:""));case"ENOENT":throw g.FileNotFound(r.Uri.file((b=v.path)!==null&&b!==void 0?b:""));case"ENOTDIR":throw g.FileNotADirectory(r.Uri.file((y=v.path)!==null&&y!==void 0?y:""));case"EISDIR":throw g.FileIsADirectory(r.Uri.file((S=v.path)!==null&&S!==void 0?S:""))}throw v}},42933:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79929),t),n.__exportStar(e(49818),t),n.__exportStar(e(28217),t),n.__exportStar(e(91813),t),n.__exportStar(e(50295),t)},70671:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFileServiceProtocol=void 0;const n=e(26387),r=e(52890),o=e(50295);t.DiskFileServiceProtocol={name:o.DiskFileServicePath,methods:[{method:"readFile",request:[{name:"uri",type:r.UriComponentsProto}],response:{type:n.Type.binary()}}]}},50295:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileExtServicePath=t.FileWatcherServicePath=t.ShadowFileServicePath=t.DiskFileServicePath=t.FileServicePath=void 0,t.FileServicePath="FileService",t.DiskFileServicePath="DiskFileService",t.ShadowFileServicePath="ShadowFileService",t.FileWatcherServicePath="FileWatcherService",t.FileExtServicePath="FileExtServicePath"},28217:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatcherProcessManagerProxy=t.WatcherServiceProxy=t.WATCHER_INIT_DATA_KEY=t.SUMI_WATCHER_PROCESS_SOCK_KEY=t.INsfw=void 0;const n=e(86058);var r;(function(o){let l;(function(m){m[m.CREATED=0]="CREATED",m[m.DELETED=1]="DELETED",m[m.MODIFIED=2]="MODIFIED",m[m.RENAMED=3]="RENAMED"})(l=o.actions||(o.actions={}))})(r||(t.INsfw=r={})),t.SUMI_WATCHER_PROCESS_SOCK_KEY="sumi-watcher-process-sock",t.WATCHER_INIT_DATA_KEY="sumi-watcher-init-data",t.WatcherServiceProxy=new n.ProxyIdentifier("WatcherHostServiceImpl"),t.WatcherProcessManagerProxy=new n.ProxyIdentifier("WatcherProcessManagerProxy")},14951:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(42933),t)},57942:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogModel=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(26542),p=e(6250),_=e(2812),s=r.__importDefault(e(89200)),g=e(9018);let c=n=class{static createContainer(u,d){return u.createChild([{token:p.IFileDialogTreeService,useValue:d},{token:p.IFileDialogModel,useClass:n}])}static createModel(u,d){return n.createContainer(u,d).get(p.IFileDialogModel)}constructor(){this.selectedDecoration=new l.Decoration(s.default.mod_selected),this.focusedDecoration=new l.Decoration(s.default.mod_focused),this.loadingDecoration=new l.Decoration(s.default.mod_loading),this.cutDecoration=new l.Decoration(s.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new m.DisposableCollection,this.onDidFocusedFileChangeEmitter=new m.Emitter,this.onDidSelectedFileChangeEmitter=new m.Emitter,this.clearFileSelectedDecoration=()=>{this._selectedFiles.forEach(u=>{this.selectedDecoration.removeTarget(u)}),this._selectedFiles=[],this.onDidSelectedFileChangeEmitter.fire([])},this.activeFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(v=>{this.selectedDecoration.removeTarget(v)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles=[u],this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.selectFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(v=>{this.selectedDecoration.removeTarget(v)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this._selectedFiles=[u],this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.activeFileFocusedDecoration=(u,d=!1)=>{u!==this.treeModel.root&&(this.focusedFile!==u&&(d?(this.preContextMenuFocusedFile?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile)):this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.preContextMenuFocusedFile=u):this.focusedFile&&(this.preContextMenuFocusedFile=null,this.focusedDecoration.removeTarget(this.focusedFile)),u&&(this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles.push(u),this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(v=>v.uri)))),this.treeModel.dispatchChange())},this.activeFileSelectedDecoration=u=>{this._selectedFiles.indexOf(u)>-1||(this._selectedFiles.push(u),this.selectedDecoration.addTarget(u),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(d=>d.uri)),this.treeModel.dispatchChange())},this.activeFileDecorationByRange=(u,d)=>{for(this.clearFileSelectedDecoration(),this.preContextMenuFocusedFile=null;u<=d;u++){const v=this.treeModel.root.getTreeNodeAtIndex(u);v&&(this._selectedFiles.push(v),this.selectedDecoration.addTarget(v))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(v=>v.uri)),this.treeModel.dispatchChange()},this.enactiveFileDecoration=()=>{this.focusedFile&&(this.focusedDecoration.removeTarget(this.focusedFile),this.onDidFocusedFileChangeEmitter.fire(),this.treeModel.dispatchChange()),this._focusedFile=void 0},this.toggleDirectory=async u=>{u.expanded?this.fileTreeHandle.collapseNode(u):this.fileTreeHandle.expandNode(u)},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(u,d)=>{if(!this.focusedFile)this.handleItemClick(u,d);else if(this.focusedFile&&this.focusedFile!==u){const v=this.treeModel.root.getIndexAtTreeNode(u),f=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);f>v?this.activeFileDecorationByRange(v,f):f<v&&this.activeFileDecorationByRange(f,v)}},this.handleItemToggleClick=(u,d)=>{d!==l.TreeNodeType.CompositeTreeNode&&d!==l.TreeNodeType.TreeNode||(this.selectedFiles.indexOf(u)>-1?this.focusedFile===u?this.enactiveFileDecoration():this.activeFileFocusedDecoration(u):this.activeFileSelectedDecoration(u))},this.handleItemClick=(u,d)=>{this.clickTimes++,(d===l.TreeNodeType.CompositeTreeNode||d===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(u),d===l.TreeNodeType.CompositeTreeNode&&this.corePreferences["workbench.list.openMode"]==="singleClick"&&this.toggleDirectory(u),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&d!==l.TreeNodeType.TreeNode&&this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(u),this.clickTimes=0},200)},this.getDirectoryList=()=>this.fileTreeDialogService.getDirectoryList(),this._whenReady=this.initTreeModel()}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get selectedFiles(){return this._selectedFiles}async initTreeModel(){const u=(await this.fileTreeDialogService.resolveChildren())[0];this._treeModel=this.injector.get(_.FileTreeModel,[u]),this.initDecorations(u),this.disposableCollection.push(this._decorations),this.disposableCollection.push(this.labelService.onDidChange(()=>{this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,d=>{this.loadingDecoration.addTarget(d)})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,d=>{this.loadingDecoration.removeTarget(d)}))}async updateTreeModel(u){const d=await this.fileTreeDialogService.resolveRoot(u);if(d&&d.length>0){const v=d[0];this._treeModel=this.injector.get(_.FileTreeModel,[v]),this.clearFileSelectedDecoration(),this.initDecorations(v)}}initDecorations(u){this._decorations&&this._decorations.dispose(),this._decorations=new l.DecorationsManager(u),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}handleTreeHandler(u){this._fileTreeHandle=u}dispose(){this.disposableCollection.dispose()}};t.FileTreeDialogModel=c,c.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",c.DEFAULT_LOCATION_FLUSH_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],c.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(p.IFileDialogTreeService),r.__metadata("design:type",g.FileTreeDialogService)],c.prototype,"fileTreeDialogService",void 0),r.__decorate([(0,o.Autowired)(E.LabelService),r.__metadata("design:type",E.LabelService)],c.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(m.CorePreferences),r.__metadata("design:type",Object)],c.prototype,"corePreferences",void 0),t.FileTreeDialogModel=c=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],c)},69748:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeDialogNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),m=e(41869),E=e(69959),p=n.__importDefault(e(89200)),_=({item:s,onClick:g,itemType:c,labelService:h,leftPadding:u=8,onTwistierClick:d,decorations:v,defaultLeftPadding:f=8,template:a})=>{const b=c===l.TreeNodeType.RenamePrompt,y=c===l.TreeNodeType.NewPrompt,S=b||y,A=(0,m.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),T=(0,m.useDesignStyles)(p.default.file_tree_node,"file_tree_node"),w=K=>{(c===l.TreeNodeType.TreeNode||c===l.TreeNodeType.CompositeTreeNode)&&g(K,s,c)},D=K=>{(c===l.TreeNodeType.TreeNode||c===l.TreeNodeType.CompositeTreeNode)&&(d?d(K,s,c):g(K,s,c))},I=c===l.TreeNodeType.CompositeTreeNode;let O;S?y?O=`${f+(s.parent.depth+1||0)*(u||0)}px`:O=`${f+(s.target.depth||0)*(u||0)}px`:O=I?`${f+(s.depth||0)*(u||0)}px`:`${f+(s.depth||0)*(u||0)+8}px`;const P={height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:O},R=(K,U)=>{if(v&&v?.classlist.indexOf(p.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(S&&K instanceof l.PromptHandle){let Y=!1;if(b?Y=K.target.type===l.TreeNodeType.CompositeTreeNode:Y=K.type===l.TreeNodeType.CompositeTreeNode,Y)return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,A,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:y||!(b&&K.target.type===l.TreeNodeType.CompositeTreeNode&&K.target.expanded)})})}else return o.default.createElement("div",{onClick:U,className:(0,r.default)(p.default.file_tree_node_segment,A,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:!K.expanded})})},M=K=>{let U,Y;S&&K instanceof l.PromptHandle?K instanceof l.RenamePromptHandle?(U=K.target.uri.resolve(K.$.value),Y=E.Directory.is(K.target)):(U=K.parent.uri.resolve(K.$.value),Y=K.type===l.TreeNodeType.CompositeTreeNode):(U=K.uri,Y=K.filestat.isDirectory);const z=h.getIcon(U,{isDirectory:Y});return o.default.createElement("div",{className:(0,r.default)(p.default.file_icon,z,{expanded:Y&&K.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},k=K=>a?o.default.createElement(a,null):S&&K instanceof l.PromptHandle?o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",p.default.file_tree_node_prompt_box)},o.default.createElement(K.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_displayname)},K.name),B=()=>o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_tail)},x()),x=()=>null,N=K=>{if(I)return R(K,D);if(S)return R(K,()=>{})},j=()=>s.tooltip||s.name;return o.default.createElement("div",{key:s.id,onClick:w,title:j(),className:(0,r.default)(T,v?v.classlist:null),style:P,draggable:c===l.TreeNodeType.TreeNode||c===l.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_content)},N(s),M(s),o.default.createElement("div",{className:S?p.default.file_tree_node_prompt_wrap:p.default.file_tree_node_overflow_wrap},k(s)),B()))};t.FileTreeDialogNode=_,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},68195:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(66e3);let m=class{initScopedContext(p){this._contextKeyService=this.globalContextKeyService.createScoped(p),this.fileDialogViewVisibleContext=l.FileDialogViewVisibleContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileDialogContextKey=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"globalContextKeyService",void 0),t.FileDialogContextKey=m=n.__decorate([(0,r.Injectable)()],m)},9018:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),m=e(26542),E=e(54414),p=e(14951),_=e(72665),s=e(51500),g=e(6250),c=e(57781),h=e(97738),u=e(68195);let d=class extends o.Tree{constructor(f){super(),this._whenReady=this.resolveWorkspaceRoot(f)}get whenReady(){return this._whenReady}async resolveWorkspaceRoot(f){if(f){const a=new l.URI(f).withScheme(l.Schemes.file),b=await this.fileTreeAPI.resolveFileStat(a);b&&(this.workspaceRoot=b)}}async resolveChildren(f){if(f){if(f.uri){const{children:a}=await this.fileTreeAPI.resolveChildren(this,f.uri.toString(),f);return a}}else{this.workspaceRoot||(this.workspaceRoot=(await this.workspaceService.roots)[0]);const{children:a}=await this.fileTreeAPI.resolveChildren(this,this.workspaceRoot);return this.root=a[0],a}return[]}async resolveRoot(f){let a;/^file:\/\//.test(f)&&(a=new l.URI(f)),a=l.URI.file(f);const b=await this.fileTreeAPI.resolveFileStat(a);if(b){const{children:y}=await this.fileTreeAPI.resolveChildren(this,b);return this.root=y[0],y}}getDirectoryList(){const f=[];if(!this.root)return f;let a=new l.URI(this.workspaceRoot.uri);if(a&&a.parent)for(;a.parent;){const b=a.codeUri.fsPath;if(f.indexOf(b)>=0)break;f.push(b),a=a.parent}else f.push(a.codeUri.fsPath.toString());return f}sortComparator(f,a){return f.constructor===a.constructor?f.name.startsWith(".")&&!a.name.startsWith(".")?1:!f.name.startsWith(".")&&a.name.startsWith(".")?-1:f.name.localeCompare(a.name,"kn",{numeric:!0}):f.type===o.TreeNodeType.CompositeTreeNode?-1:a.type===o.TreeNodeType.CompositeTreeNode?1:0}initContextKey(f){f&&this.fileDialogContextKey.initScopedContext(f)}get contextKey(){return this.fileDialogContextKey}async saveAs(f){const{oldFilePath:a,newFilePath:b}=f;if(!a||!b)throw new Error("oldFilePath and newFilePath are required");await this.createFile(f);try{const y=l.URI.file(f.newFilePath),S={preview:!1,focus:!0,replace:!0,forceClose:!0,disableNavigate:!1};await this.workbenchEditorService.open(y,S),await this.fileTreeModelService.clearFileSelectedDecoration();const A=this.fileTreeService.getNodeByPathOrUri(y);A&&await this.fileTreeModelService.activeFileDecoration(A)}catch(y){throw new Error(`Failed to open saveAs file: ${y.message}`)}}async createFile(f){try{const{oldFilePath:a,newFilePath:b}=f;if(!await this.fileServiceClient.getFileStat(a))throw new Error(`Source file not found: ${a}`);const{content:S}=await this.fileServiceClient.readFile(a);await this.fileServiceClient.createFile(b,{content:S.toString(),encoding:"utf8",overwrite:!0})}catch(a){throw new Error(`Failed to create file: ${a.message}`)}}dispose(){super.dispose()}};t.FileTreeDialogService=d,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],d.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(m.LabelService),n.__metadata("design:type",m.LabelService)],d.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileDialogContextKey),n.__metadata("design:type",u.FileDialogContextKey)],d.prototype,"fileDialogContextKey",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(E.WorkbenchEditorService),n.__metadata("design:type",E.WorkbenchEditorService)],d.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],d.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(h.FileTreeModelService),n.__metadata("design:type",h.FileTreeModelService)],d.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(g.IFileTreeService),n.__metadata("design:type",c.FileTreeService)],d.prototype,"fileTreeService",void 0),t.FileTreeDialogService=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[String])],d)},51888:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialog=t.FILE_TREE_DIALOG_HEIGHT=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),m=e(68974),E=e(72665),p=e(69748),_=n.__importDefault(e(13294));t.FILE_TREE_DIALOG_HEIGHT=22;const s=({options:g,model:c,isOpenDialog:h,fileService:u})=>{const d=(0,l.useInjectable)(E.IDialogService),v=(0,r.useRef)(null),[f,a]=(0,r.useState)(g.defaultFileName||""),[b,y]=(0,r.useState)(!1),[S,A]=(0,r.useState)(""),[T,w]=(0,r.useState)([]);(0,r.useEffect)(()=>{var Z;return c&&(y(!1),O(),(Z=u.contextKey.fileDialogViewVisibleContext)===null||Z===void 0||Z.set(!0)),()=>{c.dispose()}},[c]),(0,r.useEffect)(()=>{g.defaultFileName&&a(g.defaultFileName)},[g]),(0,r.useEffect)(()=>{if(b){const Z=c.getDirectoryList();w(Z)}},[b]);const D=(0,r.useCallback)(()=>{const Z=c.selectedFiles.map($=>$.uri.path.toString());if(f&&g.showNameInput&&(Z?.length===1||g.defaultUri)){const $=Z?.length===1?Z[0]:g.defaultUri.path.toString();g?.saveAs&&u.saveAs({oldFilePath:l.path.join($,g?.defaultFileName||""),newFilePath:l.path.join($,f)}),d.hide([l.path.join($,f)])}else Z.length>0?d.hide(Z):g.defaultUri?d.hide([g.defaultUri.path.toString()]):c.treeModel&&c.treeModel.root?d.hide([c.treeModel.root.uri.path.toString()]):d.hide([]);y(!1),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d,c,f,g]),I=(0,r.useCallback)(()=>{y(!1),d.hide(),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d]),O=(0,r.useCallback)(async()=>{await c.whenReady,await c.treeModel.ensureReady,A(c.treeModel.root.uri.codeUri.fsPath),y(!0)},[c,S,b]),P=!h,R=(0,r.useCallback)(Z=>{c.handleTreeHandler({...Z,getModel:()=>c.treeModel})},[c]),M=(0,r.useCallback)((Z,$)=>{Z.stopPropagation();const{toggleDirectory:H}=c;H($)},[c]),k=(0,r.useCallback)(Z=>B(Z)?!1:Z.shiftKey,[]),B=(0,r.useCallback)(Z=>{const{metaKey:$,ctrlKey:H}=Z;return l.isMacintosh&&$||H},[]),x=(0,r.useCallback)((Z,$,H)=>{var X;Z.stopPropagation();const{handleItemClick:J,handleItemToggleClick:re,handleItemRangeClick:ce}=c;if(!$)return;const fe=k(event),Ae=B(event);if(fe&&!P&&g.canSelectMany)ce($,H);else if(Ae&&!P&&g.canSelectMany)re($,H);else if(P)H===o.TreeNodeType.CompositeTreeNode&&J($,H);else if(g.canSelectFiles&&H===o.TreeNodeType.TreeNode){const te=new Set(Object.values((X=g.filters)!==null&&X!==void 0?X:{}).flat().map(Le=>`.${Le}`));if(te.size>0){const Le=l.URI.parse($.filestat.uri).path.ext;te.has(Le)&&J($,H)}else J($,H)}else g.canSelectFolders&&H===o.TreeNodeType.CompositeTreeNode&&J($,H)},[c,P,g]),N=(0,r.useCallback)(async Z=>{y(!1),A(Z),await c.updateTreeModel(Z),y(!0)},[c,b,S]),j=(0,r.useCallback)(async Z=>{y(!1),A(Z),await c.updateTreeModel(Z),y(!0)},[c,b,S,T]),K=(0,r.useCallback)(Z=>r.default.createElement(p.FileTreeDialogNode,{item:Z.item,itemType:Z.itemType,labelService:c.labelService,decorations:c.decorations.getDecorations(Z.item),onClick:x,onTwistierClick:M,defaultLeftPadding:8,leftPadding:8}),[c.treeModel]),U=(0,r.useCallback)(()=>{if(b){if(c.treeModel)return r.default.createElement(o.RecycleTree,{height:300,itemHeight:t.FILE_TREE_DIALOG_HEIGHT,onReady:R,model:c.treeModel},K)}else return r.default.createElement(m.Progress,{loading:!0})},[b,c]),Y=(0,r.useCallback)(()=>{if(T.length>0)return r.default.createElement(o.Select,{onChange:N,onSearchChange:j,className:_.default.select_control,size:"large",searchPlaceholder:S,value:S,showSearch:!0},T.map((Z,$)=>r.default.createElement(o.Option,{value:Z,key:`${$} - ${Z}`},Z)))},[T,S]),z=(0,r.useCallback)(Z=>{const{key:$}=l.KeyCode.createKeyCode(Z),H=Z.shiftKey||Z.metaKey||Z.altKey||Z.ctrlKey;$&&l.Key.ENTER.keyCode===$.keyCode&&!H&&D()},[D]);(0,r.useEffect)(()=>{var Z;return v.current&&(u.initContextKey(v.current),u.contextKey.fileDialogViewVisibleContext.set(!0),(Z=v.current)===null||Z===void 0||Z.addEventListener("keyup",z)),()=>{var $;($=v.current)===null||$===void 0||$.removeEventListener("keyup",z)}},[]);const G=(0,r.useMemo)(()=>r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.file_dialog_directory},Y()),r.default.createElement("div",{className:_.default.file_dialog_content},U())),[Y,U]),Q=(0,r.useMemo)(()=>r.default.createElement("div",{className:_.default.file_dialog_buttons},r.default.createElement(o.Button,{onClick:I,type:"secondary",className:_.default.button},(0,l.localize)("dialog.file.close")),r.default.createElement(o.Button,{onClick:D,type:"primary",className:_.default.button,disabled:P&&g.showNameInput&&f.length===0},h&&g.openLabel||(0,l.localize)("dialog.file.ok"))),[I,D,P,h,f,g]);return r.default.createElement("div",{className:_.default.file_dialog_wrapper,ref:v},r.default.createElement("div",{className:_.default.file_dialog_directory_title},h?g.title||(0,l.localize)("dialog.file.openLabel"):g.saveLabel||(0,l.localize)("dialog.file.saveLabel")),G,!h&&g.showNameInput&&r.default.createElement("div",{className:_.default.file_dialog_file_container},r.default.createElement("span",{className:_.default.file_dialog_file_name},(0,l.localize)("dialog.file.name"),": "),r.default.createElement(o.Input,{size:"small",value:f,autoFocus:!0,selection:{start:0,end:f.indexOf(".")||f.length},onChange:Z=>a(Z.target.value)})),Q)};t.FileDialog=s},89508:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowDialogServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(41869),m=e(37406),E=e(14951),p=e(72665),_=e(57942),s=n.__importDefault(e(13294)),g=e(9018),c=e(51888);let h=class{constructor(){this.idx=1,this._whenReady=this.init()}async init(){this.recentGlobalStorage=await this.storageProvider(l.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA);const d=await this.recentGlobalStorage.get("RECENT_DIALOG_DEFAULT_URI");if(d)this._defaultUri=new l.URI(d);else{const v=await this.fileServiceClient.getCurrentUserHome();this._defaultUri=new l.URI(v.uri)}}get defaultUri(){return this._defaultUri}get whenReady(){return this._whenReady}async updateRecentDefaultUri(d){this.recentGlobalStorage.set("RECENT_DIALOG_DEFAULT_URI",d.toString()),this._defaultUri=d}async showOpenDialog(d={}){this.dialogService.reset(),await this.whenReady;const v={canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1};if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const f=this.injector.get(m.IElectronMainUIService),a=[];d.canSelectFiles&&a.push("openFile"),d.canSelectFolders&&a.push("openDirectory"),d.canSelectMany&&a.push("multiSelections"),l.isMacintosh&&a.push("treatPackageAsDirectory","createDirectory");const b=d.defaultUri||this.defaultUri,y=await f.showOpenDialog(l.electronEnv.currentWindowId,{defaultPath:b.codeUri.fsPath,title:d.title,buttonLabel:d.openLabel,properties:a});if(y&&y.length>0){const S=y.map(A=>l.URI.file(A));return this.updateRecentDefaultUri(S[0].parent),S}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let f;d.defaultUri?f=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):f=this.injector.get(g.FileTreeDialogService),await f.whenReady;const a=_.FileTreeDialogModel.createModel(this.injector,f),b=await this.dialogService.open({message:r.default.createElement(c.FileDialog,{key:this.idx++,fileService:f,model:a,options:{...v,...d},isOpenDialog:!0}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),b&&b.length>0){const y=b.map(S=>l.URI.file(S));return this.updateRecentDefaultUri(y[0].parent),y}else return}}async showSaveDialog(d={}){if(await this.whenReady,this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const v=d.defaultUri||this.defaultUri,a=await this.injector.get(m.IElectronMainUIService).showSaveDialog(l.electronEnv.currentWindowId,{defaultPath:v.resolve(d.defaultFileName||"").codeUri.fsPath,title:d.saveLabel,message:d.saveLabel});if(a){const b=l.URI.file(a);return this.updateRecentDefaultUri(b.parent),b}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let v;d.defaultUri?v=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):v=this.injector.get(g.FileTreeDialogService),await v.whenReady;const f=_.FileTreeDialogModel.createModel(this.injector,v),a=await this.dialogService.open({message:r.default.createElement(c.FileDialog,{key:this.idx++,fileService:v,model:f,options:d,isOpenDialog:!1}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),a&&a.length>0){const b=l.URI.file(a[0]);return this.updateRecentDefaultUri(b.parent),b}else return}}};t.WindowDialogServiceImpl=h,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(p.IDialogService),n.__metadata("design:type",Object)],h.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(E.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(l.StorageProvider),n.__metadata("design:type",Function)],h.prototype,"storageProvider",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),t.WindowDialogServiceImpl=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},88014:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413);let m=class{constructor(){this.explorerResourceIsFolder=l.ExplorerResourceIsFolderContext.bind(this.globalContextKeyService),this.explorerViewletVisibleContext=l.ExplorerViewletVisibleContext.bind(this.globalContextKeyService)}initScopedContext(p){this._contextKeyService=this.globalContextKeyService.createScoped(p),this.explorerFocused=l.ExplorerFocusedContext.bind(this._contextKeyService),this.explorerResourceCut=l.ExplorerResourceCut.bind(this._contextKeyService),this.filesExplorerFocused=l.FilesExplorerFocusedContext.bind(this._contextKeyService),this.filesExplorerInputFocused=l.FilesExplorerInputFocusedContext.bind(this._contextKeyService),this.filesExplorerFilteredContext=l.FilesExplorerFilteredContext.bind(this._contextKeyService),this.explorerCompressedFocusContext=l.ExplorerCompressedFocusContext.bind(this._contextKeyService),this.explorerCompressedFirstFocusContext=l.ExplorerCompressedFirstFocusContext.bind(this._contextKeyService),this.explorerCompressedLastFocusContext=l.ExplorerCompressedLastFocusContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileContextKey=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"globalContextKeyService",void 0),t.FileContextKey=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},40439:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413),m=e(93899),E=e(68969),p=e(98295),_=e(41893),s=e(54414),g=e(32595),c=e(63067),h=e(58296),u=e(72665),d=e(51500),v=e(6250),f=e(69959),a=e(56384),b=e(57781),y=e(97738),S=e(4446);let A=class{constructor(){this._disposables=new o.DisposableStore,this.isRendered=!1,this.deleteThrottler=new o.Throttler,this.willDeleteUris=[]}initialize(){this.workspaceService.initFileServiceExclude().then(async()=>{await this.fileTreeService.init(),this.fileTreeModelService.initTreeModel()}),this.progressService.registerProgressIndicator(g.EXPLORER_CONTAINER_ID)}async onStart(){this.viewsRegistry.registerViewWelcomeContent(v.RESOURCE_VIEW_ID,{content:(0,o.formatLocalize)("welcome-view.noFolderHelp",o.FILE_COMMANDS.OPEN_FOLDER.id),group:h.ViewContentGroups.Open,order:1}),this.mainLayoutService.collectViewComponent({id:v.RESOURCE_VIEW_ID,name:this.getWorkspaceTitle(),weight:3,priority:9,collapsed:!1,component:a.FileTree},g.EXPLORER_CONTAINER_ID),this._disposables.add(this.workspaceService.onWorkspaceLocationChanged(()=>{const w=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);w&&w.updateViewTitle(v.RESOURCE_VIEW_ID,this.getWorkspaceTitle())}))}onDidStart(){const w=this.injector.get(S.SymlinkDecorationsProvider,[this.fileTreeService]);this.decorationService.registerDecorationsProvider(w)}onDidRender(){this.isRendered=!0;const w=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);w&&(this.fileTreeModelService.whenReady.then(()=>{this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(w.isActivated())}),w.onActivate(()=>{this.fileTreeModelService.performLocationOnHandleShow(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!0)}),w.onInActivate(()=>{this.fileTreeModelService.handleTreeBlur(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!1)}))}getWorkspaceTitle(){let w=(0,o.localize)("file.empty.defaultTitle");const D=this.workspaceService.workspace;return D&&(w=new o.URI(D.uri).displayName,!D.isDirectory&&w.endsWith(`.${this.workspaceService.workspaceSuffixName}`)&&(w=w.slice(0,w.lastIndexOf(".")),w===d.UNTITLED_WORKSPACE))?(0,o.localize)("file.workspace.defaultTip"):w}onReconnect(){this.fileTreeService.reWatch()}revealFile(w){if(w)if(this.isRendered){const D=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!D||!D.isVisible||D.isCollapsed(v.RESOURCE_VIEW_ID)?this.fileTreeModelService.locationOnShow(w):this.fileTreeModelService.location(w)}else this.fileTreeModelService.locationOnShow(w)}registerMenus(w){w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new")},order:1,group:"0_new"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new")},order:2,group:"0_new"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.removeFolderFromWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_RESOURCES.id,label:(0,o.localize)("file.open")},order:1,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("file.open.side")},order:2,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TYPE_WITH.id,label:(0,o.localize)("file.open.type")},order:3,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH.id,label:(0,o.localize)("file.filetree.openTerminalWithPath")},when:"workbench.panel.terminal",order:4,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.SEARCH_ON_FOLDER.id,label:(0,o.localize)("file.search.folder")},order:1,group:"2_search"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.DELETE_FILE.id,label:(0,o.localize)("file.delete")},order:1,group:"7_modification"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.RENAME_FILE.id,label:(0,o.localize)("file.rename")},order:3,group:"7_modification"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("file.compare")},order:2,group:"3_compare"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_FILE.id,label:(0,o.localize)("file.copy.file")},order:1,group:"5_cutcopypaste"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.CUT_FILE.id,label:(0,o.localize)("file.cut.file")},order:2,group:"5_cutcopypaste"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.PASTE_FILE.id,label:(0,o.localize)("file.paste.file")},order:3,group:"5_cutcopypaste"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_PATH.id,label:(0,o.localize)("file.copy.path")},group:"6_copypath"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("file.copy.relativepath")},group:"6_copypath"})}registerCommands(w){const D=()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()};w.registerCommand(o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH,{execute:O=>{let P=O;if(!P)return;const R=this.fileTreeService.getNodeByPathOrUri(P);R&&!R.filestat.isDirectory&&(P=R.uri.parent),this.commandService.executeCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH.id,P)}}),w.registerCommand(o.FILE_COMMANDS.SEARCH_ON_FOLDER,{execute:async O=>{var P;let R=O;if(R||(this.fileTreeModelService.focusedFile?R=this.fileTreeModelService.focusedFile.uri:this.fileTreeModelService.selectedFiles.length>0&&(R=(P=this.fileTreeModelService.selectedFiles[0])===null||P===void 0?void 0:P.uri)),!R)return;let M;if(this.fileTreeService.isMultipleWorkspace)for(const k of await this.workspaceService.roots){const B=new o.URI(k.uri);if(B.isEqualOrParent(R)){M=`./${B.relative(R).toString()}`;break}}else if(this.workspaceService.workspace){const k=new o.URI(this.workspaceService.workspace.uri);k.isEqualOrParent(R)&&(M=`./${k.relative(R).toString()}`)}this.commandService.executeCommand(o.SEARCH_COMMANDS.OPEN_SEARCH.id,{includeValue:M+"/"})},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.LOCATION,{execute:O=>{O?this.revealFile(O):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0&&this.revealFile(this.fileTreeModelService.selectedFiles[0].uri)}}),w.registerCommand(o.FILE_COMMANDS.LOCATION_WITH_EDITOR,{execute:()=>{var O,P,R;((P=(O=this.workbenchEditorService.currentEditor)===null||O===void 0?void 0:O.currentUri)===null||P===void 0?void 0:P.scheme)===o.Schemes.file&&this.revealFile((R=this.workbenchEditorService.currentEditor)===null||R===void 0?void 0:R.currentUri)}}),w.registerCommand(o.FILE_COMMANDS.COLLAPSE_ALL,{execute:()=>{const O=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!O||!O.isVisible||this.fileTreeModelService.collapseAll()}}),w.registerCommand(o.FILE_COMMANDS.REFRESH_ALL,{execute:async()=>{const O=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!O||!O.isVisible||await this.fileTreeService.refresh()}}),w.registerCommand(o.FILE_COMMANDS.DELETE_FILE,{execute:(O,P)=>{if(D(),P?this.willDeleteUris=this.willDeleteUris.concat(P):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0?this.willDeleteUris=this.willDeleteUris.concat(this.fileTreeModelService.selectedFiles.map(R=>R.uri)):this.fileTreeModelService.focusedFile&&this.willDeleteUris.push(this.fileTreeModelService.focusedFile.uri),this.willDeleteUris.length!==0)return this.deleteThrottler.queue(this.doDelete.bind(this))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.RENAME_FILE,{execute:O=>{if(D(),!O)if(this.fileTreeModelService.contextMenuFile)O=this.fileTreeModelService.contextMenuFile.uri;else if(this.fileTreeModelService.focusedFile)O=this.fileTreeModelService.focusedFile.uri;else return;this.fileTreeModelService.renamePrompt(O)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.NEW_FILE,{execute:async O=>{var P;if(D(),O)this.fileTreeModelService.newFilePrompt(O);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let R;this.fileTreeService.isMultipleWorkspace?R=new o.URI((await this.workspaceService.roots)[0].uri):R=new o.URI((P=this.workspaceService.workspace)===null||P===void 0?void 0:P.uri),this.fileTreeModelService.newFilePrompt(R)}}}),w.registerCommand(o.FILE_COMMANDS.NEW_FOLDER,{execute:async O=>{var P;if(D(),O)this.fileTreeModelService.newDirectoryPrompt(O);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let R;this.fileTreeService.isMultipleWorkspace?R=new o.URI((await this.workspaceService.roots)[0].uri):R=new o.URI((P=this.workspaceService.workspace)===null||P===void 0?void 0:P.uri),this.fileTreeModelService.newDirectoryPrompt(R)}}}),w.registerCommand(o.FILE_COMMANDS.COMPARE_SELECTED,{execute:(O,P)=>{if(P&&P.length){const R=this.workbenchEditorService.currentEditor;R&&R.currentUri&&this.fileTreeService.compare(P[0],R.currentUri)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.OPEN_RESOURCES,{execute:O=>{this.fileTreeService.openAndFixedFile(O)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.OPEN_TO_THE_SIDE,{execute:O=>{this.fileTreeService.openToTheSide(O)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)});const I=(O,P)=>{const{availableOpenTypes:R,currentOpenType:M}=this.workbenchEditorService.currentEditorGroup;if(!(R&&O&&M))return{items:[],selectIndex:-1};const k=this.preferenceService.get("workbench.editorAssociations"),B=[],x=(U,Y)=>Y.type===s.EditorOpenType.code?U.type===s.EditorOpenType.code:Y.type===s.EditorOpenType.component&&U.type===s.EditorOpenType.component?U.componentId===Y.componentId:!1,N=(U,Y)=>(U?U+=(0,o.localize)("file.open.type.detail.and")+Y:U=Y,U);let j,K;if(k){const U=Object.keys(k).find(Y=>(0,o.match)(Y,O.path.toString().toLowerCase())||(0,o.match)(Y,O.path.base.toLowerCase()));j=U&&k[U]}return R.forEach((U,Y)=>{var z;const G={label:U.title||U.componentId||U.type,detail:U.title,run:Q=>P(Q,U)};x(M,U)&&(G.description=N(G.description,(0,o.localize)("file.open.type.detail.active")),K=Y),j&&(!((z=U.componentId)===null||z===void 0)&&z.endsWith(j))&&(G.description=N(G.description,(0,o.localize)("file.open.type.detail.default"))),B.push(new o.QuickOpenItem(G))}),{items:B,selectIndex:K}};w.registerCommand(o.FILE_COMMANDS.OPEN_TYPE_WITH,{execute:O=>{const P=(B,x)=>{var N,j;return B===o.Mode.OPEN?((N=this.workbenchEditorService.currentEditorGroup)===null||N===void 0||N.changeOpenType((j=x.componentId)!==null&&j!==void 0?j:x.type),!0):!1},{items:R,selectIndex:M}=I(O,P);if(R.length===0||typeof M>"u")return;const k=B=>{this.quickOpenService.open({onType:(x,N)=>N(B)},{fuzzyMatchLabel:!0,ignoreFocusOut:!1,placeholder:(0,o.formatLocalize)("file.open.type.placeholder",O.path.base),selectIndex:()=>M})};R.push(new o.QuickOpenItem({label:(0,o.formatLocalize)("file.open.type.preference.default",`*${O.path.ext}`),showBorder:!0,run:B=>{if(B===o.Mode.OPEN){const x=(K,U)=>{var Y,z,G;if(K===o.Mode.OPEN){const Q="workbench.editorAssociations",Z=this.preferenceService.resolve(Q).scope,$=this.preferenceService.get(Q);return this.preferenceService.set(Q,{...$||{},[`*${O.path.ext}`]:(Y=U.componentId)!==null&&Y!==void 0?Y:U.type},Z),(z=this.workbenchEditorService.currentEditorGroup)===null||z===void 0||z.changeOpenType((G=U.componentId)!==null&&G!==void 0?G:U.type),!0}return!1},{items:N,selectIndex:j}=I(O,x);if(N.length===0||typeof j>"u")return!0;k(N)}return!1}})),k(R)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.COPY_PATH,{execute:async O=>{if(!O)return;let R=O.path.toString();if(O.scheme===s.DIFF_SCHEME){const k=O.getParsedQuery();R=new o.URI(k.modified).path.toString()}let M=decodeURIComponent(R);await this.appService.backendOS===o.OperatingSystem.Windows&&(M=M.slice(1)),await this.clipboardService.writeText(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),w.registerCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH,{execute:async O=>{if(!O)return;if(O.scheme===s.DIFF_SCHEME){const R=O.getParsedQuery();O=new o.URI(R.modified).withScheme("file")}let P;if(this.fileTreeService.isMultipleWorkspace)for(const R of await this.workspaceService.roots){if(P=new o.URI(R.uri),P.isEqual(O))return await this.clipboardService.writeText("./");if(P.isEqualOrParent(O))return await this.clipboardService.writeText(decodeURIComponent(P.relative(O).toString()))}else if(this.workspaceService.workspace)return P=new o.URI(this.workspaceService.workspace.uri),P.isEqual(O)?await this.clipboardService.writeText("./"):await this.clipboardService.writeText(decodeURIComponent(P.relative(O).toString()))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),w.registerCommand(o.FILE_COMMANDS.COPY_FILE,{execute:(O,P)=>{if(P&&P.length)this.fileTreeModelService.copyFile(P);else{const R=this.fileTreeModelService.selectedFiles.map(M=>M.uri);R&&R.length&&this.fileTreeModelService.copyFile(R)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.SELECT_CURRENT_NODE,{execute:(O,P)=>{if(P&&P.length)this.fileTreeModelService.selectChildNode(P);else{const R=this.fileTreeModelService.selectedFiles.map(M=>M.uri);R&&R.length&&this.fileTreeModelService.selectChildNode(R)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.CUT_FILE,{execute:(O,P)=>{if(P&&P.length)this.fileTreeModelService.cutFile(P);else{const R=this.fileTreeModelService.selectedFiles.map(M=>M.uri);R&&R.length&&this.fileTreeModelService.cutFile(R)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.PASTE_FILE,{execute:O=>{if(D(),O)this.fileTreeModelService.pasteFile(O);else if(this.fileTreeModelService.focusedFile){let P;this.fileTreeModelService.activeUri?P=this.fileTreeModelService.activeUri:P=this.fileTreeModelService.focusedFile.uri,this.fileTreeModelService.pasteFile(P)}},isEnabled:()=>this.fileTreeModelService.pasteStore&&this.fileTreeModelService.pasteStore.type!==v.PasteTypes.NONE||this.appConfig.isElectronRenderer}),w.registerCommand(o.FILE_COMMANDS.VSCODE_OPEN_FOLDER,{execute:(O,P)=>{const R=this.injector.get(o.IWindowService),M={newWindow:!0};return typeof P=="boolean"?M.newWindow=P:M.newWindow=typeof P?.forceNewWindow=="boolean"?P.forceNewWindow:!0,O?R.openWorkspace(O,M):this.commandService.executeCommand(o.FILE_COMMANDS.OPEN_FOLDER.id,M)},isVisible:()=>{const O=this.preferenceService.get("application.supportsOpenFolder");return O??!1}}),w.registerCommand(o.FILE_COMMANDS.OPEN_FOLDER,{execute:O=>{const P=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),properties:["openDirectory"]}).then(M=>{M&&M.length>0&&P.openWorkspace(o.URI.file(M[0]),O||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),canSelectFiles:!1,canSelectFolders:!0}).then(M=>{var k;M&&M.length>0&&this.injector.get(d.IWorkspaceService).open(M[0],{preserveWindow:(k=O?.newWindow)!==null&&k!==void 0?k:!1})})},isVisible:()=>{const O=this.preferenceService.get("application.supportsOpenFolder");return O??!1}}),w.registerCommand(o.FILE_COMMANDS.OPEN_WORKSPACE,{execute:O=>{if(!this.preferenceService.get("application.supportsOpenWorkspace"))return;const R=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),properties:["openFile"],filters:[{name:(0,o.localize)("workspace.openWorkspaceTitle"),extensions:[this.workspaceService.workspaceSuffixName]}]}).then(k=>{k&&k.length>0&&R.openWorkspace(o.URI.file(k[0]),O||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,filters:{workspace:[this.workspaceService.workspaceSuffixName]}}).then(k=>{var B;k&&k.length>0&&this.injector.get(d.IWorkspaceService).open(k[0],{preserveWindow:(B=O?.newWindow)!==null&&B!==void 0?B:!1})})},isVisible:()=>{const O=this.preferenceService.get("application.supportsOpenWorkspace");return O??!1}}),w.registerCommand(o.FILE_COMMANDS.REVEAL_IN_EXPLORER,{execute:O=>{var P;let R=O instanceof o.URI?O:O?.uri;const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);M&&!M.isVisible&&M.activate(),M&&M.isCollapsed(v.RESOURCE_VIEW_ID)&&M?.setCollapsed(v.RESOURCE_VIEW_ID,!1),!R&&(!((P=this.workbenchEditorService.currentEditor)===null||P===void 0)&&P.currentUri)&&(R=this.workbenchEditorService.currentEditor.currentUri),R&&this.revealFile(o.URI.parse(R.toString()))}}),w.registerCommand(o.FILE_COMMANDS.FOCUS_FILES,{execute:()=>{const O=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);O&&O.activate()}}),w.registerCommand(o.FILE_COMMANDS.OPEN_FILE,{execute:O=>this.windowDialogService.showOpenDialog(O)}),w.registerCommand(o.FILE_COMMANDS.SAVE_FILE,{execute:O=>this.windowDialogService.showSaveDialog(O)}),w.registerCommand(o.FILE_COMMANDS.FILTER_TOGGLE,{execute:()=>this.fileTreeService.toggleFilterMode()}),w.registerCommand(o.FILE_COMMANDS.FILTER_OPEN,{execute:()=>{if(!this.fileTreeService.filterMode)return this.fileTreeService.toggleFilterMode()}}),w.registerCommand(o.FILE_COMMANDS.FILTER_CLOSE,{execute:()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()}}),w.registerCommand(o.FILE_COMMANDS.NEXT,{execute:()=>{this.fileTreeModelService.moveToNext()}}),w.registerCommand(o.FILE_COMMANDS.PREV,{execute:()=>{this.fileTreeModelService.moveToPrev()}}),w.registerCommand(o.FILE_COMMANDS.COLLAPSE,{execute:()=>{this.fileTreeModelService.collapseCurrentFile()}}),w.registerCommand(o.FILE_COMMANDS.EXPAND,{execute:()=>{this.fileTreeModelService.expandCurrentFile()}}),w.registerCommand(o.FILE_COMMANDS.TOGGLE_OR_OPEN,{execute:()=>{this.fileTreeModelService.toggleOrOpenCurrentFile()}}),w.registerCommand(o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER,{execute:async(O,P)=>{if(D(),!P.length||!this.workspaceService.isMultiRootWorkspaceOpened)return;const R=await this.workspaceService.roots,M=P.filter(k=>R.find(B=>B.uri===k.toString()));M.length>0&&await this.workspaceService.removeRoots(M)},isVisible:()=>this.workspaceService.isMultiRootWorkspaceOpened&&!!this.fileTreeModelService.contextMenuFile&&!!this.workspaceService.tryGetRoots().find(O=>{var P;return O.uri===((P=this.fileTreeModelService.contextMenuFile)===null||P===void 0?void 0:P.uri.toString())})})}registerKeybindings(w){w.registerKeybinding({command:o.FILE_COMMANDS.COPY_FILE.id,keybinding:"ctrlcmd+c",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.PASTE_FILE.id,keybinding:"ctrlcmd+v",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.CUT_FILE.id,keybinding:"ctrlcmd+x",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.SELECT_CURRENT_NODE.id,keybinding:"ctrlcmd+a",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.RENAME_FILE.id,keybinding:"enter",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.DELETE_FILE.id,keybinding:"ctrlcmd+backspace",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.FILTER_OPEN.id,keybinding:"ctrlcmd+f",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.FILTER_CLOSE.id,keybinding:"esc",when:`${l.FilesExplorerFocusedContext.raw} && ${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.NEXT.id,keybinding:"down",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.PREV.id,keybinding:"up",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.EXPAND.id,keybinding:"right",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.COLLAPSE.id,keybinding:"left",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.TOGGLE_OR_OPEN.id,keybinding:"space",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`})}registerToolbarItems(w){w.registerItem({id:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,command:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,label:(0,o.localize)("file.location"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !config.explorer.autoReveal && !${l.FilesExplorerFilteredContext.raw}`,order:0}),w.registerItem({id:o.FILE_COMMANDS.NEW_FILE.id,command:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:1}),w.registerItem({id:o.FILE_COMMANDS.NEW_FOLDER.id,command:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:2}),w.registerItem({id:o.FILE_COMMANDS.FILTER_TOGGLE.id,command:o.FILE_COMMANDS.FILTER_TOGGLE.id,label:(0,o.localize)("file.filetree.filter"),viewId:v.RESOURCE_VIEW_ID,toggledWhen:`${l.FilesExplorerFilteredContext.raw}`,order:3}),w.registerItem({id:o.FILE_COMMANDS.REFRESH_ALL.id,command:o.FILE_COMMANDS.REFRESH_ALL.id,label:(0,o.localize)("file.refresh"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:4}),w.registerItem({id:o.FILE_COMMANDS.COLLAPSE_ALL.id,command:o.FILE_COMMANDS.COLLAPSE_ALL.id,label:(0,o.localize)("file.collapse"),viewId:v.RESOURCE_VIEW_ID,order:5}),w.registerItem({id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,command:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace"),viewId:v.RESOURCE_VIEW_ID,order:0,group:"file_explore_workspace",when:"config.workspace.supportMultiRootWorkspace"})}doDelete(){const w=this.willDeleteUris.slice();return this.willDeleteUris=[],this.fileTreeModelService.deleteFileByUris(w)}dispose(){this._disposables.dispose()}};t.FileTreeContribution=A,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],A.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.IFileTreeService),n.__metadata("design:type",b.FileTreeService)],A.prototype,"fileTreeService",void 0),n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],A.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(E.IProgressService),n.__metadata("design:type",Object)],A.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(d.IWorkspaceService),n.__metadata("design:type",Object)],A.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(y.FileTreeModelService),n.__metadata("design:type",y.FileTreeModelService)],A.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(_.IDecorationsService),n.__metadata("design:type",_.IDecorationsService)],A.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),n.__metadata("design:type",s.WorkbenchEditorService)],A.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],A.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(u.IWindowDialogService),n.__metadata("design:type",Object)],A.prototype,"windowDialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],A.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],A.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],A.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(c.IViewsRegistry),n.__metadata("design:type",Object)],A.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],A.prototype,"appService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],A.prototype,"appConfig",void 0),t.FileTreeContribution=A=n.__decorate([(0,p.Domain)(m.MenuContribution,o.CommandContribution,o.KeybindingContribution,o.TabBarToolbarContribution,o.ClientAppContribution,c.MainLayoutContribution)],A)},2812:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModel=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(69959),p=e(93239);let _=n=class extends l.TreeModel{constructor(g){super(),this.flushDispatchChangeDelayer=new m.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(g)}init(g){this.root=g,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,this.doDispatchChange.bind(this)),this.decorationService.onDidChange(this.doDispatchChange.bind(this))}doDispatchChange(){this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})}};t.FileTreeModel=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(p.FileTreeDecorationService),r.__metadata("design:type",p.FileTreeDecorationService)],_.prototype,"decorationService",void 0),t.FileTreeModel=_=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[E.Directory])],_)},46377:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),m=e(41869),E=e(69959),p=n.__importDefault(e(89200)),{Path:_}=m.path,s=({item:g,onClick:c,onDoubleClick:h,onContextMenu:u,dndService:d,itemType:v,decorationService:f,labelService:a,leftPadding:b=8,onTwistierClick:y,decorations:S,defaultLeftPadding:A=8,template:T,hasFolderIcons:w,hasFileIcons:D,hidesExplorerArrows:I,hasPrompt:O,iconService:P})=>{const[R,M]=o.default.useState(-1),k=v===l.TreeNodeType.RenamePrompt,B=v===l.TreeNodeType.NewPrompt,x=k||B,N=!x&&g.name.indexOf(_.separator)>=0,j=(0,m.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),K=(0,m.useDesignStyles)(p.default.file_tree_node,"file_tree_node"),U=x?null:f.getDecoration(g.uri,E.Directory.is(g)),Y=we=>{(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&(N&&M(g.name.split(_.separator).length-1),c(we,g,v))},z=we=>{(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&(N&&M(g.name.split(_.separator).length-1),h(we,g,v))},G=we=>{(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&(y?y(we,g,v):c(we,g,v))},Q=o.default.useCallback(we=>{we.nativeEvent.which!==0&&(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&u(we,g,v)},[u,g]),Z=o.default.useCallback(we=>{const{handleDragStart:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),$=o.default.useCallback(we=>{const{handleDragLeave:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),H=o.default.useCallback(we=>{const{handleDragEnter:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),X=o.default.useCallback(we=>{const{handleDrop:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),J=o.default.useCallback(we=>{const{handleDragOver:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]);let re=v===l.TreeNodeType.CompositeTreeNode,ce;x?B?(re=g.type===l.TreeNodeType.CompositeTreeNode,ce=`${A+(g.parent.depth+1||0)*(b||0)+(re?0:w?I?0:20:0)}px`):(re=g.target.type===l.TreeNodeType.CompositeTreeNode,ce=`${A+(g.target.depth||0)*(b||0)+(re?0:w?I?0:20:0)}px`):ce=`${A+(g.depth||0)*(b||0)+(re?0:w?I?0:20:0)}px`;const fe={color:U?U.color:"",height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:ce,opacity:O&&!x?".6":"1"},Ae=(we,ve)=>{if(S&&S?.classlist.indexOf(p.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(x&&we instanceof l.PromptHandle){let be=!1;if(k?be=we.target.type===l.TreeNodeType.CompositeTreeNode:be=we.type===l.TreeNodeType.CompositeTreeNode,be)return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,j,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:B||!(k&&we.target.type===l.TreeNodeType.CompositeTreeNode&&we.target.expanded)})})}else return o.default.createElement("div",{onClick:ve,className:(0,r.default)(p.default.file_tree_node_segment,j,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:!we.expanded})})},te=we=>{let ve,be;x&&we instanceof l.PromptHandle?we instanceof l.RenamePromptHandle?(ve=we.target.uri.resolve(we.$.value),be=E.Directory.is(we.target)):(ve=we.parent.uri.resolve(we.$.value),be=we.type===l.TreeNodeType.CompositeTreeNode):(ve=we.uri,be=we.filestat.isDirectory);const Ce=a.getIcon(ve,{isDirectory:be,isOpenedDirectory:be&&we.expanded});return be&&!w||!be&&!D?null:o.default.createElement("div",{className:(0,r.default)(p.default.file_icon,Ce,{expanded:be&&we.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},Le=we=>{if(T)return o.default.createElement(T,null);if(x&&we instanceof l.PromptHandle)return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",p.default.file_tree_node_prompt_box)},o.default.createElement(we.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}})));if(N){const ve=we.displayName.split(_.separator),be=ve.map((Ce,Ne)=>{const tt=ve.slice(0,Ne+1).join(_.separator),Fe=ze=>{ze.stopPropagation(),M(Ne);const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));c(ze,g,v,Qe)},$e=ze=>{ze.stopPropagation(),M(Ne);const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));u(ze,g,v,Qe)},Se=ze=>{ze.stopPropagation(),ze.preventDefault(),R!==Ne&&(M(Ne),d.handleDragOver(ze,g))},ae=ze=>{ze.stopPropagation(),ze.preventDefault(),M(-1)},ye=ze=>{ze.stopPropagation(),R!==Ne&&M(Ne);const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));d.handleDragStart(ze,g,Qe)},Re=ze=>{const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));d.handleDrop(ze,g,Qe)},Be=(0,r.default)(R===Ne&&p.default.active,p.default.compact_name);return o.default.createElement("span",{key:tt},o.default.createElement("a",{className:Be,draggable:!0,onContextMenu:$e,onDragStart:ye,onDragOver:Se,onDragLeave:ae,onDrop:Re,onClick:Fe},Ce),Ne!==ve.length-1?o.default.createElement("span",{className:p.default.compact_name_separator},_.separator):null)});return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_displayname)},be)}return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_displayname)},a.getName(we.uri)||we.displayName)},Te=()=>o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_tail)},oe()),oe=()=>U?o.default.createElement("div",{className:p.default.file_tree_node_status},(0,m.transformLabelWithCodicon)(U.badge.slice(),{color:"inherit"},P.fromString.bind(P))):null,le=we=>{if(I)return null;if(re)return Ae(we,G);if(x)return Ae(we,()=>{})},Ee=()=>{let we=g.tooltip;return U&&U.badge&&(we+=` \u2022 ${U.tooltip}`),we};return o.default.createElement("div",{key:g.id,onClick:Y,onDoubleClick:z,onContextMenu:Q,onDragStart:Z,onDragOver:J,onDragEnter:H,onDragLeave:$,onDrop:X,title:Ee(),className:(0,r.default)(K,S?S.classlist:null),style:fe,draggable:v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode,"data-id":g.id},o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_content)},le(g),te(g),o.default.createElement("div",{className:x?p.default.file_tree_node_prompt_wrap:p.default.file_tree_node_overflow_wrap},Le(g)),Te()))};t.FileTreeNode=s,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},56384:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTree=t.FILE_TREE_FILTER_DELAY=t.FILTER_AREA_HEIGHT=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),m=e(41869),E=e(68974),p=e(24429),_=e(87420),s=e(6250),g=e(46377),c=n.__importDefault(e(2613)),h=e(97738);t.FILTER_AREA_HEIGHT=30,t.FILE_TREE_FILTER_DELAY=500;const u=(0,l.RecycleTreeFilterDecorator)(l.RecycleTree),d=({viewState:f})=>{const[a,b]=(0,o.useState)(!1),[y,S]=(0,o.useState)(!0),[A,T]=(0,o.useState)(!1),[w,D]=(0,o.useState)(!1),[I,O]=(0,o.useState)(),P=(0,o.useRef)(null),R=(0,o.useRef)(new m.DisposableCollection),{height:M}=f,k=(0,m.useInjectable)(s.IFileTreeService),{iconService:B,locationToCurrentFile:x,filterMode:N,indent:j,baseIndent:K}=k,U=(0,m.useInjectable)(h.FileTreeModelService),[Y,z]=(0,o.useState)({indent:j,baseIndent:K}),[G,Q]=(0,o.useState)(N),[Z,$]=(0,o.useState)(B.currentTheme||{hasFolderIcons:!0,hasFileIcons:!0,hidesExplorerArrows:!0}),H=(0,o.useCallback)(tt=>X(tt)?!1:tt.shiftKey,[]),X=(0,o.useCallback)(tt=>{const{metaKey:Fe,ctrlKey:$e}=tt;return m.isOSX&&Fe||$e},[]),J=(0,o.useCallback)((tt,Fe,$e,Se)=>{tt.stopPropagation();const{handleItemClick:ae,handleItemToggleClick:ye,handleItemRangeClick:Re}=U;if(!Fe)return;const Be=H(tt),ze=X(tt);Be?Re(Fe,$e):ze?ye(Fe,$e):ae(Fe,$e,Se)},[]),re=(0,o.useCallback)((tt,Fe,$e)=>{tt.stopPropagation();const{handleItemDoubleClick:Se}=U;Fe&&Se(Fe,$e)},[]),ce=(0,o.useCallback)((tt,Fe)=>{tt.stopPropagation();const{toggleDirectory:$e}=U;$e(Fe)},[]);(0,o.useEffect)(()=>{a&&U.onFileTreeModelChange(async tt=>{S(!0),tt&&await tt.ensureReady,O(tt),S(!1)})},[a]),(0,o.useEffect)(()=>{var tt,Fe,$e;const Se=new m.CancellationTokenSource;return te(Se.token),(tt=R.current)===null||tt===void 0||tt.push(B.onThemeChange(ae=>{$(ae)})),(Fe=R.current)===null||Fe===void 0||Fe.push(k.onTreeIndentChange(({indent:ae,baseIndent:ye})=>{z({indent:ae,baseIndent:ye})})),($e=R.current)===null||$e===void 0||$e.push(k.onFilterModeChange(ae=>{Q(ae)})),()=>{var ae;Se.cancel(),(ae=R.current)===null||ae===void 0||ae.dispose()}},[]);const fe=(0,o.useCallback)((tt,Fe)=>{let $e;if(tt&&Fe)for($e=tt.parentNode;$e;){if(Fe===$e)return!0;$e=$e.parentNode}return!1},[]),Ae=(0,o.useCallback)(tt=>{fe(tt.relatedTarget,P.current)||!tt.relatedTarget||(T(!1),U.handleTreeBlur())},[P.current]);(0,o.useEffect)(()=>{G||(U.fileTreeHandle&&U.fileTreeHandle.clearFilter(),U.selectedFiles.length===1&&U.location(U.selectedFiles[0].uri))},[G]),(0,o.useEffect)(()=>{const tt=new m.DisposableCollection;return I&&(tt.push(U.onDidFocusedFileChange(Fe=>{Fe?Fe.isEqual((I?.root).uri)?A||T(!A):A&&T(!A):Fe||A&&T(!A)})),tt.push(U.onDidContextMenuFileChange(Fe=>{Fe?Fe.isEqual((I?.root).uri)?A||T(!A):A&&T(!A):Fe||A&&T(!A)}))),()=>{tt.dispose()}},[I,A]);const te=(0,o.useCallback)(async tt=>{var Fe;if(await U.whenReady,!tt.isCancellationRequested){if(U.treeModel){if(await U.treeModel.ensureReady,O(U.treeModel),tt.isCancellationRequested)return;P.current&&k.initContextKey(P.current)}S(!1),!((Fe=R.current)===null||Fe===void 0)&&Fe.disposed||b(!0)}},[U,R.current]),Le=(0,o.useCallback)(tt=>{U.handleTreeHandler({...tt,getModel:()=>U.treeModel,hasDirectFocus:()=>P.current===document.activeElement})},[P.current,I]),Te=(0,o.useCallback)(()=>{const{handleItemClick:tt}=U;tt()},[]),oe=(0,o.useCallback)(()=>{U.handleDblClick()},[]),le=(0,o.useCallback)(()=>{const{handleTreeFocus:tt}=U;tt()},[]),Ee=(0,o.useCallback)(tt=>{const{handleContextMenu:Fe}=U;Fe(tt)},[]),we=(0,o.useCallback)(tt=>{tt.stopPropagation(),tt.preventDefault()},[]),ve=(0,o.useCallback)(tt=>{tt.preventDefault(),D(!0)},[]),be=(0,o.useCallback)(()=>{D(!1)},[]),Ce=(0,o.useCallback)(tt=>{const{handleDrop:Fe}=U.dndService;D(!1),Fe(tt)},[]),Ne=(0,o.useCallback)((tt,Fe,$e,Se)=>{const{handleContextMenu:ae}=U;ae(tt,Fe,Se)},[]);return o.default.createElement("div",{className:(0,r.default)(c.default.file_tree,w&&c.default.outer_drag_over,A&&c.default.outer_active),tabIndex:-1,ref:P,onClick:Te,onDoubleClick:oe,onFocus:le,onBlur:Ae,onContextMenu:Ee,draggable:!0,onDragStart:we,onDragLeave:be,onDragOver:ve,onDrop:Ce},o.default.createElement(v,{isLoading:y,isReady:a,height:M,model:I,iconTheme:Z,treeIndent:Y,filterMode:G,locationToCurrentFile:x,onTreeReady:Le,onContextMenu:Ne,onItemClick:J,onItemDoubleClick:re,onTwistierClick:ce}))};t.FileTree=d;const v=(0,o.memo)(({isReady:f,isLoading:a,height:b,model:y,filterMode:S,treeIndent:A,iconTheme:T,onTreeReady:w,onItemClick:D,onItemDoubleClick:I,onContextMenu:O,onTwistierClick:P})=>{const R=(0,m.useInjectable)(s.IFileTreeService),M=(0,m.useInjectable)(_.IIconService),{decorationService:k,labelService:B,locationToCurrentFile:x}=R,N=(0,m.useInjectable)(h.FileTreeModelService),j=(0,o.useCallback)(K=>o.default.createElement(g.FileTreeNode,{item:K.item,itemType:K.itemType,template:K.template,decorationService:k,labelService:B,iconService:M,dndService:N.dndService,decorations:N.decorations.getDecorations(K.item),onClick:D,onDoubleClick:I,onTwistierClick:P,onContextMenu:O,defaultLeftPadding:A.baseIndent,leftPadding:A.indent,hasPrompt:K.hasPrompt,hasFolderIcons:T.hasFolderIcons,hasFileIcons:T.hasFileIcons,hidesExplorerArrows:T.hidesExplorerArrows}),[y,A,T]);return f?a?o.default.createElement(E.Progress,{loading:!0}):y?o.default.createElement(u,{height:b,itemHeight:g.FILE_TREE_NODE_HEIGHT,onReady:w,model:y,filterEnabled:S,filterAfterClear:x,filterAutoFocus:!0,leaveBottomBlank:!0},j):o.default.createElement(p.WelcomeView,{viewId:s.FILE_EXPLORER_WELCOME_ID}):o.default.createElement(E.Progress,{loading:!0})});v.displayName="FileTreeView"},57781:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),m=e(18193),E=e(26542),p=e(42933),_=e(52416),s=e(51500),g=e(6250),c=e(69959),h=e(88014),u=e(93239),{Path:d}=l.path;let v=class extends o.Tree{constructor(){super(...arguments),this._fileServiceWatchers=new Map,this._symbolicFiles=new Map,this._changeEventDispatchQueue=new Set,this._readyToWatch=!1,this._watchRootsQueue=[],this.effectedNodes=[],this.onWorkspaceChangeEmitter=new l.Emitter,this.onTreeIndentChangeEmitter=new l.Emitter,this.onFilterModeChangeEmitter=new l.Emitter,this.onNodeRefreshedEmitter=new l.Emitter,this._filterMode=!1,this._refreshable=!0,this.refreshEffectNode=()=>{const a=this.effectedNodes.slice(0);if(this.effectedNodes=[],a.find(y=>c.Directory.isRoot(y)))this.refresh();else for(const y of a)this.refresh(y)},this.flushEventQueue=async()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.size===0)return;const a=Array.from(this._changeEventDispatchQueue),b=this.sortPaths(a);(!this.refreshCancelToken||this.refreshCancelToken.token.isCancellationRequested)&&(this.refreshCancelToken=new l.CancellationTokenSource);const y=(0,l.pSeries)(b.map(S=>async()=>{c.Directory.is(S.node)&&await S.node.refresh(this.refreshCancelToken)}));return this._changeEventDispatchQueue.clear(),await y},this.locationToCurrentFile=()=>{this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}get refreshable(){return this._refreshable}get filterMode(){return this._filterMode}get baseIndent(){return this._baseIndent}get indent(){return this._indent}get onWorkspaceChange(){return this.onWorkspaceChangeEmitter.event}get onTreeIndentChange(){return this.onTreeIndentChangeEmitter.event}get onFilterModeChange(){return this.onFilterModeChangeEmitter.event}get isCompactMode(){return this._isCompactMode}get contextKey(){return this.fileContextKey}async init(){this._roots=await this.workspaceService.roots,await this.preferenceService.ready,this._baseIndent=this.preferenceService.getValid("explorer.fileTree.baseIndent",8),this._indent=this.preferenceService.getValid("explorer.fileTree.indent",8),this._isCompactMode=this.preferenceService.getValid("explorer.compactFolders",!0),this.toDispose.push(this.workspaceService.onWorkspaceChanged(a=>{this._roots=a;const b=new l.URI(a[0].uri),y=new c.Directory(this,void 0,b,b.displayName,a[0],this.fileTreeAPI.getReadableTooltip(b));this.root=y,this.onWorkspaceChangeEmitter.fire(y),this.refresh()})),this.toDispose.push(this.workspaceService.onWorkspaceFileExcludeChanged(()=>{this.refresh()})),this.toDispose.push(l.Disposable.create(()=>{var a;(a=this._root)===null||a===void 0||a.dispose(),this._roots=null})),this.toDispose.push(this.corePreferences.onPreferenceChanged(a=>{a.preferenceName==="explorer.fileTree.baseIndent"?(this._baseIndent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.fileTree.indent"?(this._indent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.compactFolders"&&(this._isCompactMode=a.newValue,this.refresh())}))}initContextKey(a){this.fileContextKey.initScopedContext(a)}startWatchFileEvent(){return this._readyToWatch=!0,Promise.all(this._watchRootsQueue.map(a=>this.watchFilesChange(a)))}async resolveChildren(a){var b,y,S,A;let T=[];if(a){if(c.Directory.isRoot(a)&&this.isMultipleWorkspace){const w=await this.workspaceService.roots;for(const D of w){const I=this.fileTreeAPI.toNode(this,D,a,this.workspaceService.getWorkspaceName(new l.URI(D.uri)));this.watchFilesChange(new l.URI(D.uri)),T=T.concat(I),(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)}return T}if(a.uri){const w=await this.fileTreeAPI.resolveChildren(this,a.uri.toString(),a,this.isCompactMode&&!c.Directory.isRoot(a));T=w.children,T.forEach(I=>{(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)});const D=w.filestat;if(D&&this.isCompactMode&&!c.Directory.isRoot(a)){const I=new l.URI(D.uri),O=a.parent;if(a&&O){let P=a.name;if(a.filestat.isSymbolicLink){const R=(y=new l.URI(a.filestat.realUri).relative(I))===null||y===void 0?void 0:y.toString();R&&(P=R,P=[a.uri.displayName].concat(P.split(d.separator)).join(d.separator))}else O.filestat.isSymbolicLink?P=(S=new l.URI(O.filestat.realUri).relative(I))===null||S===void 0?void 0:S.toString():P=(A=O.uri.relative(I))===null||A===void 0?void 0:A.toString();P&&P!==a.name&&a.updateMetaData({name:P,uri:I,tooltip:this.fileTreeAPI.getReadableTooltip(I),fileStat:D})}}return T}}else if(this._roots||(this._roots=await this.workspaceService.roots),this.isMultipleWorkspace){const w=new l.URI((b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri);let D=w.displayName;D=D.slice(0,D.lastIndexOf("."));const I={...this.workspaceService.workspace,isDirectory:!0},O=new c.Directory(this,void 0,w,D,I,this.fileTreeAPI.getReadableTooltip(w));return this.root=O,[O]}else if(this._roots.length>0)return T=await(await this.fileTreeAPI.resolveChildren(this,this._roots[0])).children,T.forEach(w=>{const D=this.workspaceService.getWorkspaceName(w.uri);D&&D!==w.name&&w.updateMetaData({name:D}),(w.filestat.isSymbolicLink||w.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(w.filestat.uri,w)}),this.watchFilesChange(new l.URI(this._roots[0].uri)),this.root=T[0],T;return[]}async watchFilesChange(a){if(!this._readyToWatch){this._watchRootsQueue.push(a);return}const b=await this.fileServiceClient.watchFileChanges(a);this.toDispose.push(b),this.toDispose.push(b.onFilesChanged(y=>{this.onFilesChanged(y)})),this._fileServiceWatchers.set(a.toString(),b)}updateRefreshable(a){var b;a!==this.refreshable&&(this._refreshable=a,this._refreshable?this.doHandleQueueChange():(b=this.refreshCancelToken)===null||b===void 0||b.cancel())}isContentFile(a){return!!a&&"filestat"in a&&!a.filestat.isDirectory}isFileContentChanged(a){return a.type===p.FileChangeType.UPDATED&&this.isContentFile(this.getNodeByPathOrUri(a.uri))}getAffectedChanges(a){const b=[];for(const y of a)this.isFileContentChanged(y)||b.push(y);return b}isRootAffected(a){return this._roots?a.some(b=>b.type>p.FileChangeType.UPDATED&&this._roots&&this._roots.find(y=>b.uri.indexOf(y.uri)>=0)):!1}async onFilesChanged(a){const b=await this.getAffectedNodes(this.getAffectedChanges(a));return b.length>0?this.effectedNodes=this.effectedNodes.concat(b):!(b.length>0)&&this.isRootAffected(a)&&this.effectedNodes.push(this.root),this.refreshEffectNode()}async getFileTreeNodePathByUri(a){var b,y,S,A,T,w;if(!a)return;let D;if(this.isMultipleWorkspace){if(this._roots||(this._roots=await this.workspaceService.roots),D=(A=this._roots.find(I=>new l.URI(I.uri).isEqualOrParent(a)))===null||A===void 0?void 0:A.uri,D){const I=new l.URI(D);if(I.isEqualOrParent(a))return new d(((T=this.root)===null||T===void 0?void 0:T.path)||"/").join(I.displayName).join(((w=I.relative(a))===null||w===void 0?void 0:w.toString())||"").toString()}}else if(D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,D){const I=new l.URI(D);if(I.isEqualOrParent(a))return new d(((y=this.root)===null||y===void 0?void 0:y.path)||"").join(((S=I.relative(a))===null||S===void 0?void 0:S.toString())||"").toString()}}async moveNodeByPath(a,b,y,S,A=o.TreeNodeType.TreeNode){const T=new d(a.path).join(y).toString(),w=new d(b.path).join(S).toString();if(T&&w&&w!==T){const D=a.moveNode(T,w);return D&&c.File.is(D)&&(D.updateMetaData({uri:b.uri.resolve(S),fileStat:{...b.filestat,uri:b.uri.resolve(S).toString(),isDirectory:A!==o.TreeNodeType.TreeNode},tooltip:this.fileTreeAPI.getReadableTooltip(b.uri.resolve(S))}),c.Directory.is(D)&&this.updateChildren(D)),D}}async updateChildren(a){const b=a.children;if(!(!b||b.length===0)){for(const y of b)if(c.File.is(y)){const S=a.uri.resolve(y.uri.displayName);y.updateMetaData({uri:S,fileStat:{...y.filestat,uri:S.toString(),isDirectory:!!c.Directory.is(y)},tooltip:this.fileTreeAPI.getReadableTooltip(S)}),c.Directory.is(y)&&this.updateChildren(y)}}}async addNode(a,b,y){let S,A;const T=d.splitPath(b);if(T.length>1){let D=a.uri;for(const I of T)D=D.resolve(I);!this.isCompactMode||c.Directory.isRoot(a)?A=T[0]:y===o.TreeNodeType.CompositeTreeNode?A=b:A=T.slice(0,T.length-1).join(d.separator)}else A=b;S={uri:a.uri.resolve(A).toString(),isDirectory:y===o.TreeNodeType.CompositeTreeNode||T.length>1,isSymbolicLink:!1,lastModification:new Date().getTime()};const w=await this.fileTreeAPI.toNode(this,S,a,A);return w&&a.addNode(w),w}async deleteAffectedNodeByPath(a,b){var y,S;const A=this.getNodeByPathOrUri(a);A&&A.parent&&(this.isCompactMode&&!b?((y=A.parent.children)===null||y===void 0?void 0:y.length)===2?this.refresh((S=A.parent)===null||S===void 0?void 0:S.parent):this.refresh(A.parent):A.parent.removeNode(A.path))}async deleteAffectedNodes(a,b=[]){const y=[];for(const S of a){const A=this.getNodeByPathOrUri(S);A&&c.File.is(A)&&y.push(A)}for(const S of y)!S?.parent||this._changeEventDispatchQueue.has(S?.parent.path)||await this.deleteAffectedNodeByPath(S.path);return b.filter(S=>S.type!==p.FileChangeType.DELETED)}async getAffectedNodes(a){const b=[];for(const y of a){const S=new l.URI(y.uri),A=this.getNodeByPathOrUri(S.parent);A&&b.push(A)}return b}isFileURI(a){return/^file:\/\//.test(a)}getNodeByPathOrUri(a){var b,y,S,A;let T,w;if(typeof a!="string"?(w=a,a=a.toString()):this.isFileURI(a)?w=new l.URI(a):!this.isFileURI(a)&&typeof a=="string"&&(T=a),this.isFileURI(a)&&w){if(this._symbolicFiles.has(w?.toString()))return this._symbolicFiles.get(w.toString());let D;if(this.isMultipleWorkspace?this._roots&&(D=(y=this._roots.find(I=>new l.URI(I.uri).isEqualOrParent(w)))===null||y===void 0?void 0:y.uri):D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,this.root&&D){const I=new l.URI(D);if(I.isEqualOrParent(w)){const O=I.relative(w);O&&(T=new d(this.root.path).join(O.toString()).toString())}}}if(T){const D=(S=this.root)===null||S===void 0?void 0:S.getTreeNodeByPath(T);if(!D){let I;const O=T.split(d.separator);for(;O.length>=1;){O.pop();const P=O.join(d.separator);if(I=(A=this.root)===null||A===void 0?void 0:A.getTreeNodeByPath(P),I)break}if(I&&c.Directory.is(I)){for(const P of I.children||[])if(P.path.includes(T))return P}}return D}}sortComparator(a,b){return a.constructor===b.constructor?a.name.localeCompare(b.name,"en",{numeric:!0}):a.type===o.TreeNodeType.CompositeTreeNode?-1:b.type===o.TreeNodeType.CompositeTreeNode?1:0}get contextMenuContextKeyService(){return this.fileContextKey?this.fileContextKey.service:this.contextKeyService}reWatch(){for(const[a,b]of this._fileServiceWatchers)b.dispose(),this.watchFilesChange(new l.URI(a))}get isMultipleWorkspace(){return!!this.workspaceService.workspace&&!this.workspaceService.workspace.isDirectory}getDisplayName(a){return this.workspaceService.getWorkspaceName(a)}async refresh(a=this.root){if(a)return c.Directory.is(a)||c.File.is(a)&&a.parent&&(a=a.parent),this._changeEventDispatchQueue.add(a.path),this.doHandleQueueChange()}async doHandleQueueChange(){if(this.refreshable)try{await this.flushEventQueue()}catch(a){this.logger.error("flush file change event queue error:",a)}finally{this.onNodeRefreshedEmitter.fire()}}sortPaths(a){const y=a.slice().map(A=>({node:this.getNodeByPathOrUri(A),path:A})).filter(A=>A&&!!A.node);a.length>1&&y.sort((A,T)=>{var w,D;const I=((w=A.node)===null||w===void 0?void 0:w.depth)||0,O=((D=T.node)===null||D===void 0?void 0:D.depth)||0;return I-O});const S=[];for(let A=y.length-1;A>=0;A--){const T=y[A];let w=!1;for(let D=0;D<A;D++){const I=y[D];c.Directory.is(I)&&T.node.path.startsWith(I.node.path)&&(w=!0)}w||S.push(T)}return S}openFile(a){const b=this.preferenceService.get("editor.previewMode");this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:b})}openAndFixedFile(a){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:!1,focus:!0})}openToTheSide(a){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,split:4})}compare(a,b){this.commandService.executeCommand(l.EDITOR_COMMANDS.COMPARE.id,{original:a,modified:b})}toggleFilterMode(){var a;this._filterMode=!this.filterMode,this.onFilterModeChangeEmitter.fire(this.filterMode),(a=this.fileContextKey)===null||a===void 0||a.filesExplorerFilteredContext.set(this.filterMode),this.filterMode===!1&&this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}};t.FileTreeService=v,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],v.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],v.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(m.CorePreferences),n.__metadata("design:type",Object)],v.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(E.LabelService),n.__metadata("design:type",E.LabelService)],v.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileTreeDecorationService),n.__metadata("design:type",u.FileTreeDecorationService)],v.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],v.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(h.FileContextKey),n.__metadata("design:type",h.FileContextKey)],v.prototype,"fileContextKey",void 0),t.FileTreeService=v=n.__decorate([(0,r.Injectable)()],v)},83709:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeNextModule=void 0;const n=e(85608),r=e(41869),o=e(72665),l=e(41103),m=e(6250),E=e(89508),p=e(40439),_=e(57781),s=e(88808),g=e(93239),c=e(97738),h=e(24861);let u=class extends r.BrowserModule{constructor(){super(...arguments),this.providers=[{token:m.IFileTreeAPI,useClass:s.FileTreeAPI},{token:g.FileTreeDecorationService,useClass:g.FileTreeDecorationService},{token:m.IFileTreeService,useClass:_.FileTreeService},{token:c.FileTreeModelService,useClass:c.FileTreeModelService},{token:o.IWindowDialogService,useClass:E.WindowDialogServiceImpl},p.FileTreeContribution]}};t.FileTreeNextModule=u,t.FileTreeNextModule=u=n.__decorate([(0,r.Domain)(h.name),(0,r.ModuleDependencies)([l.WorkspaceModule])],u)},88808:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeAPI=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(42933),E=e(72665),p=e(26199),_=e(69959);let s=class{async resolveChildren(c,h,u,d){var v;let f;if(!this.userhomePath){const a=await this.fileServiceClient.getCurrentUserHome();a&&(this.userhomePath=new l.URI(a.uri))}if(typeof h=="string"?f=await this.fileServiceClient.getFileStat(h):f=await this.fileServiceClient.getFileStat(h.uri),f){if(((v=f.children)===null||v===void 0?void 0:v.length)===1&&f.children[0].isDirectory&&d)return await this.resolveChildren(c,f.children[0].uri,u,d);{const a={...f,isInSymbolicDirectory:u?.filestat.isSymbolicLink||u?.filestat.isInSymbolicDirectory};return{children:this.toNodes(c,a,u),filestat:a}}}else return{children:[],filestat:null}}async resolveNodeByPath(c,h,u){const d=await this.fileServiceClient.getFileStat(h);if(d)return this.toNode(c,d,u)}async resolveFileStat(c){return await this.fileServiceClient.getFileStat(c.toString())}toNodes(c,h,u){if(u){if(h.children)return h.children.map(d=>this.toNode(c,d,u))}else return[this.toNode(c,h,u)];return[]}toNode(c,h,u,d){var v;const f=new l.URI(h.uri),a=d||f.displayName;let b;return h.isInSymbolicDirectory=(v=u?.filestat.isSymbolicLink)!==null&&v!==void 0?v:u?.filestat.isInSymbolicDirectory,h.isDirectory?b=new _.Directory(c,u,f,a,h,this.getReadableTooltip(f)):b=new _.File(c,u,f,a,h,this.getReadableTooltip(f)),b}async mvFiles(c,h){const u=[];for(const f of c)if(f.url.isEqualOrParent(h))return;const d=c.sort((f,a)=>f.toString().length-a.toString().length),v=[];for(const f of d)v.length>0&&v.find(a=>a.url.isEqualOrParent(f.url))||v.push(f);if(this.corePreferences["explorer.confirmMove"]){const f=(0,l.localize)("file.confirm.move.ok"),a=(0,l.localize)("file.confirm.move.cancel");if(await this.dialogService.warning((0,l.formatLocalize)("file.confirm.move",`[ ${v.map(y=>y.url.displayName).join(",")} ]`,h.displayName),[a,f])!==f)return}for(const f of v){const a=await this.mv(f.url,h.resolve(f.url.displayName),f.isDirectory);a&&u.push(a)}return u}async mv(c,h,u=!1){try{await this.workspaceEditService.apply({edits:[{newResource:h,oldResource:c,options:{isDirectory:u,overwrite:!0}}]})}catch(d){return d.message}}async createFile(c,h){try{await this.workspaceEditService.apply({edits:[{newResource:c,options:{content:h}}]})}catch(u){return u.message}this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,focus:!0})}async createDirectory(c){try{await this.workspaceEditService.apply({edits:[{newResource:c,options:{isDirectory:!0}}]})}catch(h){return h.message}}async delete(c){try{await this.workspaceEditService.apply({edits:[{oldResource:c,options:{}}]});return}catch(h){return h.message}}async copyFile(c,h){let u=1,d;try{d=await this.fileServiceClient.access(h.toString())}catch(v){return v.message}for(;d;){const v=h.displayName.replace(/\Wcopy\W\d+/,""),f=l.path.extname(v),b=`${l.path.basename(v,f)} copy ${u}${f}`;h=h.parent.resolve(b),u++;try{d=await this.fileServiceClient.access(h.toString())}catch{return}}try{return await this.fileServiceClient.copy(c.toString(),h.toString())}catch(v){return v.message}}getReadableTooltip(c){const h=c.toString(),u=this.userhomePath&&this.userhomePath.toString();return this.userhomePath&&this.userhomePath.isEqualOrParent(c)?decodeURIComponent(h.replace(u,"~")):decodeURIComponent(c.withScheme("").toString())}};t.FileTreeAPI=s,n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceEditService),n.__metadata("design:type",Object)],s.prototype,"workspaceEditService",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],s.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(E.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),t.FileTreeAPI=s=n.__decorate([(0,r.Injectable)()],s)},93239:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDecorationService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(41893),m=e(52416);let E=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.cacheDecorations=new Map,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(_=>{var s,g,c;const h=(g=(s=_._data)===null||s===void 0?void 0:s._iter)===null||g===void 0?void 0:g._value;if(h){const u=new o.URI(h),d=this.getDecoration(u);this.cacheDecorations.has(h)?((c=this.cacheDecorations.get(h))===null||c===void 0?void 0:c.tooltip)!==d?.tooltip&&this.onDidChangeEmitter.fire():(this.cacheDecorations.set(h,d),this.onDidChangeEmitter.fire())}}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(_,s=!1){_ instanceof o.URI&&(_=o.Uri.parse(_.toString()));const g=this.decorationsService.getDecoration(_,s);return g?{...g,color:this.themeService.getColor({id:g.color})}:{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};t.FileTreeDecorationService=E,n.__decorate([(0,r.Autowired)(l.IDecorationsService),n.__metadata("design:type",l.IDecorationsService)],E.prototype,"decorationsService",void 0),n.__decorate([(0,r.Autowired)(m.IThemeService),n.__metadata("design:type",Object)],E.prototype,"themeService",void 0),t.FileTreeDecorationService=E=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],E)},30577:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropService=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(53622),p=e(14951),_=e(72665),s=e(51500),g=e(6250),c=e(69959),h=r.__importDefault(e(89200)),u=r.__importDefault(e(2613)),d=e(57781),v=e(97738);let f=n=class extends m.WithEventBus{constructor(b){super(),this.model=b,this.toCancelNodeExpansion=new m.DisposableCollection,this.beingDraggedDec=new l.Decoration(h.default.mod_dragging),this.draggedOverDec=new l.Decoration(h.default.mod_dragover),this.beingDraggedNodes=[],this.dragOverTrigger=new m.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.handleDragStart=(y,S,A)=>{y.stopPropagation();const T=O=>{this.handleDragEnd(O,S)};y.currentTarget.addEventListener("dragend",T,!1);let w=this.model.selectedFiles,D=!1;for(const O of w)O&&O.id===S.id&&(D=!0);D||(w=[S]),this.beingDraggedNodes=w,this.beingDraggedActiveUri=A;const I=w.find(O=>!c.Directory.is(O));if(I&&y.dataTransfer.setData("uri",I.uri.toString()),y.dataTransfer.setData("beingDraggedNodes",JSON.stringify(this.beingDraggedNodes.map(O=>O.uri.toString()))),I){const O=I;O.uri.scheme==="file"&&y.dataTransfer.setData("DownloadURL",`application/octet-stream:${O.displayName}:data:application/octet-stream;base64,${(0,m.encodeBase64)(m.BinaryBuffer.fromString(O.filestat.uri))}`)}if(w.forEach(O=>{this.beingDraggedDec.addTarget(O,l.TargetMatchMode.Self)}),y.dataTransfer){let O;w.length===1?O=A?A.displayName:typeof S.name=="string"?S.name:"":O=String(w.length);const P=document.createElement("div");P.className=u.default.file_tree_drag_image,P.textContent=O,document.body.appendChild(P),y.dataTransfer.setDragImage(P,-10,-10),setTimeout(()=>document.body.removeChild(P),0)}},this.handleDragEnter=(y,S)=>{y.stopPropagation(),y.preventDefault()},this.handleDragLeave=(y,S)=>{y.preventDefault(),y.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDec.removeTarget(this.potentialParent),this.model.treeModel.dispatchChange())},this.handleDragOver=(y,S)=>{if(y.preventDefault(),y.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(S)>=0)return;this.draggedOverNode=S;const A=c.Directory.is(S)&&S.expanded?S:S.parent;(this.potentialParent!==A||!this.draggedOverDec.hasTarget(A))&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren),this.model.treeModel.dispatchChange()),this.potentialParent!==S&&c.Directory.is(S)&&(this.dragOverTrigger.trigger(async()=>{S.expanded?(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren)):(await S.setExpanded(!0),this.draggedOverNode===S&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren))),this.model.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(m.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDrop=async(y,S,A)=>{var T,w;this.eventBus.fire(new E.FileTreeDropEvent({event:y.nativeEvent,targetDir:A?A.codeUri.path:S&&S instanceof c.File?(T=S.parent)===null||T===void 0?void 0:T.uri.codeUri.path:S?S.uri.codeUri.path:new m.URI((w=this.workspaceService.workspace)===null||w===void 0?void 0:w.uri).codeUri.path}));try{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="copy";let D;const I=!!this.beingDraggedActiveUri;this.fileTreeService.isCompactMode&&A&&!S?.uri.isEqual(A)?D=null:S?D=c.Directory.is(S)?S:S.parent:D=this.root;let O;if(this.beingDraggedActiveUri){const P=this.fileTreeService.getNodeByPathOrUri(this.beingDraggedActiveUri);O=[new c.Directory(this.fileTreeService,P?.parent,this.beingDraggedActiveUri,this.beingDraggedActiveUri.displayName,{uri:this.beingDraggedActiveUri.toString(),isDirectory:!0,lastModification:new Date().getTime()},this.beingDraggedActiveUri.displayName)]}else if(O=this.beingDraggedNodes,!O||O.length===0)try{const P=JSON.parse(y.dataTransfer.getData("beingDraggedNodes"));P&&P.length!==0&&(O=P.map(R=>this.fileTreeService.getNodeByPathOrUri(new m.URI(R))).filter(Boolean),O.length||(O=await Promise.all(P.map(async R=>{const M=new m.URI(R);let k;const B=await this.filesystem.getFileStat(M.toString());return B?.isDirectory?k=new c.Directory(this.fileTreeService,this.root,M,M.displayName,{uri:M.toString(),isDirectory:!0,lastModification:new Date().getTime()},M.displayName):k=new c.File(this.fileTreeService,this.root,M,M.displayName,{uri:M.toString(),isDirectory:!0,lastModification:new Date().getTime()},M.displayName),k}))))}catch{}if(O.length>0){const P=A||D&&D.uri,R=O.filter(M=>M&&M.parent&&(this.beingDraggedActiveUri?!M.parent.uri.isEqual(P):!0));if(R.length>0){const M=await this.fileTreeAPI.mvFiles(R.map(k=>({url:k.uri,isDirectory:k.filestat.isDirectory})),P);if(M&&M.length>0)M.forEach(k=>{this.messageService.error(k)});else if(M){if(D)if(this.fileTreeService.isCompactMode&&I){for(const k of R)this.fileTreeService.refresh(k.parent);this.fileTreeService.refresh(D)}else for(const k of R){const B=D.uri.resolve(k.name);this.fileTreeService.moveNodeByPath(k.parent,D,k.name,k.name,k.type),k.updateMetaData({name:B.displayName,fileStat:{...k.filestat,uri:B.toString()},uri:B,tooltip:this.fileTreeAPI.getReadableTooltip(B)}),c.Directory.is(k)&&this.fileTreeService.refresh(k)}else if(S){if(this.fileTreeService.isCompactMode&&I)for(const k of R)this.fileTreeService.refresh(k.parent);else for(const k of R)this.fileTreeService.deleteAffectedNodeByPath(k.path);this.fileTreeService.refresh(S.parent)}}else return}}S&&this.beingDraggedDec.removeTarget(S),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(P=>{this.beingDraggedDec.removeTarget(P)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()}catch(D){this.logger.error(D)}},this.handleDragEnd=(y,S)=>{this.beingDraggedDec.removeTarget(S),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(A=>{this.beingDraggedDec.removeTarget(A)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.model.decorations.addDecoration(this.beingDraggedDec),this.model.decorations.addDecoration(this.draggedOverDec)}get root(){return this.model.treeModel.root}};t.DragAndDropService=f,f.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(g.IFileTreeAPI),r.__metadata("design:type",Object)],f.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(m.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(_.IMessageService),r.__metadata("design:type",Object)],f.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(g.IFileTreeService),r.__metadata("design:type",d.FileTreeService)],f.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(s.IWorkspaceService),r.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),t.DragAndDropService=f=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.FileTreeModelService])],f)},97738:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(91830),p=e(93899),_=e(26542),s=e(54414),g=e(14951),c=e(63067),h=e(53576),u=e(72665),d=e(6250),v=e(69959),f=e(2812),a=e(46377),b=r.__importDefault(e(89200)),y=e(57781),S=e(30577),{Path:A,isValidBasename:T}=m.path,{coalesce:w}=m.arrays,{trim:D,rtrim:I}=m.strings;let O=n=class{constructor(){this._isDisposed=!1,this._whenReady=new m.Deferred,this.selectedDecoration=new l.Decoration(b.default.mod_selected),this.focusedDecoration=new l.Decoration(b.default.mod_focused),this.contextMenuDecoration=new l.Decoration(b.default.mod_actived),this.loadingDecoration=new l.Decoration(b.default.mod_loading),this.cutDecoration=new l.Decoration(b.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new m.DisposableCollection,this._isMultiSelected=!1,this.refreshedActionDelayer=new m.ThrottledDelayer(n.DEFAULT_REFRESHED_ACTION_DELAY),this.labelChangedDelayer=new m.ThrottledDelayer(n.DEFAULT_LABEL_CHANGED_DELAY),this.locationThrottler=new m.Throttler,this.onDidFocusedFileChangeEmitter=new m.Emitter,this.onDidContextMenuFileChangeEmitter=new m.Emitter,this.onDidSelectedFileChangeEmitter=new m.Emitter,this.onFileTreeModelChangeEmitter=new m.Emitter,this._initTreeModelReady=!1,this.clearFileSelectedDecoration=()=>{this.selectedDecoration.clearAppliedTarget(),this._selectedFiles=[]},this.activeFileDecoration=(R,M=!0)=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.selectedFiles=[R],M&&this.treeModel.dispatchChange())},this.selectFileDecoration=(R,M=!0)=>{R!==this.treeModel.root&&(this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this._selectedFiles=[R],M&&this.treeModel.dispatchChange()))},this.activateFileActivedDecoration=R=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuDecoration.addTarget(R),this.contextMenuFile=R,this.treeModel.dispatchChange()},this.activateFileFocusedDecoration=R=>{this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.treeModel.dispatchChange()},this.activeFileFocusedDecoration=(R,M=!1)=>{R!==this.treeModel.root&&(this.focusedFile!==R&&(M?(this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile=R):this.focusedFile&&(this.contextMenuFile=void 0,this.focusedDecoration.clearAppliedTarget()),R&&(this._selectedFiles.indexOf(R)<0&&(this.selectedDecoration.addTarget(R),this._selectedFiles.push(R),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri))),this.focusedDecoration.addTarget(R),this.focusedFile=R)),this.treeModel.dispatchChange())},this.toggleFileSelectedDecoration=R=>{const M=this._selectedFiles.indexOf(R);M>-1?(this.focusedFile===R&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this._selectedFiles.splice(M,1),this.selectedDecoration.clearAppliedTarget()):(this._selectedFiles.push(R),this.selectedDecoration.addTarget(R),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.focusedFile=R,this.focusedDecoration.addTarget(R)),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.activeFileDecorationByRange=(R,M)=>{for(this.clearFileSelectedDecoration(),this.contextMenuFile=void 0;R<=M;R++){const k=this.treeModel.root.getTreeNodeAtIndex(R);k&&(this._selectedFiles.push(k),this.selectedDecoration.addTarget(k))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.deactivateFileDecoration=()=>{var R;this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(R=this.treeModel)===null||R===void 0||R.dispatchChange()},this.toggleDirectory=async R=>{R.expanded?this.fileTreeHandle.collapseNode(R):this.fileTreeHandle.expandNode(R)},this.handleDblClick=()=>{this.commandService.executeCommand(m.FILE_COMMANDS.NEW_FILE.id)},this.handleContextMenu=(R,M,k)=>{var B;R.stopPropagation(),R.preventDefault();let x,N;M?(N=M,this._isMultiSelected?this.selectedFiles.indexOf(N)>=0?x=this.selectedFiles:x=[N]:x=[N]):(x=[this.treeModel.root],N=this.treeModel.root),this.activateFileActivedDecoration(N),this.setFileTreeContextKey(N),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(B=this.contextKey)===null||B===void 0||B.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null);const j=this.contextMenuService.createMenu({id:p.MenuId.ExplorerContext,contextKeyService:this.fileTreeService.contextMenuContextKeyService}),K=j.getMergedMenuNodes();j.dispose(),this.updateExplorerCompressedContextKey(N,k);const{x:U,y:Y}=R.nativeEvent;this.ctxMenuRenderer.show({anchor:{x:U,y:Y},menuNodes:K,args:k?[k,[k]]:[N.uri,x.map(z=>z.uri)]})},this.handleTreeBlur=()=>{var R,M,k;this._isDisposed||((M=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||M===void 0||M.set(!1),this.deactivateFileDecoration(),(k=this.contextKey)===null||k===void 0||k.explorerResourceIsFolder.set(!1))},this.handleTreeFocus=()=>{var R,M;(M=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||M===void 0||M.set(!0)},this.handleItemRangeClick=(R,M)=>{if(!this.focusedFile)this.handleItemClick(R,M);else if(this.focusedFile&&this.focusedFile!==R){this._isMultiSelected=!0;const k=this.treeModel.root.getIndexAtTreeNode(R),B=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);B>k?this.activeFileDecorationByRange(k,B):B<k&&this.activeFileDecorationByRange(B,k)}},this.handleItemToggleClick=(R,M)=>{this._isMultiSelected=!0,!(M!==l.TreeNodeType.CompositeTreeNode&&M!==l.TreeNodeType.TreeNode)&&this.toggleFileSelectedDecoration(R)},this.handleItemClick=(R,M=this.fileTreeService.isMultipleWorkspace?l.TreeNodeType.TreeNode:l.TreeNodeType.CompositeTreeNode,k)=>{var B,x,N,j;if(this.treeModel&&(R||(R=this.treeModel.root),this.updateExplorerCompressedContextKey(R,k),this._isMultiSelected=!1,(M===l.TreeNodeType.CompositeTreeNode||M===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(R),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(B=this.contextKey)===null||B===void 0||B.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null,(x=this.contextKey)===null||x===void 0||x.explorerResourceIsFolder.set(M===l.TreeNodeType.CompositeTreeNode)),this.corePreferences["workbench.list.openMode"]==="singleClick")){if(M===l.TreeNodeType.CompositeTreeNode){if((N=this.contextKey)===null||N===void 0||N.explorerResourceIsFolder.set(!0),R===this.treeModel.root)return;this.toggleDirectory(R)}else if(M===l.TreeNodeType.TreeNode){if((j=this.contextKey)===null||j===void 0||j.explorerResourceIsFolder.set(!1),R===this.treeModel.root)return;this.fileTreeService.openFile(R.uri),this.mainlayoutService.bottomExpanded&&this.commandService.executeCommand(h.RETRACT_BOTTOM_PANEL.id)}}},this.handleItemDoubleClick=(R,M)=>{M===l.TreeNodeType.TreeNode?this.fileTreeService.openAndFixedFile(R.uri):this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(R)},this.validateFileName=(R,M)=>{var k;if(M=this.getWellFormedFileName(M),!M||M.length===0||/^\s+$/.test(M))return{message:(0,m.localize)("validate.tree.emptyFileNameError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M};if(M[0]==="/"||M[0]==="\\")return{message:(0,m.localize)("validate.tree.fileNameStartsWithSlashError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M};if(M[0]===" "||M[M.length-1]===" ")return{message:(0,m.localize)("validate.tree.fileNameFollowOrStartWithSpaceWarning"),type:l.PROMPT_VALIDATE_TYPE.WARNING,value:M};let B;if(R.target){const N=R.target;if(M===N.name)return null;B=N.parent}else B=R.parent;return B&&!(R instanceof l.RenamePromptHandle&&R.target.displayName.indexOf(A.separator)>0)&&((k=B.children)===null||k===void 0?void 0:k.find(K=>K.name===M))?{message:(0,m.formatLocalize)("validate.tree.fileNameExistsError",M),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M}:w(M.split(/[\\/]/)).some(N=>!T(N))?{message:(0,m.formatLocalize)("validate.tree.invalidFileNameError",this.trimLongName(M)),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M}:null},this.proxyPrompt=R=>{let M=!1;const k=async z=>{const G=await this.fileTreeService.getNodeByPathOrUri(z);G&&(v.Directory.is(G)?this.selectFileDecoration(G):this.location(G.uri))},B=async z=>{var G,Q,Z;if(this.validateMessage=void 0,R instanceof l.RenamePromptHandle){const $=R.target,H=R.target.displayName.split(A.separator),X=$.name.indexOf(A.separator)>0;if(X&&this.activeUri&&!R.target.uri.toString().includes(this.activeUri.toString()))return!1;const J=this.activeUri?H.length-R.target.uri.toString().replace(this.activeUri.toString(),"").split(A.separator).length:-1,re=J===-1?[]:H.slice(0,J).concat(z);let ce=$.uri,fe=$.parent.uri.resolve(z);if(X&&((G=this.activeUri)===null||G===void 0?void 0:G.displayName)===z||!X&&z===$.name)return!0;R.addAddonAfter("loading_indicator"),X&&re.length>0&&v.Directory.is($.parent)&&(ce=$.parent.uri.resolve(H.slice(0,J+1).join(A.separator)),fe=$.parent.uri.resolve(re.concat().join(A.separator)));const Ae=await this.fileTreeAPI.mv(ce,fe,$.type===l.TreeNodeType.CompositeTreeNode);if(Ae)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:Ae,value:z},this.fileTreeService.updateRefreshable(!0),R.addValidateMessage(this.validateMessage),!1;if(this.fileTreeService.updateRefreshable(!1),R.removeAddonAfter(),!X&&$.parent){const te=await this.fileTreeService.moveNodeByPath($.parent,$.parent,$.name,z,$.type);te&&this.selectFileDecoration(te,!1),this.fileTreeService.updateRefreshable(!0)}else if(v.Directory.is($)&&!v.Directory.isRoot($)){$.updateMetaData({name:re.concat(H.slice(J+1)).join(A.separator),uri:fe,fileStat:{...$.filestat,uri:fe.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(fe)}),this.treeModel.dispatchChange();let te;v.Directory.is($.parent)&&(!((Q=$.parent.children)===null||Q===void 0)&&Q.find(Le=>$.path.indexOf(Le.path)>=0))?te=this.fileTreeService.refresh($.parent):te=this.fileTreeService.refresh($),te.then(()=>{k(fe)})}R.removeAddonAfter()}else if(R instanceof l.NewPromptHandle){const $=R.parent,H=$.uri.resolve(z);let X;if(R.addAddonAfter("loading_indicator"),this.fileTreeService.updateRefreshable(!0),R.type===l.TreeNodeType.CompositeTreeNode?X=await this.fileTreeAPI.createDirectory(H):X=await this.fileTreeAPI.createFile(H),R.removeAddonAfter(),X)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:X,value:z},this.fileTreeService.updateRefreshable(!1),R.addValidateMessage(this.validateMessage),!1;if(z.includes(A.separator)&&this.fileTreeService.refresh($).then(()=>{k($.uri.resolve(z))}),this.fileTreeService.isCompactMode)if(R.type===l.TreeNodeType.CompositeTreeNode)if((!$.children||$.children.length===0)&&!v.Directory.isRoot($)){const re=$.uri.resolve(z),ce=[$.name].concat(z).join(A.separator);$.updateMetaData({name:ce,uri:re,fileStat:{...$.filestat,uri:re.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(re)}),k(re)}else await this.fileTreeService.addNode($,z,R.type),k($.uri.resolve(z));else await this.fileTreeService.addNode($,z,R.type),k($.uri.resolve(z));else await this.fileTreeService.addNode($,z,R.type),k($.uri.resolve(z))}return(Z=this.contextKey)===null||Z===void 0||Z.filesExplorerInputFocused.set(!1),!0},x=async z=>{var G,Q,Z,$;if(this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;if(M)return!1;if(!z){(G=this.contextKey)===null||G===void 0||G.explorerCompressedFocusContext.set(!1),(Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFirstFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedLastFocusContext.set(!1),this.fileTreeService.isCompactMode&&R instanceof l.NewPromptHandle&&this.fileTreeService.refresh(R.parent);return}return($=this.contextKey)===null||$===void 0||$.filesExplorerInputFocused.set(!1),await B(z),!0},N=async z=>{if(M=!0,this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return!1;if(z.trim()===""||this.validateMessage&&this.validateMessage.type!==l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;const G=await B(z);return M=!1,!!G},j=async()=>{var z;(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!0)},K=()=>{var z;this.fileTreeService.updateRefreshable(!0),(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!1),this.contextMenuFile&&this.selectFileDecoration(this.contextMenuFile,!0)},U=()=>{var z;(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!1),this.fileTreeService.isCompactMode&&R instanceof l.NewPromptHandle&&this.fileTreeService.refresh(R.parent)},Y=z=>{const G=this.validateFileName(R,z);G?(this.validateMessage=G,R.addValidateMessage(G)):!G&&this.validateMessage&&this.validateMessage.value!==z&&(this.validateMessage=void 0,R.removeValidateMessage())};R.destroyed||(this.fileTreeService.updateRefreshable(!1),R.onChange(Y),R.onCommit(N),R.onBlur(x),R.onFocus(j),R.onDestroy(K),R.onCancel(U))},this.copyFile=async R=>{var M;this.pasteStore&&this.pasteStore.type===d.PasteTypes.CUT&&(this._pasteStore.files.forEach(B=>{B&&this.cutDecoration.removeTarget(B)}),(M=this.contextKey)===null||M===void 0||M.explorerResourceCut.set(!1)),this.treeModel.dispatchChange();const k=[];for(const B of R){const x=this.fileTreeService.getNodeByPathOrUri(B);x&&k.push(x)}this._pasteStore={files:k,type:d.PasteTypes.COPY},this.clipboardService.writeResources(R)},this.pasteFile=async R=>{var M,k;let B=!1,x=this.fileTreeService.getNodeByPathOrUri(R.toString());if(!x)return;let N=this.pasteStore,j=!1;if(!N){const K=await this.clipboardService.readResources();if(!K||!K.length)return;N={files:[],type:d.PasteTypes.COPY,crossFiles:K},j=!0}if(N){if(v.Directory.is(x)||(B=!0,x=x.parent),j){const K=(0,m.localize)("file.confirm.paste.ok"),U=(0,m.localize)("file.confirm.paste.cancel");if(await this.dialogService.warning((0,m.formatLocalize)("file.confirm.paste",`[ ${(M=N.crossFiles)===null||M===void 0?void 0:M.map(z=>z.displayName).join(",")} ]`,v.Directory.isRoot(x)?x.uri.displayName:x.displayName),[U,K])!==K)return}if(N.type===d.PasteTypes.CUT){for(const U of N.files)U&&this.cutDecoration.removeTarget(U),x.expanded||await x.setExpanded(!0);const K=await this.fileTreeAPI.mvFiles(N.crossFiles?N.crossFiles.map(U=>{var Y;return{url:U,isDirectory:((Y=this.fileTreeService.getNodeByPathOrUri(U))===null||Y===void 0?void 0:Y.filestat.isDirectory)||!1}}):N.files.map(U=>({url:U.uri,isDirectory:U.filestat.isDirectory})),x.uri);K&&K.length>0&&(K.forEach(U=>{this.messageService.error(U)}),this.fileTreeService.refresh()),(k=this.contextKey)===null||k===void 0||k.explorerResourceCut.set(!1),this.treeModel.dispatchChange(),this._pasteStore={files:[],type:d.PasteTypes.NONE,crossFiles:void 0}}else if(N.type===d.PasteTypes.COPY){const K=N.crossFiles?N.crossFiles:N.files.map(U=>U.uri);for(const U of K){x.uri.isEqual(U)&&!B&&(x=x.parent);const Y=x.uri.resolve(U.displayName);x.expanded||await x.setExpanded(!0);const z=await this.fileTreeAPI.copyFile(U,Y);if(z)if(z.uri){const G=new m.URI(z.uri),Q=await this.filesystem.getFileStat(U.toString());this.fileTreeService.addNode(x,G.displayName,Q?.isDirectory?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)}else this.messageService.error(`Error when copy file: ${U.toString()}, ${z}`)}}}},this.cutFile=async R=>{var M;R.length>0&&((M=this.contextKey)===null||M===void 0||M.explorerResourceCut.set(!0)),this._pasteStore&&this._pasteStore.type===d.PasteTypes.CUT&&this._pasteStore.files.forEach(B=>{this.cutDecoration.removeTarget(B)});const k=[];for(const B of R){const x=this.fileTreeService.getNodeByPathOrUri(B);x&&k.push(x)}this._pasteStore={files:k,type:d.PasteTypes.CUT};for(const B of k)B&&this.cutDecoration.addTarget(B);this.treeModel.dispatchChange()},this.location=async R=>{if(await this.whenReady,!this.fileTreeService.filterMode)return this._fileToLocation=R,this.locationThrottler.queue(this.doLocation)},this.doLocation=async()=>{if(!this._fileToLocation)return;const R=this._fileToLocation;let M;if(typeof R=="string"?M=R:M=await this.fileTreeService.getFileTreeNodePathByUri(R),M){if(!this.fileTreeHandle)return;const k=await this.fileTreeHandle.ensureVisible(M,"center",!0);k&&this.selectFileDecoration(k)}this._fileToLocation=void 0},this.locationOnShow=R=>{this._nextLocationTarget=R},this.performLocationOnHandleShow=async()=>{this._nextLocationTarget&&(await this.location(this._nextLocationTarget),this._nextLocationTarget=void 0)}}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidContextMenuFileChange(){return this.onDidContextMenuFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get onFileTreeModelChange(){return this.onFileTreeModelChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get dndService(){return this._dndService}get whenReady(){return this._whenReady.promise}get focusedFile(){return this._focusedFile}set focusedFile(R){this.onDidFocusedFileChangeEmitter.fire(R?R.uri:void 0),this._focusedFile=R}get contextMenuFile(){return this._contextMenuFile}set contextMenuFile(R){this.onDidContextMenuFileChangeEmitter.fire(R?R.uri:void 0),this._contextMenuFile=R}get selectedFiles(){return this._selectedFiles}set selectedFiles(R){this.onDidSelectedFileChangeEmitter.fire(R?R.map(M=>M.uri):[]),this._selectedFiles=R}get activeUri(){return this._activeUri}get pasteStore(){return this._pasteStore}get explorerStorage(){return this._explorerStorage}get currentRelativeUriContextKey(){return this._currentRelativeUriContextKey||(this._currentRelativeUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextRelativeUri","")),this._currentRelativeUriContextKey}get currentContextUriContextKey(){return this._currentContextUriContextKey||(this._currentContextUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextUri","")),this._currentContextUriContextKey}get contextMenuResourceContext(){return this._contextMenuResourceContext||(this._contextMenuResourceContext=new E.ResourceContextKey(this.fileTreeService.contextMenuContextKeyService)),this._contextMenuResourceContext}get contextKey(){return this.fileTreeService.contextKey}get initTreeModelReady(){return this._initTreeModelReady}async initTreeModel(){this._initTreeModelReady=!1;const R=(await this.fileTreeService.resolveChildren())[0];if(!R){this._whenReady.resolve();return}this._treeModel=this.injector.get(f.FileTreeModel,[R]),this.initDecorations(R),this._dndService=this.injector.get(S.DragAndDropService,[this]),this.treeStateWatcher=this._treeModel.getTreeStateWatcher(!0),this.disposableCollection.push(this.fileTreeService.onNodeRefreshed(()=>{this.initTreeModelReady&&(this.refreshedActionDelayer.isTriggered()||this.refreshedActionDelayer.cancel(),this.refreshedActionDelayer.trigger(async()=>{if(this.selectedFiles.length===0){const k=this.editorService.currentEditor;k&&k.currentUri&&this.location(k.currentUri)}this.fileTreeService.isCompactMode||(this._activeUri=null)}))})),this.disposableCollection.push(this.fileTreeService.onWorkspaceChange(()=>{this.disposableCollection.dispose(),this.initTreeModel()})),this.disposableCollection.push(this.labelService.onDidChange(async()=>{this.initTreeModelReady&&(this.labelChangedDelayer.isTriggered()||this.labelChangedDelayer.cancel(),this.labelChangedDelayer.trigger(async()=>{this.fileTreeService.refresh()}))})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,k=>{this.loadingDecoration.addTarget(k),this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,k=>{this.loadingDecoration.clearAppliedTarget(),this.treeModel.dispatchChange()})),this._explorerStorage=await this.storageProvider(m.STORAGE_NAMESPACE.EXPLORER);const M=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);M&&await this.loadFileTreeSnapshot(M),this.disposableCollection.push(this.treeStateWatcher.onDidChange(()=>{if(!this._initTreeModelReady)return;const k=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),B=this.treeStateWatcher.snapshot();this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...k,...B})})),this.fileTreeService.startWatchFileEvent(),this.onFileTreeModelChangeEmitter.fire(this._treeModel),this._whenReady.resolve(),this._initTreeModelReady=!0}initDecorations(R){this._decorations=new l.DecorationsManager(R),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}setFileTreeContextKey(R){var M;this.currentContextUriContextKey.set(R.uri.toString()),this.currentRelativeUriContextKey.set((this.treeModel.root.uri.relative(R.uri)||"").toString()),this.contextMenuResourceContext.set(R.uri),(M=this.contextKey)===null||M===void 0||M.explorerResourceIsFolder.set(R&&R.type===l.TreeNodeType.CompositeTreeNode)}async loadFileTreeSnapshot(R){await this._treeModel.loadTreeState(R)}updateExplorerCompressedContextKey(R,M){var k,B,x,N,j,K,U,Y,z,G,Q,Z,$,H,X,J;if(R&&M){(k=this.contextKey)===null||k===void 0||k.explorerCompressedFocusContext.set(!0);const re=new A(R.name);re.name===M.displayName?((B=this.contextKey)===null||B===void 0||B.explorerCompressedLastFocusContext.set(!0),(x=this.contextKey)===null||x===void 0||x.explorerCompressedFirstFocusContext.set(!1)):re.root&&re.root.name===M.displayName?((N=this.contextKey)===null||N===void 0||N.explorerCompressedLastFocusContext.set(!1),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFirstFocusContext.set(!0)):((K=this.contextKey)===null||K===void 0||K.explorerCompressedLastFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedFirstFocusContext.set(!1))}else R?R.name.indexOf(A.separator)>0?((Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFocusContext.set(!0),(z=this.contextKey)===null||z===void 0||z.explorerCompressedFirstFocusContext.set(!1),(G=this.contextKey)===null||G===void 0||G.explorerCompressedLastFocusContext.set(!0)):((Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedFirstFocusContext.set(!1),($=this.contextKey)===null||$===void 0||$.explorerCompressedLastFocusContext.set(!1)):((H=this.contextKey)===null||H===void 0||H.explorerCompressedFocusContext.set(!1),(X=this.contextKey)===null||X===void 0||X.explorerCompressedFirstFocusContext.set(!1),(J=this.contextKey)===null||J===void 0||J.explorerCompressedLastFocusContext.set(!1))}handleTreeHandler(R){this._fileTreeHandle=R}toggleOrOpenCurrentFile(){let R;this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),R&&(this.activeFileDecoration(R),v.Directory.is(R)?this.toggleDirectory(R):this.fileTreeService.openFile(R.uri))}moveToNext(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const k=this.treeModel.root.getIndexAtTreeNode(R)+1,B=this.treeModel.root.getTreeNodeAtIndex(k),x=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=(k+1)*a.FILE_TREE_NODE_HEIGHT-(x.scrollPosition||0),{height:j}=this.fileTreeHandle.getCurrentSize();B&&(this.activateFileFocusedDecoration(B),N>j&&this.fileTreeHandle.ensureVisible(B,"end"))}moveToPrev(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const M=this.treeModel.root.getIndexAtTreeNode(R);if(M===0)return;const k=M-1,B=this.treeModel.root.getTreeNodeAtIndex(k);if(!B)return;const x=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=k*a.FILE_TREE_NODE_HEIGHT;this.activateFileFocusedDecoration(B),(x.scrollPosition||0)>N&&this.fileTreeHandle.ensureVisible(B,"start")}async collapseCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const M=this.selectedFiles.indexOf(R);M>=0&&(this.selectedFiles.splice(M,1),this.selectedDecoration.removeTarget(R));let k;if(v.Directory.is(R)&&R.expanded)k=R;else if(R)v.Directory.isRoot(R.parent)?k=R:k=R.parent;else return;this.focusedFile=k,k&&k.expanded&&(await this.fileTreeHandle.collapseNode(k),this.activeFileFocusedDecoration(k,!0))}async expandCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const M=this.selectedFiles.indexOf(R);M>=0&&(this.selectedFiles.splice(M,1),this.selectedDecoration.removeTarget(R)),this.focusedFile=R,v.Directory.is(R)&&(R.expanded||await this.fileTreeHandle.expandNode(R))}async collapseAll(){await this.treeModel.root.collapsedAll();const R=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);R&&this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...R,expandedDirectories:{atSurface:[],buried:[]}})}async deleteFileByUris(R){var M;if(R.length===0)return;if(this.corePreferences["explorer.confirmDelete"]){const N=(0,m.localize)("file.confirm.delete.ok"),j=(0,m.localize)("file.confirm.delete.cancel"),K=`[ ${R.slice(0,5).map(Y=>Y.displayName).join(",")}${R.length>5?" ...":""} ]`;if(await this.dialogService.warning((0,m.formatLocalize)("file.confirm.delete",K),[j,N])!==N)return}const k=this.fileTreeService.sortPaths(R);let B;if(this.treeModel.root.branchSize===R.length)B=void 0;else if(this.selectedFiles.length&&!k.find(N=>N.path.toString()===this.selectedFiles[0].uri.toString()))B=this.selectedFiles[0];else{const N=(M=k[k.length-1])===null||M===void 0?void 0:M.node;if(!N)B=void 0;else{let K=this.treeModel.root.getIndexAtTreeNode(N)+1;if(K>=this.treeModel.root.branchSize){const U=k[0].node;K=this.treeModel.root.getIndexAtTreeNode(U)-1}B=this.treeModel.root.getTreeNodeAtIndex(K)}}const x=[];k.forEach(N=>{this.loadingDecoration.addTarget(N.node),x.push(this.deleteFile(N.node,N.path).then(j=>(this.loadingDecoration.removeTarget(N.node),j)))}),this.treeModel.dispatchChange(),await Promise.all(x),B&&this.activeFileDecoration(B)}async deleteFile(R,M){const k=typeof M=="string"?new m.URI(M):M,B=await this.fileTreeAPI.delete(k);return B?(this.messageService.error(B),!1):((N=>{var j,K,U;N.uri.isEqual(k)?this.fileTreeService.deleteAffectedNodeByPath(N.path):this.fileTreeService.refresh(R.parent),this.loadingDecoration.removeTarget(N),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFocusContext.set(!1),(K=this.contextKey)===null||K===void 0||K.explorerCompressedFirstFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedLastFocusContext.set(!1)})(R),!0)}getWellFormedFileName(R){return R&&(R=D(R," "),R=I(R,"."),R=I(R,"/"),R=I(R,"\\"),R)}trimLongName(R){return R&&R.length>255?`${R.substr(0,255)}...`:R}async getPromptTarget(R,M){let k;if(R.isEqual(this.treeModel.root.uri))k=await this.fileTreeService.getNodeByPathOrUri(R);else if(this.focusedFile)k=this.focusedFile;else if(this.contextMenuFile)k=this.contextMenuFile;else if(this.selectedFiles.length>0){const x=this.selectedFiles[this.selectedFiles.length-1];if(this.treeModel.root.isItemVisibleAtSurface(x))k=x;else{const N=await this.fileTreeService.getFileTreeNodePathByUri(R);k=await this.treeModel.root.loadTreeNodeByPath(N)}}else k=await this.fileTreeService.getNodeByPathOrUri(R);k||(k=this.treeModel.root);const B=A.splitPath(k.name);if(v.Directory.isRoot(k))return k;if(k.name!==R.displayName&&B[B.length-1]!==R.displayName&&M){const x=R.relative(k.uri).toString(),N=k.name.replace(`${A.separator}${x}`,""),j=k.parent.uri.resolve(N),K=x.split(A.separator)[0];if(!N)return;if(k.children)for(const U of k.children)this.fileTreeService.deleteAffectedNodeByPath(U.path,!0);k.updateMetaData({name:N?.toString(),uri:j,tooltip:this.fileTreeAPI.getReadableTooltip(j),fileStat:{...k.filestat,uri:j.toString()}}),this.fileTreeService.addNode(k,K,l.TreeNodeType.CompositeTreeNode)}return k}async newFilePrompt(R){const M=await this.getPromptTarget(R,!0);M&&this.proxyPrompt(await this.fileTreeHandle.promptNewTreeNode(M))}async newDirectoryPrompt(R){const M=await this.getPromptTarget(R,!0);M&&this.proxyPrompt(await this.fileTreeHandle.promptNewCompositeTreeNode(M))}async renamePrompt(R){const M=await this.getPromptTarget(R);M&&this.proxyPrompt(await this.fileTreeHandle.promptRename(M,R.displayName))}selectChildNode(R){var M;for(const k of R){const B=this.fileTreeService.getNodeByPathOrUri(k);if(B){const x=v.Directory.isRoot(B)?B.children:(M=B.parent)===null||M===void 0?void 0:M.children;if(x){const N=x[0],j=x[x.length-1],K=this.treeModel.root.getIndexAtTreeNode(N),U=this.treeModel.root.getIndexAtTreeNode(j);this.activeFileDecorationByRange(K,U)}}}}dispose(){this._isDisposed=!0}};t.FileTreeModelService=O,O.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",O.DEFAULT_REFRESHED_ACTION_DELAY=500,O.DEFAULT_LOCATION_FLUSH_DELAY=200,O.DEFAULT_LABEL_CHANGED_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],O.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(d.IFileTreeService),r.__metadata("design:type",y.FileTreeService)],O.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(m.CorePreferences),r.__metadata("design:type",Object)],O.prototype,"corePreferences",void 0),r.__decorate([(0,o.Autowired)(p.ICtxMenuRenderer),r.__metadata("design:type",p.ICtxMenuRenderer)],O.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(p.AbstractContextMenuService),r.__metadata("design:type",p.AbstractContextMenuService)],O.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(d.IFileTreeAPI),r.__metadata("design:type",Object)],O.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(g.IFileServiceClient),r.__metadata("design:type",Object)],O.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(m.StorageProvider),r.__metadata("design:type",Function)],O.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(u.IDialogService),r.__metadata("design:type",Object)],O.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(_.LabelService),r.__metadata("design:type",_.LabelService)],O.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(u.IMessageService),r.__metadata("design:type",Object)],O.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(s.WorkbenchEditorService),r.__metadata("design:type",s.WorkbenchEditorService)],O.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(m.CommandService),r.__metadata("design:type",Object)],O.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(c.IMainLayoutService),r.__metadata("design:type",Object)],O.prototype,"mainlayoutService",void 0),r.__decorate([(0,o.Autowired)(m.IClipboardService),r.__metadata("design:type",Object)],O.prototype,"clipboardService",void 0),t.FileTreeModelService=O=n=r.__decorate([(0,o.Injectable)()],O)},4446:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymlinkDecorationsProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57781);let m=class{constructor(p){this.fileTreeService=p,this.label="symbollink",this.onDidChangeEmitter=new o.Emitter}get onDidChange(){return this.onDidChangeEmitter.event}provideDecorations(p){const _=this.fileTreeService.getNodeByPathOrUri(p.toString());if(_&&_.filestat&&_.filestat.isSymbolicLink)return{letter:"\u2937",source:_.filestat.uri,color:"gitDecoration.ignoredResourceForeground",tooltip:(0,o.localize)("file.tooltip.symbolicLink"),weight:-1,bubble:!_.filestat.isDirectory}}};t.SymlinkDecorationsProvider=m,t.SymlinkDecorationsProvider=m=n.__decorate([n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[l.FileTreeService])],m)},69959:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Directory=void 0;const n=e(97267),r=e(41869);class o extends n.CompositeTreeNode{static is(E){return n.CompositeTreeNode.is(E)}constructor(E,p,_=new r.URI(""),s="",g={children:[],isDirectory:!0,uri:"",lastModification:0},c){super(E,p,void 0,{name:s}),this.uri=_,this.filestat=g,this.tooltip=c,p||(this.isExpanded=!0)}get displayName(){return this.name}updateName(E){this.name!==E&&(n.TreeNode.removeTreeNode(this.id,this.path),this.name=E,n.TreeNode.setTreeNode(this.id,this.path,this))}updateURI(E){this.uri=E}updateFileStat(E){this.filestat=E}updateToolTip(E){this.tooltip=E}updateMetaData(E){const{fileStat:p,tooltip:_,name:s,uri:g}=E;s&&this.updateName(s),p&&this.updateFileStat(p),g&&this.updateURI(g),_&&this.updateToolTip(_)}}t.Directory=o;class l extends n.TreeNode{static is(E){return n.TreeNode.is(E)}constructor(E,p,_=new r.URI(""),s="",g={children:[],isDirectory:!1,uri:"",lastModification:0},c){super(E,p,void 0,{name:s}),this.uri=_,this.filestat=g,this.tooltip=c}get displayName(){return this.name}updateName(E){this.name!==E&&(n.TreeNode.removeTreeNode(this.id,this.path),this.name=E,n.TreeNode.setTreeNode(this.id,this.path,this))}updateURI(E){this.uri=E}updateFileStat(E){this.filestat=E}updateToolTip(E){this.tooltip=E}updateMetaData(E){const{fileStat:p,tooltip:_,name:s,uri:g}=E;s&&this.updateName(s),p&&this.updateFileStat(p),g&&this.updateURI(g),_&&this.updateToolTip(_)}}t.File=l},6250:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCE_VIEW_ID=t.IFileDialogTreeService=t.IFileDialogModel=t.PasteTypes=t.FileStatNode=t.FileTreeExpandedStatusUpdateEvent=t.IFileTreeService=t.IFileTreeAPI=t.FILE_EXPLORER_WELCOME_ID=void 0;const n=e(43718);t.FILE_EXPLORER_WELCOME_ID="file-explorer",t.IFileTreeAPI=Symbol("IFileTreeAPI"),t.IFileTreeService=Symbol("IFileTreeService");class r extends n.BasicEvent{}t.FileTreeExpandedStatusUpdateEvent=r;var o;(function(m){function E(s){return!!s&&"filestat"in s}m.is=E;function p(s){return!!s&&"filestat"in s&&!s.fileStat.isDirectory}m.isContentFile=p;function _(s){if(E(s))return s.filestat.uri}m.getUri=_})(o||(t.FileStatNode=o={}));var l;(function(m){m[m.NONE=0]="NONE",m[m.COPY=1]="COPY",m[m.CUT=2]="CUT"})(l||(t.PasteTypes=l={})),t.IFileDialogModel=Symbol("IFileDialogModel"),t.IFileDialogTreeService=Symbol("IFileDialogTreeService"),t.RESOURCE_VIEW_ID="file-explorer"},87518:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(6250),t),n.__exportStar(e(83709),t)},67240:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserViews=void 0,t.browserViews={"sumiContributes.contributes":"Declare all contributions of the OpenSumi Extension.","sumiContributes.common.command":'The command to execute. The command must be declared in "contributes.command" (except built-in commands)',"sumiContributes.common.when":"This condition must be true to display this item","sumiContributes.common.group":"The group this item belongs to","sumiContributes.browserViews":"Provide a custom view to the editor","sumiContributes.browserViews.left":"Provide a view in the left activity bar container","sumiContributes.browserViews.right":"Provide a view in the right activity bar container","sumiContributes.browserViews.bottom":"Provides a view in the bottom tab bar container (no icon will be rendered, so a title is required)","sumiContributes.browserViews.location.custom":'Provide a view to the "{0}" container',"sumiContributes.browserViews.view.id":"View id, browser/index needs to export a component with the same name as this id","sumiContributes.browserViews.view.icon":"Icon name, reference: [icon](https://opensumi.github.io/core/)","sumiContributes.browserViews.view.iconPath":"local icon relative path","sumiContributes.browserViews.view.title":"View title (will be displayed when type is bottom)","sumiContributes.browserViews.view.titleComponentId":"The id of the custom view title component, the characteristics are exactly the same as the normal browserView","sumiContributes.browserViews.view.expanded":"Do you need to expand to full screen, which will cover up the editor area","sumiContributes.browserMain":"Declare the extension browser entry (the path to the compiled code file relative to the extension directory)","sumiContributes.nodeMain":"Declare the extension node entry (the path to the compiled code file relative to the extension directory)","sumiContributes.workerMain":"Declare the extension workser entry (the path to the compiled code file relative to the extension directory)","sumiContributes.viewsProxies":'Declare the component id that needs to be bound to the componentProxy call, which is the same as the export name. For example, after declaring ["component"], the xxxx function of the component component of the browser layer can be called at the node layer through **`context.componentProxy.component.xxxx`**',"sumiContributes.toolbar":"Toolbar is located on the right side of the menu bar at the top of the IDE by default, and can also be displayed as a separate column","sumiContributes.toolbar.actions":"Used to describe the elements on the Toolbar, currently only supports `button` and `select`, we call it action, in some cases it needs to be used with the Toolbar API","sumiContributes.toolbar.actions.id":"unique identifier","sumiContributes.toolbar.actions.weight":"Order weight, the larger the value, the higher the ranking","sumiContributes.toolbar.actions.preferredPosition":`Register the position of this action, if strictPosition exists, this option has no effect
28466
+ `,y){const S=this.hashCalculateService.calculate(d);return u.length>p.FILE_SAVE_BY_CHANGE_THRESHOLD?await this.fileSchemeDocClient.saveByChange(h.toString(),{baseMd5:S,changes:v,eol:b},f,a,y):await this.fileSchemeDocClient.saveByContent(h.toString(),{baseMd5:S,content:u},f,a,y)}async provideEditorDocumentModelContentMd5(h,u){return this.fileSchemeDocClient.getMd5(h.toString(),u)}};t.FileSchemeDocumentProvider=_,n.__decorate([(0,r.Autowired)(E.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.IFileSchemeDocClient),n.__metadata("design:type",Object)],_.prototype,"fileSchemeDocClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.IHashCalculateService),n.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),t.FileSchemeDocumentProvider=_=n.__decorate([(0,r.Injectable)()],_);let s=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this.listeners={}}isReadonly(h){return!0}handlesScheme(h){return h==="vscode"}async provideEditorDocumentModelContent(h,u){return this.getSchemaContent(h)}getSchemaContent(h){const u=h.toString(),d=this.jsonRegistry.getSchemaContributions().schemas[u];if(d){const v=JSON.stringify(d);if(!this.listeners[u]){const f=o.Disposable.create(()=>{this.jsonRegistry.onDidChangeSchema(a=>{a===u&&this._onDidChangeContent.fire(h)})});this.listeners[u]=f}return v}return"{}"}onDidDisposeModel(h){h.toString()&&(this.listeners[h.toString()].dispose(),delete this.listeners[h.toString()])}};t.VscodeSchemeDocumentProvider=s,n.__decorate([(0,r.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],s.prototype,"schemaStore",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],s.prototype,"jsonRegistry",void 0),t.VscodeSchemeDocumentProvider=s=n.__decorate([(0,r.Injectable)()],s);let g=class{constructor(){this.documentContentMaps=new Map,this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(h){return h===o.Schemes.walkThroughSnippet}provideEditorDocumentModelContent(h,u){return this.documentContentMaps.has(h.toString())||this.documentContentMaps.set(h.toString(),""),this.documentContentMaps.get(h.toString())}isReadonly(){return!1}preferLanguageForUri(){return"plaintext"}};t.WalkThroughSnippetSchemeDocumentProvider=g,t.WalkThroughSnippetSchemeDocumentProvider=g=n.__decorate([(0,r.Injectable)()],g)},41352:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeDocClientService=void 0;const n=e(85608),r=e(76003),o=e(80449);let l=class{saveByChange(E,p,_,s,g){return this.fileDocBackendService.$saveByChange(E,p,_,s,g)}saveByContent(E,p,_,s,g){return this.fileDocBackendService.$saveByContent(E,p,_,s,g)}getMd5(E,p){return this.fileDocBackendService.$getMd5(E,p)}};t.FileSchemeDocClientService=l,n.__decorate([(0,r.Autowired)(o.FileSchemeDocNodeServicePath),n.__metadata("design:type",Object)],l.prototype,"fileDocBackendService",void 0),t.FileSchemeDocClientService=l=n.__decorate([(0,r.Injectable)()],l)},17276:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemEditorComponentContribution=t.FileSystemEditorResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26542),m=e(57517),E=e(17878),p=e(42933),_=e(57646),s=e(60387),g=e(88819),c=e(99025),h="video-preview",u="image-preview",d="external-file",v="large-file-prevent";let f=class{registerResource(y){y.registerResourceProvider(this.untitledResourceProvider)}registerEditorDocumentModelContentProvider(y){y.registerEditorDocumentModelContentProvider(this.fileSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.vscodeSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.walkThroughSnippetSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.untitledSchemeDocumentProvider)}};t.FileSystemEditorResourceContribution=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.FileSchemeDocumentProvider)],f.prototype,"fileSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.VscodeSchemeDocumentProvider)],f.prototype,"vscodeSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.WalkThroughSnippetSchemeDocumentProvider)],f.prototype,"walkThroughSnippetSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",E.UntitledSchemeResourceProvider)],f.prototype,"untitledResourceProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",E.UntitledSchemeDocumentProvider)],f.prototype,"untitledSchemeDocumentProvider",void 0),t.FileSystemEditorResourceContribution=f=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution)],f);let a=class{constructor(){this.cachedFileType=new o.LRUMap(200,100),this.fileServiceClient.onFilesChanged(y=>{y.forEach(S=>{this.cachedFileType.delete(S.uri.toString())})})}registerEditorComponent(y){y.registerEditorComponent({component:c.ImagePreview,uid:u,scheme:o.Schemes.file}),y.registerEditorComponent({component:c.VideoPreview,uid:h,scheme:o.Schemes.file}),y.registerEditorComponent({component:_.BinaryEditorComponent,uid:d,scheme:o.Schemes.file}),y.registerEditorComponent({component:g.LargeFilePrevent,uid:v,scheme:o.Schemes.file}),y.registerEditorComponentResolver(S=>S===o.Schemes.file||this.fileServiceClient.handlesScheme(S)?10:-1,(S,A)=>{A.length===0&&A.push({type:m.EditorOpenType.component,componentId:d})}),y.registerEditorComponentResolver(S=>S===o.Schemes.file||this.fileServiceClient.handlesScheme(S)?10:-1,async(S,A)=>{const T=await this.getFileType(S.uri.toString());switch(T){case"image":{A.push({type:m.EditorOpenType.component,componentId:u});break}case"video":{A.push({type:m.EditorOpenType.component,componentId:h});break}case"binary":case"text":{const{metadata:w,uri:D}=S,I=w||{};if(T==="binary"&&!I.skipPreventBinary)break;const O=await this.fileServiceClient.getFileStat(D.toString());await this.preference.ready;const P=this.preference.getValid("editor.largeFile",4*1024*1024*1024);O&&(O.size||0)>P&&!I.skipPreventTooLarge?A.push({type:m.EditorOpenType.component,componentId:v}):A.push({type:m.EditorOpenType.code,title:(0,o.localize)("editorOpenType.code")});break}}}),y.registerEditorComponentResolver(o.Schemes.untitled,(S,A,T)=>{T([{type:m.EditorOpenType.code,priority:"default"}])})}async getFileType(y){return this.cachedFileType.has(y)||((0,l.getLanguageIdFromMonaco)(new o.URI(y))?this.cachedFileType.set(y,"text"):this.cachedFileType.set(y,await this.getRealFileType(y))),this.cachedFileType.get(y)}async getRealFileType(y){try{return await this.fileServiceClient.getFileType(y)}catch{return"text"}}};t.FileSystemEditorComponentContribution=a,n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],a.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],a.prototype,"preference",void 0),t.FileSystemEditorComponentContribution=a=n.__decorate([(0,o.Domain)(m.BrowserEditorContribution),n.__metadata("design:paramtypes",[])],a)},52568:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(80449),m=e(41352),E=e(17276);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[E.FileSystemEditorResourceContribution,E.FileSystemEditorComponentContribution,{token:l.IFileSchemeDocClient,useClass:m.FileSchemeDocClientService}],this.backServices=[{servicePath:l.FileSchemeDocNodeServicePath}]}};t.FileSchemeModule=p,t.FileSchemeModule=p=n.__decorate([(0,r.Injectable)()],p)},88819:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFilePrevent=t.PreventComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),m=e(81878),E=e(54414),p=e(82196),_=n.__importDefault(e(19996)),s=c=>o.default.createElement("div",{className:_.default["error-page"]},o.default.createElement("div",{className:(0,r.default)(_.default.icon,(0,l.getExternalIcon)("warning"))}),o.default.createElement("div",{className:_.default.description},c.description),o.default.createElement("div",{className:_.default["actions-wrapper"]},c.actions.map((h,u)=>o.default.createElement(m.Button,{key:u,onClick:()=>h.onClick(),className:_.default["action-button"]},h.label))));t.PreventComponent=s;const g=()=>{const c=(0,l.useInjectable)(E.WorkbenchEditorService),h=(0,l.useInjectable)(l.IEventBus),u=()=>{const d=c.currentResource;d&&(d.metadata={...d.metadata,skipPreventTooLarge:!0},h.fire(new p.ResourceOpenTypeChangedEvent(d.uri)))};return o.default.createElement(t.PreventComponent,{description:(0,l.localize)("editor.largeFile.prevent"),actions:[{label:(0,l.localize)("editor.file.prevent.stillOpen"),onClick:()=>u()}]})};t.LargeFilePrevent=g},99025:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreview=t.VideoPreview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(40827),m=n.__importDefault(e(19996)),E=_=>{const s=(0,o.useInjectable)(l.StaticResourceService);return{src:r.default.useMemo(()=>s.resolveStaticResource(_.uri).toString(),[_])}};t.VideoPreview=(0,r.memo)(_=>{const{src:s}=E(_.resource);return r.default.createElement("div",{className:m.default.kt_video_preview},r.default.createElement("video",{playsInline:!0,controls:!0,className:m.default.kt_video,src:s}))});const p=_=>{const s=r.default.useRef(),g=r.default.useRef(),{src:c}=E(_.resource);return r.default.useEffect(()=>{const h=new o.Disposable;return s.current&&(s.current.src=c),()=>{h.dispose()}},[_.resource]),r.default.createElement("div",{className:m.default.kt_image_preview},r.default.createElement("div",{ref:g},r.default.createElement("img",{ref:h=>h&&(s.current=h)})))};t.ImagePreview=p},80449:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeType=t.FileSchemeDocNodeServicePath=t.IFileSchemeDocNodeService=t.IFileSchemeDocClient=t.FILE_SAVE_BY_CHANGE_THRESHOLD=t.FILE_ON_DISK_SCHEME=void 0,t.FILE_ON_DISK_SCHEME="fileOnDisk",t.FILE_SAVE_BY_CHANGE_THRESHOLD=1e5,t.IFileSchemeDocClient=Symbol("IFileSchemeDocClient"),t.IFileSchemeDocNodeService=Symbol("FileSchemeDocNodeService"),t.FileSchemeDocNodeServicePath="FileSchemeDocNodeService";var e;(function(n){n[n.ADDED=1]="ADDED",n[n.REMOVED=2]="REMOVED"})(e||(t.ChangeType=e={}))},15625:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSearchService=t.FileSearchServicePath=void 0,t.FileSearchServicePath="FileSearchServicePath",t.IFileSearchService=Symbol("FileSearchService")},84660:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(15625),t)},2156:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClient=t.BrowserFileSystemRegistryImpl=void 0;const n=e(85608),r=e(32852),o=e(76003),l=e(41869),m=e(43718),E=e(37406),p=e(8170),_=e(41682),s=e(42933),g=e(81952);let c=class{constructor(){this.providers=new Map}registerFileSystemProvider(d){const v=d.scheme;return this.providers.set(v,d),{dispose:()=>{this.providers.delete(v)}}}};t.BrowserFileSystemRegistryImpl=c,t.BrowserFileSystemRegistryImpl=c=n.__decorate([(0,o.Injectable)()],c);let h=class{get clientId(){return this.applicationService.clientId}constructor(){this.watcherWithSchemaMap=new Map,this.watcherDisposerMap=new Map,this.onFileChangedEmitter=new l.Emitter,this.onFileProviderChangedEmitter=new l.Emitter,this._onFilesChanged=new l.Emitter,this.onFilesChanged=this._onFilesChanged.event,this._onFileProviderChanged=new l.Emitter,this.onFileProviderChanged=this._onFileProviderChanged.event,this._onDidChangeFileSystemProviderRegistrations=new l.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=new l.Emitter,this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=new l.Emitter,this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.filesExcludesMatcherList=[],this.watcherId=0,this.toDisposable=new l.DisposableCollection,this.watchFileExcludes=[],this.watchFileExcludesMatcherList=[],this.filesExcludes=[],this.workspaceRoots=[],this._providerChanged=new Set,this.fsProviders=new Map,this.userHomeDeferred=new l.Deferred,this.options={encoding:"utf8",overwrite:!1,recursive:!0,moveToTrash:!0},this.uriWatcherMap=new Map,this.toDisposable.push(this.onDidChangeFileSystemProviderRegistrations(d=>{d.added&&d.scheme===m.Schemes.file&&this.doGetCurrentUserHome()}))}async initialize(){const d=await this.getProvider(m.Schemes.file);d.initialize&&await d.initialize(this.clientId)}async doGetCurrentUserHome(){const v=(await this.getProvider(m.Schemes.file)).getCurrentUserHome();this.userHomeDeferred.resolve(v)}handlesScheme(d){return this.registry.providers.has(d)||this.fsProviders.has(d)}dispose(){return this.toDisposable.dispose()}async resolveContent(d,v){const f=this.convertUri(d),b=await(await this.getProvider(f.scheme)).readFile(f.codeUri),y=b.data||b;return{content:l.BinaryBuffer.wrap(Uint8Array.from(y)).toString(v?.encoding)}}async readFile(d){const v=this.convertUri(d),a=await(await this.getProvider(v.scheme)).readFile(v.codeUri),b=a.data||a;return{content:l.BinaryBuffer.wrap(Uint8Array.from(b))}}async readFileStream(d){const v=this.convertUri(d);return await(await this.getProvider(v.scheme)).readFileStream(v.codeUri)}async getFileStat(d,v=!0){const f=this.convertUri(d),a=await this.getProvider(f.scheme);try{const b=await a.stat(f.codeUri);if(!b)throw s.FileSystemError.FileNotFound(f.codeUri.toString(),"File not found.");return this.filterStat(b,v)}catch(b){if(s.FileSystemError.FileNotFound.is(b))return}}async setContent(d,v,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!await this.isInSync(d,y))throw this.createOutOfSyncError(d);return await b.writeFile(a.codeUri,typeof v=="string"?l.BinaryBuffer.fromString(v).buffer:v,{create:!1,overwrite:!0,encoding:f?.encoding}),await b.stat(a.codeUri)}async updateContent(d,v,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!this.checkInSync(d,y))throw this.createOutOfSyncError(d);if(v.length===0)return y;const S=await b.readFile(a.codeUri),A=this.applyContentChanges(l.BinaryBuffer.wrap(S).toString(f?.encoding),v);await b.writeFile(a.codeUri,l.BinaryBuffer.fromString(A).buffer,{create:!1,overwrite:!0,encoding:f?.encoding});const T=await b.stat(a.codeUri);if(!T)throw s.FileSystemError.FileNotFound(a.codeUri.toString(),"File not found.");return T}async createFile(d,v){const f=this.convertUri(d),a=await this.getProvider(f.scheme),b=l.BinaryBuffer.fromString(v?.content||"").buffer;let y=await a.writeFile(f.codeUri,b,{create:!0,overwrite:v&&v.overwrite||!1,encoding:v?.encoding});return y=y||await a.stat(f.codeUri),y}async createFolder(d){const v=this.convertUri(d),f=await this.getProvider(v.scheme),a=await f.createDirectory(v.codeUri);return a||await f.stat(v.codeUri)}async move(d,v,f){const a=this.convertUri(d),b=this.convertUri(v),y=await this.getProvider(a.scheme),S=await y.rename(a.codeUri,b.codeUri,{overwrite:!!(f&&f.overwrite)});return S||await y.stat(b.codeUri)}async copy(d,v,f){const a=this.convertUri(d),b=this.convertUri(v),y=await this.getProvider(a.scheme),S=await this.doGetOverwrite(f);if(!(0,s.containsExtraFileMethod)(y,"copy"))throw this.getErrorProvideNotSupport(a.scheme,"copy");const A=await y.copy(a.codeUri,b.codeUri,{overwrite:!!S});return A||await y.stat(b.codeUri)}async getFsPath(d){if(d.startsWith("file:/"))return l.FileUri.fsPath(d)}fireFilesChange(d){const v=d.changes.map(f=>({uri:f.uri,type:f.type}));this._onFilesChanged.fire(v),this.eventBus.fire(new l.FilesChangeEvent(v))}async watchFileChanges(d,v){const a=(this.appConfig.unRecursiveDirectories||[]).some(I=>d.path.toString().startsWith(I)),b=this.convertUri(d.toString()),y=this.uriWatcherMap.get(b.toString());if(y)if(y.isDisposed())this.uriWatcherMap.delete(b.toString());else return y;const S=this.watcherId++,A=await this.getProvider(b.scheme),T=this.watcherWithSchemaMap.get(b.scheme)||[],w=await A.watch(b.codeUri,{excludes:v,recursive:!a});this.watcherDisposerMap.set(S,{dispose:async()=>{const I=this.uriWatcherMap.get(b.toString());await Promise.all([A.unwatch&&A.unwatch(w),I&&I.dispose()]),this.uriWatcherMap.delete(b.toString())}}),T.push(S),this.watcherWithSchemaMap.set(b.scheme,T);const D=new g.FileSystemWatcher({fileServiceClient:this,watchId:S,uri:d});return this.uriWatcherMap.set(b.toString(),D),D}async setWatchFileExcludes(d){return await(await this.getProvider(m.Schemes.file)).setWatchFileExcludes(d)}async getWatchFileExcludes(){return await(await this.getProvider(m.Schemes.file)).getWatchFileExcludes()}async setFilesExcludes(d,v){this.filesExcludes=d,this.filesExcludesMatcherList=[],v&&this.setWorkspaceRoots(v),this.updateExcludeMatcher()}async setWorkspaceRoots(d){this.workspaceRoots=d,this.updateExcludeMatcher()}async unwatchFileChanges(d){const v=this.watcherDisposerMap.get(d);if(!(!v||!v.dispose))return this.watcherDisposerMap.delete(d),v.dispose()}async delete(d,v){if(this.appConfig.isElectronRenderer&&v?.moveToTrash!==!1){const b=new l.URI(d);if(b.scheme===m.Schemes.file)return this.injector.get(E.IElectronMainUIService).moveToTrash(b.codeUri.fsPath)}const f=this.convertUri(d),a=await this.getProvider(f.scheme);await a.stat(f.codeUri),await a.delete(f.codeUri,{recursive:!0,moveToTrash:await this.doGetMoveToTrash(v)})}async getEncoding(d){return"utf8"}listCapabilities(){return _.Iterable.map(this.fsProviders,([d,v])=>({scheme:d,capabilities:v.capabilities}))}registerProvider(d,v){if(this.fsProviders.has(d))throw new Error(`The file system provider for \`${d}\` already registered`);const f=[];this.fsProviders.set(d,v),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:d,provider:v}),f.push({dispose:()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:d,provider:v}),this.fsProviders.delete(d),this._providerChanged.add(d)}}),v.onDidChangeFile&&f.push(v.onDidChangeFile(b=>this.fireFilesChange({changes:b}))),this.toDisposable.push(v.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:v,scheme:d}))),f.push({dispose:async()=>{const b=[];(this.watcherWithSchemaMap.get(d)||[]).forEach(y=>b.push(this.unwatchFileChanges(y))),await Promise.all(b)}}),this._providerChanged.add(d),this.onFileProviderChangedEmitter.fire(Array.from(this._providerChanged)),this.toDisposable.pushAll(f);const a=new l.DisposableCollection;return a.pushAll(f),this._onFileProviderChanged.fire(Array.from(this._providerChanged)),a}async access(d,v=s.FileAccess.Constants.F_OK){const f=this.convertUri(d),a=await this.getProvider(f.scheme);if(!(0,s.containsExtraFileMethod)(a,"access"))throw this.getErrorProvideNotSupport(f.scheme,"access");return await a.access(f.codeUri,v)}async getFileType(d){const v=this.convertUri(d),f=await this.getProvider(v.scheme);if(!(0,s.containsExtraFileMethod)(f,"getFileType"))throw this.getErrorProvideNotSupport(v.scheme,"getFileType");return await f.getFileType(d)}async getCurrentUserHome(){return this.userHomeDeferred.promise}getErrorProvideNotSupport(d,v){return`Scheme ${d} not support this function: ${v}.`}convertUri(d){const v=new l.URI(d);if(!v.scheme)throw new Error(`Unsupported convert Uri with non-scheme Uri: ${d}`);return v}updateExcludeMatcher(){this.filesExcludes.forEach(d=>{this.workspaceRoots.length>0?this.workspaceRoots.forEach(v=>{const a=new l.URI(v).resolve(d).path.toString();this.filesExcludesMatcherList.push((0,l.parseGlob)(a))}):this.filesExcludesMatcherList.push((0,l.parseGlob)(d))})}async shouldWaitProvider(d){const v=await this._onWillActivateFileSystemProvider.fireAndAwait({scheme:d}),{result:f}=v[0];if(f&&f.includes(d)){const a=await l.Event.toPromise(l.Event.filter(this.onFileProviderChanged,b=>b.includes(d)));if(!(0,m.isUndefined)(a))return!0}return!1}async getProvider(d){this._providerChanged.has(d)&&(await this.eventBus.fireAndAwait(new l.ExtensionActivateEvent({topic:"onFileSystem",data:d}),{timeout:3e3}),this._providerChanged.delete(d));const v=this.fsProviders.get(d);if(!v)throw new Error(`Not find ${d} provider.`);return v}async isReadonly(d){try{const v=new l.URI(d);return!!(await(await this.getProvider(v.scheme)).stat(this.convertUri(d).codeUri)).readonly}catch{return!1}}isExclude(d){const v=new l.URI(d);return this.filesExcludesMatcherList.some(f=>f(v.path.toString()))}filterStat(d,v=!0){if(d&&!this.isExclude(d.uri))return d.children&&v&&(d.children=this.filterStatChildren(d.children)),d}filterStatChildren(d){const v=[];return d.forEach(f=>{if(this.isExclude(f.uri))return!1;const a=this.filterStat(f);a&&v.push(a)}),v}applyContentChanges(d,v){let f=r.TextDocument.create("","",1,d);for(const a of v){let b=a.text;if(a.range){const y=f.offsetAt(a.range.start),S=f.offsetAt(a.range.end);b=f.getText().substr(0,y)+a.text+f.getText().substr(S)}f=r.TextDocument.create(f.uri,f.languageId,f.version,b)}return f.getText()}async isInSync(d,v){return!!this.checkInSync(d,v)}checkInSync(d,v){return v.lastModification===d.lastModification&&v.size===d.size}createOutOfSyncError(d){return s.FileSystemError.FileIsOutOfSync(d.uri)}async doGetEncoding(d){return d&&typeof d.encoding<"u"?d.encoding:this.options.encoding}async doGetOverwrite(d){return d&&typeof d.overwrite<"u"?d.overwrite:this.options.overwrite}async doGetRecursive(d){return d&&typeof d.recursive<"u"?d.recursive:this.options.recursive}async doGetMoveToTrash(d){return d&&typeof d.moveToTrash<"u"?d.moveToTrash:this.options.moveToTrash}};t.FileServiceClient=h,n.__decorate([(0,o.Autowired)(s.IBrowserFileSystemRegistry),n.__metadata("design:type",c)],h.prototype,"registry",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(m.IEventBus),n.__metadata("design:type",Object)],h.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(p.IApplicationService),n.__metadata("design:type",Object)],h.prototype,"applicationService",void 0),t.FileServiceClient=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},69037:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),m=e(2156);let E=class{constructor(){this._disposables=new o.DisposableStore,this._disposables.add(this.fileSystem.registerProvider(o.Schemes.file,this.diskFileServiceProvider))}async initialize(){const _=this.contributionProvider.getContributions();await Promise.all(_.map(async s=>{s.registerProvider&&await s.registerProvider(this.fileSystem)})),await Promise.all(_.map(async s=>{s.onFileServiceReady&&await s.onFileServiceReady()})),this.fileSystem.initialize&&await this.fileSystem.initialize()}dispose(){this._disposables.dispose()}};t.FileServiceContribution=E,n.__decorate([(0,r.Autowired)(l.IFileServiceClient),n.__metadata("design:type",m.FileServiceClient)],E.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(l.IDiskFileProvider),n.__metadata("design:type",Object)],E.prototype,"diskFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(o.FsProviderContribution),n.__metadata("design:type",Object)],E.prototype,"contributionProvider",void 0),t.FileServiceContribution=E=n.__decorate([(0,o.Domain)(o.ClientAppContribution),n.__metadata("design:paramtypes",[])],E)},60476:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFsProviderClient=t.CoreFileServiceProviderClient=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(42933);class m{constructor(){this.onDidChangeFileEmitter=new o.Emitter,this.onDidChangeFile=this.onDidChangeFileEmitter.event}watch(_,s){return this.fileServiceProvider.watch(_,s)}unwatch(_){return this.fileServiceProvider.unwatch&&this.fileServiceProvider.unwatch(_)}async stat(_){return await this.fileServiceProvider.stat(_)}readDirectory(_){return this.fileServiceProvider.readDirectory(_)}createDirectory(_){return this.fileServiceProvider.createDirectory(_)}async readFile(_,s){return s&&(0,o.getDebugLogger)("fileService.fsProvider").warn("encoding option for fsProvider.readFile is deprecated"),await this.fileServiceProvider.readFile(_)}readFileStream(_){if(this.fileServiceProvider.readFileStream)return this.fileServiceProvider.readFileStream(_);throw new Error("readFileStream not supported")}writeFile(_,s,g){return this.fileServiceProvider.writeFile(_,Array.from(s),g)}delete(_,s){return this.fileServiceProvider.delete(_,s)}rename(_,s,g){return this.fileServiceProvider.rename(_,s,g)}}t.CoreFileServiceProviderClient=m,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0);let E=class extends m{constructor(){super(...arguments),this.onDidChangeCapabilities=o.Event.None}get capabilities(){return this._capabilities||(this._capabilities=12318,o.isLinux&&(this._capabilities|=1024)),this._capabilities}async initialize(_){var s,g;if(!((s=this.fileServiceProvider)===null||s===void 0)&&s.initialize)try{await((g=this.fileServiceProvider)===null||g===void 0?void 0:g.initialize(_))}catch(c){(0,o.getDebugLogger)("fileService.fsProvider").error("initialize error",c)}}setWatchFileExcludes(_){return this.fileServiceProvider.setWatchFileExcludes(_)}getWatchFileExcludes(){return this.fileServiceProvider.getWatchFileExcludes()}onDidFilesChanged(_){const s=_.changes.map(g=>({uri:g.uri,type:g.type}));this.onDidChangeFileEmitter.fire(s)}copy(_,s,g){return this.fileServiceProvider.copy(_,s,g)}access(_,s){return this.fileServiceProvider.access(_,s)}getCurrentUserHome(){return this.fileServiceProvider.getCurrentUserHome()}getFileType(_){return this.fileServiceProvider.getFileType(_)}};t.DiskFsProviderClient=E,n.__decorate([(0,r.Autowired)(l.DiskFileServicePath),n.__metadata("design:type",Object)],E.prototype,"fileServiceProvider",void 0),n.__decorate([(0,o.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array]),n.__metadata("design:returntype",void 0)],E.prototype,"setWatchFileExcludes",null),t.DiskFsProviderClient=E=n.__decorate([(0,r.Injectable)()],E)},96708:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClientModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(42933),m=e(70671),E=e(2156),p=e(69037),_=e(60476),s=e(23188);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:l.IFileServiceClient,useClass:E.FileServiceClient},{token:l.IBrowserFileSystemRegistry,useClass:E.BrowserFileSystemRegistryImpl},{token:l.IDiskFileProvider,useClass:_.DiskFsProviderClient},{token:l.IShadowFileProvider,useClass:s.ShadowFileSystemProvider},p.FileServiceContribution],this.backServices=[{servicePath:l.DiskFileServicePath,clientToken:l.IDiskFileProvider,protocol:m.DiskFileServiceProtocol}]}};t.FileServiceClientModule=g,t.FileServiceClientModule=g=n.__decorate([(0,r.Injectable)()],g)},23188:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(41869);let l=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.readonly=!0,this.shadowFiles=new Map,this.fileChangeEmitter=new o.Emitter,this.onDidChangeFile=this.fileChangeEmitter.event}unwatch(E){throw new Error("Method not implemented.")}readFileStream(E){throw new Error("Method not implemented.")}watch(E,p){throw new Error("Method not implemented.")}stat(E){return Promise.resolve({uri:E.toString(),lastModification:0})}readDirectory(E){throw new Error("Method not implemented.")}createDirectory(E){throw new Error("Method not implemented.")}readFile(E){return this.shadowFiles.get(E.toString())||o.BinaryBuffer.fromString("no available").buffer}writeFile(E,p,_){this.shadowFiles.set(E.toString(),p)}delete(E,p){throw new Error("Method not implemented.")}rename(E,p,_){throw new Error("Method not implemented.")}copy(E,p,_){throw new Error("Method not implemented.")}exists(E){throw new Error("Method not implemented.")}access(E,p){throw new Error("Method not implemented.")}};t.ShadowFileSystemProvider=l,t.ShadowFileSystemProvider=l=n.__decorate([(0,r.Injectable)()],l)},81952:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcher=void 0;const n=e(43718);function r(l,m){return l.filter(E=>!!E.uri.startsWith(m))}class o{constructor(m){this.toDispose=new n.DisposableCollection,this.changeEmitter=new n.Emitter,this.toDispose.push(this.changeEmitter),this.fileServiceClient=m.fileServiceClient,this.watchId=m.watchId,this.uri=m.uri,this.fileServiceClient.onFilesChanged(E=>{const p=r(E,this.uri.toString());p&&p.length>0&&this.changeEmitter.fire(p)})}get onFilesChanged(){return this.changeEmitter.event}dispose(){return Promise.all([this.toDispose.dispose(),this.fileServiceClient.unwatchFileChanges(this.watchId)])}isDisposed(){return this.toDispose.disposed}}t.FileSystemWatcher=o},91813:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXT_LIST_TEXT=t.EXT_LIST_IMAGE=t.EXT_LIST_VIDEO=void 0,t.getFileTypeByExt=e,t.EXT_LIST_VIDEO=new Set(["mp4","webm","mkv","mov","mts","flv","avi","wmv"]),t.EXT_LIST_IMAGE=new Set(["png","gif","jpg","jpeg","svg","bmp","avif","cr2","cr3","dng","flif","heic","icns","jxl","jpm","jpx","nef","raf","rw2","tif","orf","webp","apng"]),t.EXT_LIST_TEXT=new Set(["xml"]);function e(n){let r="text";return n&&(t.EXT_LIST_IMAGE.has(n)?r="image":t.EXT_LIST_VIDEO.has(n)?r="video":t.EXT_LIST_TEXT.has(n)?r="text":r="binary"),r}},79929:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBrowserFileSystemRegistry=t.IFileServiceClient=void 0;const n=e(43718);t.IFileServiceClient=n.IFileServiceClient,t.IBrowserFileSystemRegistry=Symbol("IBrowserFileSystemRegistry")},49818:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemError=t.FileOperationError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.FileAccess=t.IFileService=t.IShadowFileProvider=t.IDiskFileProvider=t.FileStat=t.FileType=void 0,t.createFileSystemProviderError=_,t.markAsFileSystemProviderError=s,t.containsExtraFileMethod=c,t.notEmpty=h,t.isErrnoException=u,t.handleError=d;const n=e(85608),r=e(43718);var o=e(31036);Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return o.FileType}}),Object.defineProperty(t,"FileStat",{enumerable:!0,get:function(){return o.FileStat}}),n.__exportStar(e(11854),t),t.IDiskFileProvider=Symbol("IDiskFileProvider"),t.IShadowFileProvider=Symbol("IShadowFileProvider"),t.IFileService=Symbol("IFileService");var l;(function(v){let f;(function(a){a.F_OK=0,a.R_OK=4,a.W_OK=2,a.X_OK=1})(f=v.Constants||(v.Constants={}))})(l||(t.FileAccess=l={}));var m;(function(v){v.FileExists="EntryExists",v.FileNotFound="EntryNotFound",v.FileNotADirectory="EntryNotADirectory",v.FileIsADirectory="EntryIsADirectory",v.FileIsOutOfSync="FileIsOutOfSync",v.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",v.FileTooLarge="EntryTooLarge",v.FileWriteLocked="EntryWriteLocked",v.NoPermissions="NoPermissions",v.Unavailable="Unavailable",v.Unknown="Unknown"})(m||(t.FileSystemProviderErrorCode=m={}));class E extends Error{static declare(f,a){return Object.assign((...b)=>_(a(...b),f),{is:b=>{var y;return(y=b.stack)===null||y===void 0?void 0:y.startsWith(f)}})}constructor(f,a){super(f),this.code=a}is(f){return this.name===f.name}}t.FileSystemProviderError=E;class p extends Error{constructor(f,a,b){super(f),this.fileOperationResult=a,this.options=b}static isFileOperationError(f){return f instanceof Error&&!(0,r.isUndefinedOrNull)(f.fileOperationResult)}}t.FileOperationError=p;function _(v,f){const a=new E(v.toString(),f);return s(a,f),a}function s(v,f){return v.name=f?`${f} (FileSystemError)`:"FileSystemError",v}var g;(function(v){v.FileNotFound=E.declare(m.FileNotFound,(f,a)=>`${a?a+" ":""} '${f}' is not found.`),v.FileExists=E.declare(m.FileExists,(f,a)=>`${a?a+" ":""}'${f}' already exists.`),v.FileNotADirectory=E.declare(m.FileNotADirectory,(f,a)=>`${a?a+" ":""}'${f}' is not a directory.`),v.FileIsADirectory=E.declare(m.FileIsADirectory,(f,a)=>`${a?a+" ":""}'${f}' is a directory.`),v.FileIsOutOfSync=E.declare(m.FileIsOutOfSync,(f,a)=>`${a?a+" ":""}'${f}' is out of sync.`),v.FileExceedsMemoryLimit=E.declare(m.FileExceedsMemoryLimit,(f,a)=>`${a?a+" ":""}'${f}' is exceeds memory limit.`),v.FileTooLarge=E.declare(m.FileTooLarge,(f,a)=>`${a?a+" ":""}'${f}' is too large.`),v.FileWriteLocked=E.declare(m.FileWriteLocked,(f,a)=>`${a?a+" ":""}'${f}' is locked.`),v.FileIsNoPermissions=E.declare(m.NoPermissions,(f,a)=>`${a?a+" ":""}'${f}' is no permissions.`),v.Unavailable=E.declare(m.Unavailable,(f,a)=>`${a?a+" ":""}'${f}' is unavailable.`),v.Unknown=E.declare(m.Unknown,(f,a)=>`${a?a+" ":""}'${f}' is unkonw.`)})(g||(t.FileSystemError=g={}));function c(v,f){return(0,r.hasProperty)(v,f)&&(0,r.isFunction)(v[f])}function h(v){return v!==void 0}function u(v){return v.code!==void 0&&v.errno!==void 0}function d(v){var f,a,b,y,S;if(u(v))switch(v.code){case"EEXIST":throw g.FileExists(r.Uri.file((f=v.path)!==null&&f!==void 0?f:""));case"EPERM":case"EACCESS":throw g.FileIsNoPermissions(r.Uri.file((a=v.path)!==null&&a!==void 0?a:""));case"ENOENT":throw g.FileNotFound(r.Uri.file((b=v.path)!==null&&b!==void 0?b:""));case"ENOTDIR":throw g.FileNotADirectory(r.Uri.file((y=v.path)!==null&&y!==void 0?y:""));case"EISDIR":throw g.FileIsADirectory(r.Uri.file((S=v.path)!==null&&S!==void 0?S:""))}throw v}},42933:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79929),t),n.__exportStar(e(49818),t),n.__exportStar(e(28217),t),n.__exportStar(e(91813),t),n.__exportStar(e(50295),t)},70671:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFileServiceProtocol=void 0;const n=e(26387),r=e(52890),o=e(50295);t.DiskFileServiceProtocol={name:o.DiskFileServicePath,methods:[{method:"readFile",request:[{name:"uri",type:r.UriComponentsProto}],response:{type:n.Type.binary()}}]}},50295:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileExtServicePath=t.FileWatcherServicePath=t.ShadowFileServicePath=t.DiskFileServicePath=t.FileServicePath=void 0,t.FileServicePath="FileService",t.DiskFileServicePath="DiskFileService",t.ShadowFileServicePath="ShadowFileService",t.FileWatcherServicePath="FileWatcherService",t.FileExtServicePath="FileExtServicePath"},28217:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatcherProcessManagerProxy=t.WatcherServiceProxy=t.WATCHER_INIT_DATA_KEY=t.SUMI_WATCHER_PROCESS_SOCK_KEY=t.INsfw=void 0;const n=e(86058);var r;(function(o){let l;(function(m){m[m.CREATED=0]="CREATED",m[m.DELETED=1]="DELETED",m[m.MODIFIED=2]="MODIFIED",m[m.RENAMED=3]="RENAMED"})(l=o.actions||(o.actions={}))})(r||(t.INsfw=r={})),t.SUMI_WATCHER_PROCESS_SOCK_KEY="sumi-watcher-process-sock",t.WATCHER_INIT_DATA_KEY="sumi-watcher-init-data",t.WatcherServiceProxy=new n.ProxyIdentifier("WatcherHostServiceImpl"),t.WatcherProcessManagerProxy=new n.ProxyIdentifier("WatcherProcessManagerProxy")},14951:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(42933),t)},57942:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogModel=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(26542),p=e(6250),_=e(2812),s=r.__importDefault(e(89200)),g=e(9018);let c=n=class{static createContainer(u,d){return u.createChild([{token:p.IFileDialogTreeService,useValue:d},{token:p.IFileDialogModel,useClass:n}])}static createModel(u,d){return n.createContainer(u,d).get(p.IFileDialogModel)}constructor(){this.selectedDecoration=new l.Decoration(s.default.mod_selected),this.focusedDecoration=new l.Decoration(s.default.mod_focused),this.loadingDecoration=new l.Decoration(s.default.mod_loading),this.cutDecoration=new l.Decoration(s.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new m.DisposableCollection,this.onDidFocusedFileChangeEmitter=new m.Emitter,this.onDidSelectedFileChangeEmitter=new m.Emitter,this.clearFileSelectedDecoration=()=>{this._selectedFiles.forEach(u=>{this.selectedDecoration.removeTarget(u)}),this._selectedFiles=[],this.onDidSelectedFileChangeEmitter.fire([])},this.activeFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(v=>{this.selectedDecoration.removeTarget(v)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles=[u],this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.selectFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(v=>{this.selectedDecoration.removeTarget(v)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this._selectedFiles=[u],this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.activeFileFocusedDecoration=(u,d=!1)=>{u!==this.treeModel.root&&(this.focusedFile!==u&&(d?(this.preContextMenuFocusedFile?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile)):this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.preContextMenuFocusedFile=u):this.focusedFile&&(this.preContextMenuFocusedFile=null,this.focusedDecoration.removeTarget(this.focusedFile)),u&&(this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles.push(u),this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(v=>v.uri)))),this.treeModel.dispatchChange())},this.activeFileSelectedDecoration=u=>{this._selectedFiles.indexOf(u)>-1||(this._selectedFiles.push(u),this.selectedDecoration.addTarget(u),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(d=>d.uri)),this.treeModel.dispatchChange())},this.activeFileDecorationByRange=(u,d)=>{for(this.clearFileSelectedDecoration(),this.preContextMenuFocusedFile=null;u<=d;u++){const v=this.treeModel.root.getTreeNodeAtIndex(u);v&&(this._selectedFiles.push(v),this.selectedDecoration.addTarget(v))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(v=>v.uri)),this.treeModel.dispatchChange()},this.enactiveFileDecoration=()=>{this.focusedFile&&(this.focusedDecoration.removeTarget(this.focusedFile),this.onDidFocusedFileChangeEmitter.fire(),this.treeModel.dispatchChange()),this._focusedFile=void 0},this.toggleDirectory=async u=>{u.expanded?this.fileTreeHandle.collapseNode(u):this.fileTreeHandle.expandNode(u)},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(u,d)=>{if(!this.focusedFile)this.handleItemClick(u,d);else if(this.focusedFile&&this.focusedFile!==u){const v=this.treeModel.root.getIndexAtTreeNode(u),f=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);f>v?this.activeFileDecorationByRange(v,f):f<v&&this.activeFileDecorationByRange(f,v)}},this.handleItemToggleClick=(u,d)=>{d!==l.TreeNodeType.CompositeTreeNode&&d!==l.TreeNodeType.TreeNode||(this.selectedFiles.indexOf(u)>-1?this.focusedFile===u?this.enactiveFileDecoration():this.activeFileFocusedDecoration(u):this.activeFileSelectedDecoration(u))},this.handleItemClick=(u,d)=>{this.clickTimes++,(d===l.TreeNodeType.CompositeTreeNode||d===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(u),d===l.TreeNodeType.CompositeTreeNode&&this.corePreferences["workbench.list.openMode"]==="singleClick"&&this.toggleDirectory(u),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&d!==l.TreeNodeType.TreeNode&&this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(u),this.clickTimes=0},200)},this.getDirectoryList=()=>this.fileTreeDialogService.getDirectoryList(),this._whenReady=this.initTreeModel()}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get selectedFiles(){return this._selectedFiles}async initTreeModel(){const u=(await this.fileTreeDialogService.resolveChildren())[0];this._treeModel=this.injector.get(_.FileTreeModel,[u]),this.initDecorations(u),this.disposableCollection.push(this._decorations),this.disposableCollection.push(this.labelService.onDidChange(()=>{this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,d=>{this.loadingDecoration.addTarget(d)})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,d=>{this.loadingDecoration.removeTarget(d)}))}async updateTreeModel(u){const d=await this.fileTreeDialogService.resolveRoot(u);if(d&&d.length>0){const v=d[0];this._treeModel=this.injector.get(_.FileTreeModel,[v]),this.clearFileSelectedDecoration(),this.initDecorations(v)}}initDecorations(u){this._decorations&&this._decorations.dispose(),this._decorations=new l.DecorationsManager(u),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}handleTreeHandler(u){this._fileTreeHandle=u}dispose(){this.disposableCollection.dispose()}};t.FileTreeDialogModel=c,c.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",c.DEFAULT_LOCATION_FLUSH_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],c.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(p.IFileDialogTreeService),r.__metadata("design:type",g.FileTreeDialogService)],c.prototype,"fileTreeDialogService",void 0),r.__decorate([(0,o.Autowired)(E.LabelService),r.__metadata("design:type",E.LabelService)],c.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(m.CorePreferences),r.__metadata("design:type",Object)],c.prototype,"corePreferences",void 0),t.FileTreeDialogModel=c=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],c)},69748:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeDialogNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),m=e(41869),E=e(69959),p=n.__importDefault(e(89200)),_=({item:s,onClick:g,itemType:c,labelService:h,leftPadding:u=8,onTwistierClick:d,decorations:v,defaultLeftPadding:f=8,template:a})=>{const b=c===l.TreeNodeType.RenamePrompt,y=c===l.TreeNodeType.NewPrompt,S=b||y,A=(0,m.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),T=(0,m.useDesignStyles)(p.default.file_tree_node,"file_tree_node"),w=K=>{(c===l.TreeNodeType.TreeNode||c===l.TreeNodeType.CompositeTreeNode)&&g(K,s,c)},D=K=>{(c===l.TreeNodeType.TreeNode||c===l.TreeNodeType.CompositeTreeNode)&&(d?d(K,s,c):g(K,s,c))},I=c===l.TreeNodeType.CompositeTreeNode;let O;S?y?O=`${f+(s.parent.depth+1||0)*(u||0)}px`:O=`${f+(s.target.depth||0)*(u||0)}px`:O=I?`${f+(s.depth||0)*(u||0)}px`:`${f+(s.depth||0)*(u||0)+8}px`;const P={height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:O},R=(K,U)=>{if(v&&v?.classlist.indexOf(p.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(S&&K instanceof l.PromptHandle){let Y=!1;if(b?Y=K.target.type===l.TreeNodeType.CompositeTreeNode:Y=K.type===l.TreeNodeType.CompositeTreeNode,Y)return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,A,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:y||!(b&&K.target.type===l.TreeNodeType.CompositeTreeNode&&K.target.expanded)})})}else return o.default.createElement("div",{onClick:U,className:(0,r.default)(p.default.file_tree_node_segment,A,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:!K.expanded})})},M=K=>{let U,Y;S&&K instanceof l.PromptHandle?K instanceof l.RenamePromptHandle?(U=K.target.uri.resolve(K.$.value),Y=E.Directory.is(K.target)):(U=K.parent.uri.resolve(K.$.value),Y=K.type===l.TreeNodeType.CompositeTreeNode):(U=K.uri,Y=K.filestat.isDirectory);const z=h.getIcon(U,{isDirectory:Y});return o.default.createElement("div",{className:(0,r.default)(p.default.file_icon,z,{expanded:Y&&K.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},k=K=>a?o.default.createElement(a,null):S&&K instanceof l.PromptHandle?o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",p.default.file_tree_node_prompt_box)},o.default.createElement(K.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_displayname)},K.name),B=()=>o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_tail)},x()),x=()=>null,N=K=>{if(I)return R(K,D);if(S)return R(K,()=>{})},j=()=>s.tooltip||s.name;return o.default.createElement("div",{key:s.id,onClick:w,title:j(),className:(0,r.default)(T,v?v.classlist:null),style:P,draggable:c===l.TreeNodeType.TreeNode||c===l.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_content)},N(s),M(s),o.default.createElement("div",{className:S?p.default.file_tree_node_prompt_wrap:p.default.file_tree_node_overflow_wrap},k(s)),B()))};t.FileTreeDialogNode=_,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},68195:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(66e3);let m=class{initScopedContext(p){this._contextKeyService=this.globalContextKeyService.createScoped(p),this.fileDialogViewVisibleContext=l.FileDialogViewVisibleContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileDialogContextKey=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"globalContextKeyService",void 0),t.FileDialogContextKey=m=n.__decorate([(0,r.Injectable)()],m)},9018:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),m=e(26542),E=e(54414),p=e(14951),_=e(72665),s=e(51500),g=e(6250),c=e(57781),h=e(97738),u=e(68195);let d=class extends o.Tree{constructor(f){super(),this._whenReady=this.resolveWorkspaceRoot(f)}get whenReady(){return this._whenReady}async resolveWorkspaceRoot(f){if(f){const a=new l.URI(f).withScheme(l.Schemes.file),b=await this.fileTreeAPI.resolveFileStat(a);b&&(this.workspaceRoot=b)}}async resolveChildren(f){if(f){if(f.uri){const{children:a}=await this.fileTreeAPI.resolveChildren(this,f.uri.toString(),f);return a}}else{this.workspaceRoot||(this.workspaceRoot=(await this.workspaceService.roots)[0]);const{children:a}=await this.fileTreeAPI.resolveChildren(this,this.workspaceRoot);return this.root=a[0],a}return[]}async resolveRoot(f){let a;/^file:\/\//.test(f)&&(a=new l.URI(f)),a=l.URI.file(f);const b=await this.fileTreeAPI.resolveFileStat(a);if(b){const{children:y}=await this.fileTreeAPI.resolveChildren(this,b);return this.root=y[0],y}}getDirectoryList(){const f=[];if(!this.root)return f;let a=new l.URI(this.workspaceRoot.uri);if(a&&a.parent)for(;a.parent;){const b=a.codeUri.fsPath;if(f.indexOf(b)>=0)break;f.push(b),a=a.parent}else f.push(a.codeUri.fsPath.toString());return f}sortComparator(f,a){return f.constructor===a.constructor?f.name.startsWith(".")&&!a.name.startsWith(".")?1:!f.name.startsWith(".")&&a.name.startsWith(".")?-1:f.name.localeCompare(a.name,"kn",{numeric:!0}):f.type===o.TreeNodeType.CompositeTreeNode?-1:a.type===o.TreeNodeType.CompositeTreeNode?1:0}initContextKey(f){f&&this.fileDialogContextKey.initScopedContext(f)}get contextKey(){return this.fileDialogContextKey}async saveAs(f){const{oldFilePath:a,newFilePath:b}=f;if(!a||!b)throw new Error("oldFilePath and newFilePath are required");await this.createFile(f);try{const y=l.URI.file(f.newFilePath),S={preview:!1,focus:!0,replace:!0,forceClose:!0,disableNavigate:!1};await this.workbenchEditorService.open(y,S),await this.fileTreeModelService.clearFileSelectedDecoration();const A=this.fileTreeService.getNodeByPathOrUri(y);A&&await this.fileTreeModelService.activeFileDecoration(A)}catch(y){throw new Error(`Failed to open saveAs file: ${y.message}`)}}async createFile(f){try{const{oldFilePath:a,newFilePath:b}=f;if(!await this.fileServiceClient.getFileStat(a))throw new Error(`Source file not found: ${a}`);const{content:S}=await this.fileServiceClient.readFile(a);await this.fileServiceClient.createFile(b,{content:S.toString(),encoding:"utf8",overwrite:!0})}catch(a){throw new Error(`Failed to create file: ${a.message}`)}}dispose(){super.dispose()}};t.FileTreeDialogService=d,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],d.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(m.LabelService),n.__metadata("design:type",m.LabelService)],d.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileDialogContextKey),n.__metadata("design:type",u.FileDialogContextKey)],d.prototype,"fileDialogContextKey",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(E.WorkbenchEditorService),n.__metadata("design:type",E.WorkbenchEditorService)],d.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],d.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(h.FileTreeModelService),n.__metadata("design:type",h.FileTreeModelService)],d.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(g.IFileTreeService),n.__metadata("design:type",c.FileTreeService)],d.prototype,"fileTreeService",void 0),t.FileTreeDialogService=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[String])],d)},51888:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialog=t.FILE_TREE_DIALOG_HEIGHT=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),m=e(68974),E=e(72665),p=e(69748),_=n.__importDefault(e(13294));t.FILE_TREE_DIALOG_HEIGHT=22;const s=({options:g,model:c,isOpenDialog:h,fileService:u})=>{const d=(0,l.useInjectable)(E.IDialogService),v=(0,r.useRef)(null),[f,a]=(0,r.useState)(g.defaultFileName||""),[b,y]=(0,r.useState)(!1),[S,A]=(0,r.useState)(""),[T,w]=(0,r.useState)([]);(0,r.useEffect)(()=>{var Z;return c&&(y(!1),O(),(Z=u.contextKey.fileDialogViewVisibleContext)===null||Z===void 0||Z.set(!0)),()=>{c.dispose()}},[c]),(0,r.useEffect)(()=>{g.defaultFileName&&a(g.defaultFileName)},[g]),(0,r.useEffect)(()=>{if(b){const Z=c.getDirectoryList();w(Z)}},[b]);const D=(0,r.useCallback)(()=>{const Z=c.selectedFiles.map($=>$.uri.path.toString());if(f&&g.showNameInput&&(Z?.length===1||g.defaultUri)){const $=Z?.length===1?Z[0]:g.defaultUri.path.toString();g?.saveAs&&u.saveAs({oldFilePath:l.path.join($,g?.defaultFileName||""),newFilePath:l.path.join($,f)}),d.hide([l.path.join($,f)])}else Z.length>0?d.hide(Z):g.defaultUri?d.hide([g.defaultUri.path.toString()]):c.treeModel&&c.treeModel.root?d.hide([c.treeModel.root.uri.path.toString()]):d.hide([]);y(!1),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d,c,f,g]),I=(0,r.useCallback)(()=>{y(!1),d.hide(),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d]),O=(0,r.useCallback)(async()=>{await c.whenReady,await c.treeModel.ensureReady,A(c.treeModel.root.uri.codeUri.fsPath),y(!0)},[c,S,b]),P=!h,R=(0,r.useCallback)(Z=>{c.handleTreeHandler({...Z,getModel:()=>c.treeModel})},[c]),M=(0,r.useCallback)((Z,$)=>{Z.stopPropagation();const{toggleDirectory:H}=c;H($)},[c]),k=(0,r.useCallback)(Z=>B(Z)?!1:Z.shiftKey,[]),B=(0,r.useCallback)(Z=>{const{metaKey:$,ctrlKey:H}=Z;return l.isMacintosh&&$||H},[]),x=(0,r.useCallback)((Z,$,H)=>{var X;Z.stopPropagation();const{handleItemClick:J,handleItemToggleClick:re,handleItemRangeClick:ce}=c;if(!$)return;const fe=k(event),Ae=B(event);if(fe&&!P&&g.canSelectMany)ce($,H);else if(Ae&&!P&&g.canSelectMany)re($,H);else if(P)H===o.TreeNodeType.CompositeTreeNode&&J($,H);else if(g.canSelectFiles&&H===o.TreeNodeType.TreeNode){const te=new Set(Object.values((X=g.filters)!==null&&X!==void 0?X:{}).flat().map(Le=>`.${Le}`));if(te.size>0){const Le=l.URI.parse($.filestat.uri).path.ext;te.has(Le)&&J($,H)}else J($,H)}else g.canSelectFolders&&H===o.TreeNodeType.CompositeTreeNode&&J($,H)},[c,P,g]),N=(0,r.useCallback)(async Z=>{y(!1),A(Z),await c.updateTreeModel(Z),y(!0)},[c,b,S]),j=(0,r.useCallback)(async Z=>{y(!1),A(Z),await c.updateTreeModel(Z),y(!0)},[c,b,S,T]),K=(0,r.useCallback)(Z=>r.default.createElement(p.FileTreeDialogNode,{item:Z.item,itemType:Z.itemType,labelService:c.labelService,decorations:c.decorations.getDecorations(Z.item),onClick:x,onTwistierClick:M,defaultLeftPadding:8,leftPadding:8}),[c.treeModel]),U=(0,r.useCallback)(()=>{if(b){if(c.treeModel)return r.default.createElement(o.RecycleTree,{height:300,itemHeight:t.FILE_TREE_DIALOG_HEIGHT,onReady:R,model:c.treeModel},K)}else return r.default.createElement(m.Progress,{loading:!0})},[b,c]),Y=(0,r.useCallback)(()=>{if(T.length>0)return r.default.createElement(o.Select,{onChange:N,onSearchChange:j,className:_.default.select_control,size:"large",searchPlaceholder:S,value:S,showSearch:!0},T.map((Z,$)=>r.default.createElement(o.Option,{value:Z,key:`${$} - ${Z}`},Z)))},[T,S]),z=(0,r.useCallback)(Z=>{const{key:$}=l.KeyCode.createKeyCode(Z),H=Z.shiftKey||Z.metaKey||Z.altKey||Z.ctrlKey;$&&l.Key.ENTER.keyCode===$.keyCode&&!H&&D()},[D]);(0,r.useEffect)(()=>{var Z;return v.current&&(u.initContextKey(v.current),u.contextKey.fileDialogViewVisibleContext.set(!0),(Z=v.current)===null||Z===void 0||Z.addEventListener("keyup",z)),()=>{var $;($=v.current)===null||$===void 0||$.removeEventListener("keyup",z)}},[]);const G=(0,r.useMemo)(()=>r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.file_dialog_directory},Y()),r.default.createElement("div",{className:_.default.file_dialog_content},U())),[Y,U]),Q=(0,r.useMemo)(()=>r.default.createElement("div",{className:_.default.file_dialog_buttons},r.default.createElement(o.Button,{onClick:I,type:"secondary",className:_.default.button},(0,l.localize)("dialog.file.close")),r.default.createElement(o.Button,{onClick:D,type:"primary",className:_.default.button,disabled:P&&g.showNameInput&&f.length===0},h&&g.openLabel||(0,l.localize)("dialog.file.ok"))),[I,D,P,h,f,g]);return r.default.createElement("div",{className:_.default.file_dialog_wrapper,ref:v},r.default.createElement("div",{className:_.default.file_dialog_directory_title},h?g.title||(0,l.localize)("dialog.file.openLabel"):g.saveLabel||(0,l.localize)("dialog.file.saveLabel")),G,!h&&g.showNameInput&&r.default.createElement("div",{className:_.default.file_dialog_file_container},r.default.createElement("span",{className:_.default.file_dialog_file_name},(0,l.localize)("dialog.file.name"),": "),r.default.createElement(o.Input,{size:"small",value:f,autoFocus:!0,selection:{start:0,end:f.indexOf(".")||f.length},onChange:Z=>a(Z.target.value)})),Q)};t.FileDialog=s},89508:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowDialogServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),l=e(41869),m=e(37406),E=e(14951),p=e(72665),_=e(57942),s=n.__importDefault(e(13294)),g=e(9018),c=e(51888);let h=class{constructor(){this.idx=1,this._whenReady=this.init()}async init(){this.recentGlobalStorage=await this.storageProvider(l.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA);const d=await this.recentGlobalStorage.get("RECENT_DIALOG_DEFAULT_URI");if(d)this._defaultUri=new l.URI(d);else{const v=await this.fileServiceClient.getCurrentUserHome();this._defaultUri=new l.URI(v.uri)}}get defaultUri(){return this._defaultUri}get whenReady(){return this._whenReady}async updateRecentDefaultUri(d){this.recentGlobalStorage.set("RECENT_DIALOG_DEFAULT_URI",d.toString()),this._defaultUri=d}async showOpenDialog(d={}){this.dialogService.reset(),await this.whenReady;const v={canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1};if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const f=this.injector.get(m.IElectronMainUIService),a=[];d.canSelectFiles&&a.push("openFile"),d.canSelectFolders&&a.push("openDirectory"),d.canSelectMany&&a.push("multiSelections"),l.isMacintosh&&a.push("treatPackageAsDirectory","createDirectory");const b=d.defaultUri||this.defaultUri,y=await f.showOpenDialog(l.electronEnv.currentWindowId,{defaultPath:b.codeUri.fsPath,title:d.title,buttonLabel:d.openLabel,properties:a});if(y&&y.length>0){const S=y.map(A=>l.URI.file(A));return this.updateRecentDefaultUri(S[0].parent),S}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let f;d.defaultUri?f=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):f=this.injector.get(g.FileTreeDialogService),await f.whenReady;const a=_.FileTreeDialogModel.createModel(this.injector,f),b=await this.dialogService.open({message:r.default.createElement(c.FileDialog,{key:this.idx++,fileService:f,model:a,options:{...v,...d},isOpenDialog:!0}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),b&&b.length>0){const y=b.map(S=>l.URI.file(S));return this.updateRecentDefaultUri(y[0].parent),y}else return}}async showSaveDialog(d={}){if(await this.whenReady,this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const v=d.defaultUri||this.defaultUri,a=await this.injector.get(m.IElectronMainUIService).showSaveDialog(l.electronEnv.currentWindowId,{defaultPath:v.resolve(d.defaultFileName||"").codeUri.fsPath,title:d.saveLabel,message:d.saveLabel});if(a){const b=l.URI.file(a);return this.updateRecentDefaultUri(b.parent),b}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let v;d.defaultUri?v=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):v=this.injector.get(g.FileTreeDialogService),await v.whenReady;const f=_.FileTreeDialogModel.createModel(this.injector,v),a=await this.dialogService.open({message:r.default.createElement(c.FileDialog,{key:this.idx++,fileService:v,model:f,options:d,isOpenDialog:!1}),type:l.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),a&&a.length>0){const b=l.URI.file(a[0]);return this.updateRecentDefaultUri(b.parent),b}else return}}};t.WindowDialogServiceImpl=h,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(p.IDialogService),n.__metadata("design:type",Object)],h.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(E.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(l.StorageProvider),n.__metadata("design:type",Function)],h.prototype,"storageProvider",void 0),n.__decorate([(0,o.Autowired)(l.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),t.WindowDialogServiceImpl=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},88014:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413);let m=class{constructor(){this.explorerResourceIsFolder=l.ExplorerResourceIsFolderContext.bind(this.globalContextKeyService),this.explorerViewletVisibleContext=l.ExplorerViewletVisibleContext.bind(this.globalContextKeyService)}initScopedContext(p){this._contextKeyService=this.globalContextKeyService.createScoped(p),this.explorerFocused=l.ExplorerFocusedContext.bind(this._contextKeyService),this.explorerResourceCut=l.ExplorerResourceCut.bind(this._contextKeyService),this.filesExplorerFocused=l.FilesExplorerFocusedContext.bind(this._contextKeyService),this.filesExplorerInputFocused=l.FilesExplorerInputFocusedContext.bind(this._contextKeyService),this.filesExplorerFilteredContext=l.FilesExplorerFilteredContext.bind(this._contextKeyService),this.explorerCompressedFocusContext=l.ExplorerCompressedFocusContext.bind(this._contextKeyService),this.explorerCompressedFirstFocusContext=l.ExplorerCompressedFirstFocusContext.bind(this._contextKeyService),this.explorerCompressedLastFocusContext=l.ExplorerCompressedLastFocusContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileContextKey=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"globalContextKeyService",void 0),t.FileContextKey=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},40439:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(16413),m=e(93899),E=e(68969),p=e(98295),_=e(41893),s=e(54414),g=e(32595),c=e(63067),h=e(58296),u=e(72665),d=e(51500),v=e(6250),f=e(69959),a=e(56384),b=e(57781),y=e(97738),S=e(4446);let A=class{constructor(){this._disposables=new o.DisposableStore,this.isRendered=!1,this.deleteThrottler=new o.Throttler,this.willDeleteUris=[]}initialize(){this.workspaceService.initFileServiceExclude().then(async()=>{await this.fileTreeService.init(),this.fileTreeModelService.initTreeModel()}),this.progressService.registerProgressIndicator(g.EXPLORER_CONTAINER_ID)}async onStart(){this.viewsRegistry.registerViewWelcomeContent(v.RESOURCE_VIEW_ID,{content:(0,o.formatLocalize)("welcome-view.noFolderHelp",o.FILE_COMMANDS.OPEN_FOLDER.id),group:h.ViewContentGroups.Open,order:1}),this.mainLayoutService.collectViewComponent({id:v.RESOURCE_VIEW_ID,name:this.getWorkspaceTitle(),weight:3,priority:9,collapsed:!1,component:a.FileTree},g.EXPLORER_CONTAINER_ID),this._disposables.add(this.workspaceService.onWorkspaceLocationChanged(()=>{const w=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);w&&w.updateViewTitle(v.RESOURCE_VIEW_ID,this.getWorkspaceTitle())}))}onDidStart(){const w=this.injector.get(S.SymlinkDecorationsProvider,[this.fileTreeService]);this.decorationService.registerDecorationsProvider(w)}onDidRender(){this.isRendered=!0;const w=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);w&&(this.fileTreeModelService.whenReady.then(()=>{this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(w.isActivated())}),w.onActivate(()=>{this.fileTreeModelService.performLocationOnHandleShow(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!0)}),w.onInActivate(()=>{this.fileTreeModelService.handleTreeBlur(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!1)}))}getWorkspaceTitle(){let w=(0,o.localize)("file.empty.defaultTitle");const D=this.workspaceService.workspace;return D&&(w=new o.URI(D.uri).displayName,!D.isDirectory&&w.endsWith(`.${this.workspaceService.workspaceSuffixName}`)&&(w=w.slice(0,w.lastIndexOf(".")),w===d.UNTITLED_WORKSPACE))?(0,o.localize)("file.workspace.defaultTip"):w}onReconnect(){this.fileTreeService.reWatch()}revealFile(w){if(w)if(this.isRendered){const D=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!D||!D.isVisible||D.isCollapsed(v.RESOURCE_VIEW_ID)?this.fileTreeModelService.locationOnShow(w):this.fileTreeModelService.location(w)}else this.fileTreeModelService.locationOnShow(w)}registerMenus(w){w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new")},order:1,group:"0_new"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new")},order:2,group:"0_new"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.removeFolderFromWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_RESOURCES.id,label:(0,o.localize)("file.open")},order:1,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("file.open.side")},order:2,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TYPE_WITH.id,label:(0,o.localize)("file.open.type")},order:3,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH.id,label:(0,o.localize)("file.filetree.openTerminalWithPath")},when:"workbench.panel.terminal",order:4,group:"1_open"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.SEARCH_ON_FOLDER.id,label:(0,o.localize)("file.search.folder")},order:1,group:"2_search"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.DELETE_FILE.id,label:(0,o.localize)("file.delete")},order:1,group:"7_modification"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.RENAME_FILE.id,label:(0,o.localize)("file.rename")},order:3,group:"7_modification"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("file.compare")},order:2,group:"3_compare"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_FILE.id,label:(0,o.localize)("file.copy.file")},order:1,group:"5_cutcopypaste"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.CUT_FILE.id,label:(0,o.localize)("file.cut.file")},order:2,group:"5_cutcopypaste"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.PASTE_FILE.id,label:(0,o.localize)("file.paste.file")},order:3,group:"5_cutcopypaste"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_PATH.id,label:(0,o.localize)("file.copy.path")},group:"6_copypath"}),w.registerMenuItem(m.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("file.copy.relativepath")},group:"6_copypath"})}registerCommands(w){const D=()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()};w.registerCommand(o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH,{execute:O=>{let P=O;if(!P)return;const R=this.fileTreeService.getNodeByPathOrUri(P);R&&!R.filestat.isDirectory&&(P=R.uri.parent),this.commandService.executeCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH.id,P)}}),w.registerCommand(o.FILE_COMMANDS.SEARCH_ON_FOLDER,{execute:async O=>{var P;let R=O;if(R||(this.fileTreeModelService.focusedFile?R=this.fileTreeModelService.focusedFile.uri:this.fileTreeModelService.selectedFiles.length>0&&(R=(P=this.fileTreeModelService.selectedFiles[0])===null||P===void 0?void 0:P.uri)),!R)return;let M;if(this.fileTreeService.isMultipleWorkspace)for(const k of await this.workspaceService.roots){const B=new o.URI(k.uri);if(B.isEqualOrParent(R)){M=`./${B.relative(R).toString()}`;break}}else if(this.workspaceService.workspace){const k=new o.URI(this.workspaceService.workspace.uri);k.isEqualOrParent(R)&&(M=`./${k.relative(R).toString()}`)}this.commandService.executeCommand(o.SEARCH_COMMANDS.OPEN_SEARCH.id,{includeValue:M+"/"})},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.LOCATION,{execute:O=>{O?this.revealFile(O):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0&&this.revealFile(this.fileTreeModelService.selectedFiles[0].uri)}}),w.registerCommand(o.FILE_COMMANDS.LOCATION_WITH_EDITOR,{execute:()=>{var O,P,R;((P=(O=this.workbenchEditorService.currentEditor)===null||O===void 0?void 0:O.currentUri)===null||P===void 0?void 0:P.scheme)===o.Schemes.file&&this.revealFile((R=this.workbenchEditorService.currentEditor)===null||R===void 0?void 0:R.currentUri)}}),w.registerCommand(o.FILE_COMMANDS.COLLAPSE_ALL,{execute:()=>{const O=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!O||!O.isVisible||this.fileTreeModelService.collapseAll()}}),w.registerCommand(o.FILE_COMMANDS.REFRESH_ALL,{execute:async()=>{const O=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!O||!O.isVisible||await this.fileTreeService.refresh()}}),w.registerCommand(o.FILE_COMMANDS.DELETE_FILE,{execute:(O,P)=>{if(D(),P?this.willDeleteUris=this.willDeleteUris.concat(P):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0?this.willDeleteUris=this.willDeleteUris.concat(this.fileTreeModelService.selectedFiles.map(R=>R.uri)):this.fileTreeModelService.focusedFile&&this.willDeleteUris.push(this.fileTreeModelService.focusedFile.uri),this.willDeleteUris.length!==0)return this.deleteThrottler.queue(this.doDelete.bind(this))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.RENAME_FILE,{execute:O=>{if(D(),!O)if(this.fileTreeModelService.contextMenuFile)O=this.fileTreeModelService.contextMenuFile.uri;else if(this.fileTreeModelService.focusedFile)O=this.fileTreeModelService.focusedFile.uri;else return;this.fileTreeModelService.renamePrompt(O)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.NEW_FILE,{execute:async O=>{var P;if(D(),O)this.fileTreeModelService.newFilePrompt(O);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let R;this.fileTreeService.isMultipleWorkspace?R=new o.URI((await this.workspaceService.roots)[0].uri):R=new o.URI((P=this.workspaceService.workspace)===null||P===void 0?void 0:P.uri),this.fileTreeModelService.newFilePrompt(R)}}}),w.registerCommand(o.FILE_COMMANDS.NEW_FOLDER,{execute:async O=>{var P;if(D(),O)this.fileTreeModelService.newDirectoryPrompt(O);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let R;this.fileTreeService.isMultipleWorkspace?R=new o.URI((await this.workspaceService.roots)[0].uri):R=new o.URI((P=this.workspaceService.workspace)===null||P===void 0?void 0:P.uri),this.fileTreeModelService.newDirectoryPrompt(R)}}}),w.registerCommand(o.FILE_COMMANDS.COMPARE_SELECTED,{execute:(O,P)=>{if(P&&P.length){const R=this.workbenchEditorService.currentEditor;R&&R.currentUri&&this.fileTreeService.compare(P[0],R.currentUri)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.OPEN_RESOURCES,{execute:O=>{this.fileTreeService.openAndFixedFile(O)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.OPEN_TO_THE_SIDE,{execute:O=>{this.fileTreeService.openToTheSide(O)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)});const I=(O,P)=>{const{availableOpenTypes:R,currentOpenType:M}=this.workbenchEditorService.currentEditorGroup;if(!(R&&O&&M))return{items:[],selectIndex:-1};const k=this.preferenceService.get("workbench.editorAssociations"),B=[],x=(U,Y)=>Y.type===s.EditorOpenType.code?U.type===s.EditorOpenType.code:Y.type===s.EditorOpenType.component&&U.type===s.EditorOpenType.component?U.componentId===Y.componentId:!1,N=(U,Y)=>(U?U+=(0,o.localize)("file.open.type.detail.and")+Y:U=Y,U);let j,K;if(k){const U=Object.keys(k).find(Y=>(0,o.match)(Y,O.path.toString().toLowerCase())||(0,o.match)(Y,O.path.base.toLowerCase()));j=U&&k[U]}return R.forEach((U,Y)=>{var z;const G={label:U.title||U.componentId||U.type,detail:U.title,run:Q=>P(Q,U)};x(M,U)&&(G.description=N(G.description,(0,o.localize)("file.open.type.detail.active")),K=Y),j&&(!((z=U.componentId)===null||z===void 0)&&z.endsWith(j))&&(G.description=N(G.description,(0,o.localize)("file.open.type.detail.default"))),B.push(new o.QuickOpenItem(G))}),{items:B,selectIndex:K}};w.registerCommand(o.FILE_COMMANDS.OPEN_TYPE_WITH,{execute:O=>{const P=(B,x)=>{var N,j;return B===o.Mode.OPEN?((N=this.workbenchEditorService.currentEditorGroup)===null||N===void 0||N.changeOpenType((j=x.componentId)!==null&&j!==void 0?j:x.type),!0):!1},{items:R,selectIndex:M}=I(O,P);if(R.length===0||typeof M>"u")return;const k=B=>{this.quickOpenService.open({onType:(x,N)=>N(B)},{fuzzyMatchLabel:!0,ignoreFocusOut:!1,placeholder:(0,o.formatLocalize)("file.open.type.placeholder",O.path.base),selectIndex:()=>M})};R.push(new o.QuickOpenItem({label:(0,o.formatLocalize)("file.open.type.preference.default",`*${O.path.ext}`),showBorder:!0,run:B=>{if(B===o.Mode.OPEN){const x=(K,U)=>{var Y,z,G;if(K===o.Mode.OPEN){const Q="workbench.editorAssociations",Z=this.preferenceService.resolve(Q).scope,$=this.preferenceService.get(Q);return this.preferenceService.set(Q,{...$||{},[`*${O.path.ext}`]:(Y=U.componentId)!==null&&Y!==void 0?Y:U.type},Z),(z=this.workbenchEditorService.currentEditorGroup)===null||z===void 0||z.changeOpenType((G=U.componentId)!==null&&G!==void 0?G:U.type),!0}return!1},{items:N,selectIndex:j}=I(O,x);if(N.length===0||typeof j>"u")return!0;k(N)}return!1}})),k(R)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!f.Directory.is(this.fileTreeModelService.contextMenuFile)}),w.registerCommand(o.FILE_COMMANDS.COPY_PATH,{execute:async O=>{if(!O)return;let R=O.path.toString();if(O.scheme===s.DIFF_SCHEME){const k=O.getParsedQuery();R=new o.URI(k.modified).path.toString()}let M=decodeURIComponent(R);await this.appService.backendOS===o.OperatingSystem.Windows&&(M=M.slice(1)),await this.clipboardService.writeText(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),w.registerCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH,{execute:async O=>{if(!O)return;if(O.scheme===s.DIFF_SCHEME){const R=O.getParsedQuery();O=new o.URI(R.modified).withScheme("file")}let P;if(this.fileTreeService.isMultipleWorkspace)for(const R of await this.workspaceService.roots){if(P=new o.URI(R.uri),P.isEqual(O))return await this.clipboardService.writeText("./");if(P.isEqualOrParent(O))return await this.clipboardService.writeText(decodeURIComponent(P.relative(O).toString()))}else if(this.workspaceService.workspace)return P=new o.URI(this.workspaceService.workspace.uri),P.isEqual(O)?await this.clipboardService.writeText("./"):await this.clipboardService.writeText(decodeURIComponent(P.relative(O).toString()))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),w.registerCommand(o.FILE_COMMANDS.COPY_FILE,{execute:(O,P)=>{if(P&&P.length)this.fileTreeModelService.copyFile(P);else{const R=this.fileTreeModelService.selectedFiles.map(M=>M.uri);R&&R.length&&this.fileTreeModelService.copyFile(R)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.SELECT_CURRENT_NODE,{execute:(O,P)=>{if(P&&P.length)this.fileTreeModelService.selectChildNode(P);else{const R=this.fileTreeModelService.selectedFiles.map(M=>M.uri);R&&R.length&&this.fileTreeModelService.selectChildNode(R)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.CUT_FILE,{execute:(O,P)=>{if(P&&P.length)this.fileTreeModelService.cutFile(P);else{const R=this.fileTreeModelService.selectedFiles.map(M=>M.uri);R&&R.length&&this.fileTreeModelService.cutFile(R)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),w.registerCommand(o.FILE_COMMANDS.PASTE_FILE,{execute:O=>{if(D(),O)this.fileTreeModelService.pasteFile(O);else if(this.fileTreeModelService.focusedFile){let P;this.fileTreeModelService.activeUri?P=this.fileTreeModelService.activeUri:P=this.fileTreeModelService.focusedFile.uri,this.fileTreeModelService.pasteFile(P)}},isEnabled:()=>this.fileTreeModelService.pasteStore&&this.fileTreeModelService.pasteStore.type!==v.PasteTypes.NONE||this.appConfig.isElectronRenderer}),w.registerCommand(o.FILE_COMMANDS.VSCODE_OPEN_FOLDER,{execute:(O,P)=>{const R=this.injector.get(o.IWindowService),M={newWindow:!0};return typeof P=="boolean"?M.newWindow=P:M.newWindow=typeof P?.forceNewWindow=="boolean"?P.forceNewWindow:!0,O?R.openWorkspace(O,M):this.commandService.executeCommand(o.FILE_COMMANDS.OPEN_FOLDER.id,M)},isVisible:()=>{const O=this.preferenceService.get("application.supportsOpenFolder");return O??!1}}),w.registerCommand(o.FILE_COMMANDS.OPEN_FOLDER,{execute:O=>{const P=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),properties:["openDirectory"]}).then(M=>{M&&M.length>0&&P.openWorkspace(o.URI.file(M[0]),O||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),canSelectFiles:!1,canSelectFolders:!0}).then(M=>{var k;M&&M.length>0&&this.injector.get(d.IWorkspaceService).open(M[0],{preserveWindow:(k=O?.newWindow)!==null&&k!==void 0?k:!1})})},isVisible:()=>{const O=this.preferenceService.get("application.supportsOpenFolder");return O??!1}}),w.registerCommand(o.FILE_COMMANDS.OPEN_WORKSPACE,{execute:O=>{if(!this.preferenceService.get("application.supportsOpenWorkspace"))return;const R=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),properties:["openFile"],filters:[{name:(0,o.localize)("workspace.openWorkspaceTitle"),extensions:[this.workspaceService.workspaceSuffixName]}]}).then(k=>{k&&k.length>0&&R.openWorkspace(o.URI.file(k[0]),O||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,filters:{workspace:[this.workspaceService.workspaceSuffixName]}}).then(k=>{var B;k&&k.length>0&&this.injector.get(d.IWorkspaceService).open(k[0],{preserveWindow:(B=O?.newWindow)!==null&&B!==void 0?B:!1})})},isVisible:()=>{const O=this.preferenceService.get("application.supportsOpenWorkspace");return O??!1}}),w.registerCommand(o.FILE_COMMANDS.REVEAL_IN_EXPLORER,{execute:O=>{var P;let R=O instanceof o.URI?O:O?.uri;const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);M&&!M.isVisible&&M.activate(),M&&M.isCollapsed(v.RESOURCE_VIEW_ID)&&M?.setCollapsed(v.RESOURCE_VIEW_ID,!1),!R&&(!((P=this.workbenchEditorService.currentEditor)===null||P===void 0)&&P.currentUri)&&(R=this.workbenchEditorService.currentEditor.currentUri),R&&this.revealFile(o.URI.parse(R.toString()))}}),w.registerCommand(o.FILE_COMMANDS.FOCUS_FILES,{execute:()=>{const O=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);O&&O.activate()}}),w.registerCommand(o.FILE_COMMANDS.OPEN_FILE,{execute:O=>this.windowDialogService.showOpenDialog(O)}),w.registerCommand(o.FILE_COMMANDS.SAVE_FILE,{execute:O=>this.windowDialogService.showSaveDialog(O)}),w.registerCommand(o.FILE_COMMANDS.FILTER_TOGGLE,{execute:()=>this.fileTreeService.toggleFilterMode()}),w.registerCommand(o.FILE_COMMANDS.FILTER_OPEN,{execute:()=>{if(!this.fileTreeService.filterMode)return this.fileTreeService.toggleFilterMode()}}),w.registerCommand(o.FILE_COMMANDS.FILTER_CLOSE,{execute:()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()}}),w.registerCommand(o.FILE_COMMANDS.NEXT,{execute:()=>{this.fileTreeModelService.moveToNext()}}),w.registerCommand(o.FILE_COMMANDS.PREV,{execute:()=>{this.fileTreeModelService.moveToPrev()}}),w.registerCommand(o.FILE_COMMANDS.COLLAPSE,{execute:()=>{this.fileTreeModelService.collapseCurrentFile()}}),w.registerCommand(o.FILE_COMMANDS.EXPAND,{execute:()=>{this.fileTreeModelService.expandCurrentFile()}}),w.registerCommand(o.FILE_COMMANDS.TOGGLE_OR_OPEN,{execute:()=>{this.fileTreeModelService.toggleOrOpenCurrentFile()}}),w.registerCommand(o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER,{execute:async(O,P)=>{if(D(),!P.length||!this.workspaceService.isMultiRootWorkspaceOpened)return;const R=await this.workspaceService.roots,M=P.filter(k=>R.find(B=>B.uri===k.toString()));M.length>0&&await this.workspaceService.removeRoots(M)},isVisible:()=>this.workspaceService.isMultiRootWorkspaceOpened&&!!this.fileTreeModelService.contextMenuFile&&!!this.workspaceService.tryGetRoots().find(O=>{var P;return O.uri===((P=this.fileTreeModelService.contextMenuFile)===null||P===void 0?void 0:P.uri.toString())})})}registerKeybindings(w){w.registerKeybinding({command:o.FILE_COMMANDS.COPY_FILE.id,keybinding:"ctrlcmd+c",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.PASTE_FILE.id,keybinding:"ctrlcmd+v",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.CUT_FILE.id,keybinding:"ctrlcmd+x",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.SELECT_CURRENT_NODE.id,keybinding:"ctrlcmd+a",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.RENAME_FILE.id,keybinding:"enter",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.DELETE_FILE.id,keybinding:"ctrlcmd+backspace",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.FILTER_OPEN.id,keybinding:"ctrlcmd+f",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.FILTER_CLOSE.id,keybinding:"esc",when:`${l.FilesExplorerFocusedContext.raw} && ${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.NEXT.id,keybinding:"down",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.PREV.id,keybinding:"up",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.EXPAND.id,keybinding:"right",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.COLLAPSE.id,keybinding:"left",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`}),w.registerKeybinding({command:o.FILE_COMMANDS.TOGGLE_OR_OPEN.id,keybinding:"space",when:`${l.FilesExplorerFocusedContext.raw} && !${l.FilesExplorerInputFocusedContext.raw} && !${l.FilesExplorerFilteredContext.raw}`})}registerToolbarItems(w){w.registerItem({id:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,command:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,label:(0,o.localize)("file.location"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !config.explorer.autoReveal && !${l.FilesExplorerFilteredContext.raw}`,order:0}),w.registerItem({id:o.FILE_COMMANDS.NEW_FILE.id,command:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:1}),w.registerItem({id:o.FILE_COMMANDS.NEW_FOLDER.id,command:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:2}),w.registerItem({id:o.FILE_COMMANDS.FILTER_TOGGLE.id,command:o.FILE_COMMANDS.FILTER_TOGGLE.id,label:(0,o.localize)("file.filetree.filter"),viewId:v.RESOURCE_VIEW_ID,toggledWhen:`${l.FilesExplorerFilteredContext.raw}`,order:3}),w.registerItem({id:o.FILE_COMMANDS.REFRESH_ALL.id,command:o.FILE_COMMANDS.REFRESH_ALL.id,label:(0,o.localize)("file.refresh"),viewId:v.RESOURCE_VIEW_ID,when:`view == '${v.RESOURCE_VIEW_ID}' && !${l.FilesExplorerFilteredContext.raw}`,order:4}),w.registerItem({id:o.FILE_COMMANDS.COLLAPSE_ALL.id,command:o.FILE_COMMANDS.COLLAPSE_ALL.id,label:(0,o.localize)("file.collapse"),viewId:v.RESOURCE_VIEW_ID,order:5}),w.registerItem({id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,command:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace"),viewId:v.RESOURCE_VIEW_ID,order:0,group:"file_explore_workspace",when:"config.workspace.supportMultiRootWorkspace"})}doDelete(){const w=this.willDeleteUris.slice();return this.willDeleteUris=[],this.fileTreeModelService.deleteFileByUris(w)}dispose(){this._disposables.dispose()}};t.FileTreeContribution=A,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],A.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.IFileTreeService),n.__metadata("design:type",b.FileTreeService)],A.prototype,"fileTreeService",void 0),n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],A.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(E.IProgressService),n.__metadata("design:type",Object)],A.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(d.IWorkspaceService),n.__metadata("design:type",Object)],A.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(y.FileTreeModelService),n.__metadata("design:type",y.FileTreeModelService)],A.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(_.IDecorationsService),n.__metadata("design:type",_.IDecorationsService)],A.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),n.__metadata("design:type",s.WorkbenchEditorService)],A.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],A.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(u.IWindowDialogService),n.__metadata("design:type",Object)],A.prototype,"windowDialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],A.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],A.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],A.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(c.IViewsRegistry),n.__metadata("design:type",Object)],A.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],A.prototype,"appService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],A.prototype,"appConfig",void 0),t.FileTreeContribution=A=n.__decorate([(0,p.Domain)(m.MenuContribution,o.CommandContribution,o.KeybindingContribution,o.TabBarToolbarContribution,o.ClientAppContribution,c.MainLayoutContribution)],A)},2812:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModel=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(69959),p=e(93239);let _=n=class extends l.TreeModel{constructor(g){super(),this.flushDispatchChangeDelayer=new m.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(g)}init(g){this.root=g,this.root.watcher.on(l.TreeNodeEvent.BranchDidUpdate,this.doDispatchChange.bind(this)),this.decorationService.onDidChange(this.doDispatchChange.bind(this))}doDispatchChange(){this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})}};t.FileTreeModel=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(p.FileTreeDecorationService),r.__metadata("design:type",p.FileTreeDecorationService)],_.prototype,"decorationService",void 0),t.FileTreeModel=_=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[E.Directory])],_)},46377:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(97267),m=e(41869),E=e(69959),p=n.__importDefault(e(89200)),{Path:_}=m.path,s=({item:g,onClick:c,onDoubleClick:h,onContextMenu:u,dndService:d,itemType:v,decorationService:f,labelService:a,leftPadding:b=8,onTwistierClick:y,decorations:S,defaultLeftPadding:A=8,template:T,hasFolderIcons:w,hasFileIcons:D,hidesExplorerArrows:I,hasPrompt:O,iconService:P})=>{const[R,M]=o.default.useState(-1),k=v===l.TreeNodeType.RenamePrompt,B=v===l.TreeNodeType.NewPrompt,x=k||B,N=!x&&g.name.indexOf(_.separator)>=0,j=(0,m.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),K=(0,m.useDesignStyles)(p.default.file_tree_node,"file_tree_node"),U=x?null:f.getDecoration(g.uri,E.Directory.is(g)),Y=we=>{(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&(N&&M(g.name.split(_.separator).length-1),c(we,g,v))},z=we=>{(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&(N&&M(g.name.split(_.separator).length-1),h(we,g,v))},G=we=>{(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&(y?y(we,g,v):c(we,g,v))},Q=o.default.useCallback(we=>{we.nativeEvent.which!==0&&(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&u(we,g,v)},[u,g]),Z=o.default.useCallback(we=>{const{handleDragStart:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),$=o.default.useCallback(we=>{const{handleDragLeave:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),H=o.default.useCallback(we=>{const{handleDragEnter:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),X=o.default.useCallback(we=>{const{handleDrop:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]),J=o.default.useCallback(we=>{const{handleDragOver:ve}=d;(v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode)&&ve(we,g)},[d,g]);let re=v===l.TreeNodeType.CompositeTreeNode,ce;x?B?(re=g.type===l.TreeNodeType.CompositeTreeNode,ce=`${A+(g.parent.depth+1||0)*(b||0)+(re?0:w?I?0:20:0)}px`):(re=g.target.type===l.TreeNodeType.CompositeTreeNode,ce=`${A+(g.target.depth||0)*(b||0)+(re?0:w?I?0:20:0)}px`):ce=`${A+(g.depth||0)*(b||0)+(re?0:w?I?0:20:0)}px`;const fe={color:U?U.color:"",height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:ce,opacity:O&&!x?".6":"1"},Ae=(we,ve)=>{if(S&&S?.classlist.indexOf(p.default.mod_loading)>-1)return o.default.createElement(l.Loading,null);if(x&&we instanceof l.PromptHandle){let be=!1;if(k?be=we.target.type===l.TreeNodeType.CompositeTreeNode:be=we.type===l.TreeNodeType.CompositeTreeNode,be)return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,j,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:B||!(k&&we.target.type===l.TreeNodeType.CompositeTreeNode&&we.target.expanded)})})}else return o.default.createElement("div",{onClick:ve,className:(0,r.default)(p.default.file_tree_node_segment,j,(0,m.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:!we.expanded})})},te=we=>{let ve,be;x&&we instanceof l.PromptHandle?we instanceof l.RenamePromptHandle?(ve=we.target.uri.resolve(we.$.value),be=E.Directory.is(we.target)):(ve=we.parent.uri.resolve(we.$.value),be=we.type===l.TreeNodeType.CompositeTreeNode):(ve=we.uri,be=we.filestat.isDirectory);const Ce=a.getIcon(ve,{isDirectory:be,isOpenedDirectory:be&&we.expanded});return be&&!w||!be&&!D?null:o.default.createElement("div",{className:(0,r.default)(p.default.file_icon,Ce,{expanded:be&&we.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},Le=we=>{if(T)return o.default.createElement(T,null);if(x&&we instanceof l.PromptHandle)return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",p.default.file_tree_node_prompt_box)},o.default.createElement(we.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}})));if(N){const ve=we.displayName.split(_.separator),be=ve.map((Ce,Ne)=>{const tt=ve.slice(0,Ne+1).join(_.separator),Fe=ze=>{ze.stopPropagation(),M(Ne);const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));c(ze,g,v,Qe)},$e=ze=>{ze.stopPropagation(),M(Ne);const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));u(ze,g,v,Qe)},Se=ze=>{ze.stopPropagation(),ze.preventDefault(),R!==Ne&&(M(Ne),d.handleDragOver(ze,g))},ae=ze=>{ze.stopPropagation(),ze.preventDefault(),M(-1)},ye=ze=>{ze.stopPropagation(),R!==Ne&&M(Ne);const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));d.handleDragStart(ze,g,Qe)},Re=ze=>{const Qe=g.parent.uri.resolve(ve.slice(0,Ne+1).join(_.separator));d.handleDrop(ze,g,Qe)},Be=(0,r.default)(R===Ne&&p.default.active,p.default.compact_name);return o.default.createElement("span",{key:tt},o.default.createElement("a",{className:Be,draggable:!0,onContextMenu:$e,onDragStart:ye,onDragOver:Se,onDragLeave:ae,onDrop:Re,onClick:Fe},Ce),Ne!==ve.length-1?o.default.createElement("span",{className:p.default.compact_name_separator},_.separator):null)});return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_displayname)},be)}return o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_displayname)},a.getName(we.uri)||we.displayName)},Te=()=>o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_segment,p.default.file_tree_node_tail)},oe()),oe=()=>U?o.default.createElement("div",{className:p.default.file_tree_node_status},(0,m.transformLabelWithCodicon)(U.badge.slice(),{color:"inherit"},P.fromString.bind(P))):null,le=we=>{if(I)return null;if(re)return Ae(we,G);if(x)return Ae(we,()=>{})},Ee=()=>{let we=g.tooltip;return U&&U.badge&&(we+=` \u2022 ${U.tooltip}`),we};return o.default.createElement("div",{key:g.id,onClick:Y,onDoubleClick:z,onContextMenu:Q,onDragStart:Z,onDragOver:J,onDragEnter:H,onDragLeave:$,onDrop:X,title:Ee(),className:(0,r.default)(K,S?S.classlist:null),style:fe,draggable:v===l.TreeNodeType.TreeNode||v===l.TreeNodeType.CompositeTreeNode,"data-id":g.id},o.default.createElement("div",{className:(0,r.default)(p.default.file_tree_node_content)},le(g),te(g),o.default.createElement("div",{className:x?p.default.file_tree_node_prompt_wrap:p.default.file_tree_node_overflow_wrap},Le(g)),Te()))};t.FileTreeNode=s,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},56384:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTree=t.FILE_TREE_FILTER_DELAY=t.FILTER_AREA_HEIGHT=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),m=e(41869),E=e(68974),p=e(24429),_=e(87420),s=e(6250),g=e(46377),c=n.__importDefault(e(2613)),h=e(97738);t.FILTER_AREA_HEIGHT=30,t.FILE_TREE_FILTER_DELAY=500;const u=(0,l.RecycleTreeFilterDecorator)(l.RecycleTree),d=({viewState:f})=>{const[a,b]=(0,o.useState)(!1),[y,S]=(0,o.useState)(!0),[A,T]=(0,o.useState)(!1),[w,D]=(0,o.useState)(!1),[I,O]=(0,o.useState)(),P=(0,o.useRef)(null),R=(0,o.useRef)(new m.DisposableCollection),{height:M}=f,k=(0,m.useInjectable)(s.IFileTreeService),{iconService:B,locationToCurrentFile:x,filterMode:N,indent:j,baseIndent:K}=k,U=(0,m.useInjectable)(h.FileTreeModelService),[Y,z]=(0,o.useState)({indent:j,baseIndent:K}),[G,Q]=(0,o.useState)(N),[Z,$]=(0,o.useState)(B.currentTheme||{hasFolderIcons:!0,hasFileIcons:!0,hidesExplorerArrows:!0}),H=(0,o.useCallback)(tt=>X(tt)?!1:tt.shiftKey,[]),X=(0,o.useCallback)(tt=>{const{metaKey:Fe,ctrlKey:$e}=tt;return m.isOSX&&Fe||$e},[]),J=(0,o.useCallback)((tt,Fe,$e,Se)=>{tt.stopPropagation();const{handleItemClick:ae,handleItemToggleClick:ye,handleItemRangeClick:Re}=U;if(!Fe)return;const Be=H(tt),ze=X(tt);Be?Re(Fe,$e):ze?ye(Fe,$e):ae(Fe,$e,Se)},[]),re=(0,o.useCallback)((tt,Fe,$e)=>{tt.stopPropagation();const{handleItemDoubleClick:Se}=U;Fe&&Se(Fe,$e)},[]),ce=(0,o.useCallback)((tt,Fe)=>{tt.stopPropagation();const{toggleDirectory:$e}=U;$e(Fe)},[]);(0,o.useEffect)(()=>{a&&U.onFileTreeModelChange(async tt=>{S(!0),tt&&await tt.ensureReady,O(tt),S(!1)})},[a]),(0,o.useEffect)(()=>{var tt,Fe,$e;const Se=new m.CancellationTokenSource;return te(Se.token),(tt=R.current)===null||tt===void 0||tt.push(B.onThemeChange(ae=>{$(ae)})),(Fe=R.current)===null||Fe===void 0||Fe.push(k.onTreeIndentChange(({indent:ae,baseIndent:ye})=>{z({indent:ae,baseIndent:ye})})),($e=R.current)===null||$e===void 0||$e.push(k.onFilterModeChange(ae=>{Q(ae)})),()=>{var ae;Se.cancel(),(ae=R.current)===null||ae===void 0||ae.dispose()}},[]);const fe=(0,o.useCallback)((tt,Fe)=>{let $e;if(tt&&Fe)for($e=tt.parentNode;$e;){if(Fe===$e)return!0;$e=$e.parentNode}return!1},[]),Ae=(0,o.useCallback)(tt=>{fe(tt.relatedTarget,P.current)||!tt.relatedTarget||(T(!1),U.handleTreeBlur())},[P.current]);(0,o.useEffect)(()=>{G||(U.fileTreeHandle&&U.fileTreeHandle.clearFilter(),U.selectedFiles.length===1&&U.location(U.selectedFiles[0].uri))},[G]),(0,o.useEffect)(()=>{const tt=new m.DisposableCollection;return I&&(tt.push(U.onDidFocusedFileChange(Fe=>{Fe?Fe.isEqual((I?.root).uri)?A||T(!A):A&&T(!A):Fe||A&&T(!A)})),tt.push(U.onDidContextMenuFileChange(Fe=>{Fe?Fe.isEqual((I?.root).uri)?A||T(!A):A&&T(!A):Fe||A&&T(!A)}))),()=>{tt.dispose()}},[I,A]);const te=(0,o.useCallback)(async tt=>{var Fe;if(await U.whenReady,!tt.isCancellationRequested){if(U.treeModel){if(await U.treeModel.ensureReady,O(U.treeModel),tt.isCancellationRequested)return;P.current&&k.initContextKey(P.current)}S(!1),!((Fe=R.current)===null||Fe===void 0)&&Fe.disposed||b(!0)}},[U,R.current]),Le=(0,o.useCallback)(tt=>{U.handleTreeHandler({...tt,getModel:()=>U.treeModel,hasDirectFocus:()=>P.current===document.activeElement})},[P.current,I]),Te=(0,o.useCallback)(()=>{const{handleItemClick:tt}=U;tt()},[]),oe=(0,o.useCallback)(()=>{U.handleDblClick()},[]),le=(0,o.useCallback)(()=>{const{handleTreeFocus:tt}=U;tt()},[]),Ee=(0,o.useCallback)(tt=>{const{handleContextMenu:Fe}=U;Fe(tt)},[]),we=(0,o.useCallback)(tt=>{tt.stopPropagation(),tt.preventDefault()},[]),ve=(0,o.useCallback)(tt=>{tt.preventDefault(),D(!0)},[]),be=(0,o.useCallback)(()=>{D(!1)},[]),Ce=(0,o.useCallback)(tt=>{const{handleDrop:Fe}=U.dndService;D(!1),Fe(tt)},[]),Ne=(0,o.useCallback)((tt,Fe,$e,Se)=>{const{handleContextMenu:ae}=U;ae(tt,Fe,Se)},[]);return o.default.createElement("div",{className:(0,r.default)(c.default.file_tree,w&&c.default.outer_drag_over,A&&c.default.outer_active),tabIndex:-1,ref:P,onClick:Te,onDoubleClick:oe,onFocus:le,onBlur:Ae,onContextMenu:Ee,draggable:!0,onDragStart:we,onDragLeave:be,onDragOver:ve,onDrop:Ce},o.default.createElement(v,{isLoading:y,isReady:a,height:M,model:I,iconTheme:Z,treeIndent:Y,filterMode:G,locationToCurrentFile:x,onTreeReady:Le,onContextMenu:Ne,onItemClick:J,onItemDoubleClick:re,onTwistierClick:ce}))};t.FileTree=d;const v=(0,o.memo)(({isReady:f,isLoading:a,height:b,model:y,filterMode:S,treeIndent:A,iconTheme:T,onTreeReady:w,onItemClick:D,onItemDoubleClick:I,onContextMenu:O,onTwistierClick:P})=>{const R=(0,m.useInjectable)(s.IFileTreeService),M=(0,m.useInjectable)(_.IIconService),{decorationService:k,labelService:B,locationToCurrentFile:x}=R,N=(0,m.useInjectable)(h.FileTreeModelService),j=(0,o.useCallback)(K=>o.default.createElement(g.FileTreeNode,{item:K.item,itemType:K.itemType,template:K.template,decorationService:k,labelService:B,iconService:M,dndService:N.dndService,decorations:N.decorations.getDecorations(K.item),onClick:D,onDoubleClick:I,onTwistierClick:P,onContextMenu:O,defaultLeftPadding:A.baseIndent,leftPadding:A.indent,hasPrompt:K.hasPrompt,hasFolderIcons:T.hasFolderIcons,hasFileIcons:T.hasFileIcons,hidesExplorerArrows:T.hidesExplorerArrows}),[y,A,T]);return f?a?o.default.createElement(E.Progress,{loading:!0}):y?o.default.createElement(u,{height:b,itemHeight:g.FILE_TREE_NODE_HEIGHT,onReady:w,model:y,filterEnabled:S,filterAfterClear:x,filterAutoFocus:!0,leaveBottomBlank:!0},j):o.default.createElement(p.WelcomeView,{viewId:s.FILE_EXPLORER_WELCOME_ID}):o.default.createElement(E.Progress,{loading:!0})});v.displayName="FileTreeView"},57781:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeService=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),m=e(18193),E=e(26542),p=e(42933),_=e(52416),s=e(51500),g=e(6250),c=e(69959),h=e(88014),u=e(93239),{Path:d}=l.path;let v=class extends o.Tree{constructor(){super(...arguments),this._fileServiceWatchers=new Map,this._symbolicFiles=new Map,this._changeEventDispatchQueue=new Set,this._readyToWatch=!1,this._watchRootsQueue=[],this.effectedNodes=[],this.onWorkspaceChangeEmitter=new l.Emitter,this.onTreeIndentChangeEmitter=new l.Emitter,this.onFilterModeChangeEmitter=new l.Emitter,this.onNodeRefreshedEmitter=new l.Emitter,this._filterMode=!1,this._refreshable=!0,this.refreshEffectNode=()=>{const a=this.effectedNodes.slice(0);if(this.effectedNodes=[],a.find(y=>c.Directory.isRoot(y)))this.refresh();else for(const y of a)this.refresh(y)},this.flushEventQueue=async()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.size===0)return;const a=Array.from(this._changeEventDispatchQueue),b=this.sortPaths(a);(!this.refreshCancelToken||this.refreshCancelToken.token.isCancellationRequested)&&(this.refreshCancelToken=new l.CancellationTokenSource);const y=(0,l.pSeries)(b.map(S=>async()=>{c.Directory.is(S.node)&&await S.node.refresh(this.refreshCancelToken)}));return this._changeEventDispatchQueue.clear(),await y},this.locationToCurrentFile=()=>{this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}get refreshable(){return this._refreshable}get filterMode(){return this._filterMode}get baseIndent(){return this._baseIndent}get indent(){return this._indent}get onWorkspaceChange(){return this.onWorkspaceChangeEmitter.event}get onTreeIndentChange(){return this.onTreeIndentChangeEmitter.event}get onFilterModeChange(){return this.onFilterModeChangeEmitter.event}get isCompactMode(){return this._isCompactMode}get contextKey(){return this.fileContextKey}async init(){this._roots=await this.workspaceService.roots,await this.preferenceService.ready,this._baseIndent=this.preferenceService.getValid("explorer.fileTree.baseIndent",8),this._indent=this.preferenceService.getValid("explorer.fileTree.indent",8),this._isCompactMode=this.preferenceService.getValid("explorer.compactFolders",!0),this.toDispose.push(this.workspaceService.onWorkspaceChanged(a=>{this._roots=a;const b=new l.URI(a[0].uri),y=new c.Directory(this,void 0,b,b.displayName,a[0],this.fileTreeAPI.getReadableTooltip(b));this.root=y,this.onWorkspaceChangeEmitter.fire(y),this.refresh()})),this.toDispose.push(this.workspaceService.onWorkspaceFileExcludeChanged(()=>{this.refresh()})),this.toDispose.push(l.Disposable.create(()=>{var a;(a=this._root)===null||a===void 0||a.dispose(),this._roots=null})),this.toDispose.push(this.corePreferences.onPreferenceChanged(a=>{a.preferenceName==="explorer.fileTree.baseIndent"?(this._baseIndent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.fileTree.indent"?(this._indent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.compactFolders"&&(this._isCompactMode=a.newValue,this.refresh())}))}initContextKey(a){this.fileContextKey.initScopedContext(a)}startWatchFileEvent(){return this._readyToWatch=!0,Promise.all(this._watchRootsQueue.map(a=>this.watchFilesChange(a)))}async resolveChildren(a){var b,y,S,A;let T=[];if(a){if(c.Directory.isRoot(a)&&this.isMultipleWorkspace){const w=await this.workspaceService.roots;for(const D of w){const I=this.fileTreeAPI.toNode(this,D,a,this.workspaceService.getWorkspaceName(new l.URI(D.uri)));this.watchFilesChange(new l.URI(D.uri)),T=T.concat(I),(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)}return T}if(a.uri){const w=await this.fileTreeAPI.resolveChildren(this,a.uri.toString(),a,this.isCompactMode&&!c.Directory.isRoot(a));T=w.children,T.forEach(I=>{(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)});const D=w.filestat;if(D&&this.isCompactMode&&!c.Directory.isRoot(a)){const I=new l.URI(D.uri),O=a.parent;if(a&&O){let P=a.name;if(a.filestat.isSymbolicLink){const R=(y=new l.URI(a.filestat.realUri).relative(I))===null||y===void 0?void 0:y.toString();R&&(P=R,P=[a.uri.displayName].concat(P.split(d.separator)).join(d.separator))}else O.filestat.isSymbolicLink?P=(S=new l.URI(O.filestat.realUri).relative(I))===null||S===void 0?void 0:S.toString():P=(A=O.uri.relative(I))===null||A===void 0?void 0:A.toString();P&&P!==a.name&&a.updateMetaData({name:P,uri:I,tooltip:this.fileTreeAPI.getReadableTooltip(I),fileStat:D})}}return T}}else if(this._roots||(this._roots=await this.workspaceService.roots),this.isMultipleWorkspace){const w=new l.URI((b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri);let D=w.displayName;D=D.slice(0,D.lastIndexOf("."));const I={...this.workspaceService.workspace,isDirectory:!0},O=new c.Directory(this,void 0,w,D,I,this.fileTreeAPI.getReadableTooltip(w));return this.root=O,[O]}else if(this._roots.length>0)return T=await(await this.fileTreeAPI.resolveChildren(this,this._roots[0])).children,T.forEach(w=>{const D=this.workspaceService.getWorkspaceName(w.uri);D&&D!==w.name&&w.updateMetaData({name:D}),(w.filestat.isSymbolicLink||w.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(w.filestat.uri,w)}),this.watchFilesChange(new l.URI(this._roots[0].uri)),this.root=T[0],T;return[]}async watchFilesChange(a){if(!this._readyToWatch){this._watchRootsQueue.push(a);return}const b=await this.fileServiceClient.watchFileChanges(a);this.toDispose.push(b),this.toDispose.push(b.onFilesChanged(y=>{this.onFilesChanged(y)})),this._fileServiceWatchers.set(a.toString(),b)}updateRefreshable(a){var b;a!==this.refreshable&&(this._refreshable=a,this._refreshable?this.doHandleQueueChange():(b=this.refreshCancelToken)===null||b===void 0||b.cancel())}isContentFile(a){return!!a&&"filestat"in a&&!a.filestat.isDirectory}isFileContentChanged(a){return a.type===p.FileChangeType.UPDATED&&this.isContentFile(this.getNodeByPathOrUri(a.uri))}getAffectedChanges(a){const b=[];for(const y of a)this.isFileContentChanged(y)||b.push(y);return b}isRootAffected(a){return this._roots?a.some(b=>b.type>p.FileChangeType.UPDATED&&this._roots&&this._roots.find(y=>b.uri.indexOf(y.uri)>=0)):!1}async onFilesChanged(a){const b=await this.getAffectedNodes(this.getAffectedChanges(a));return b.length>0?this.effectedNodes=this.effectedNodes.concat(b):!(b.length>0)&&this.isRootAffected(a)&&this.effectedNodes.push(this.root),this.refreshEffectNode()}async getFileTreeNodePathByUri(a){var b,y,S,A,T,w;if(!a)return;let D;if(this.isMultipleWorkspace){if(this._roots||(this._roots=await this.workspaceService.roots),D=(A=this._roots.find(I=>new l.URI(I.uri).isEqualOrParent(a)))===null||A===void 0?void 0:A.uri,D){const I=new l.URI(D);if(I.isEqualOrParent(a))return new d(((T=this.root)===null||T===void 0?void 0:T.path)||"/").join(I.displayName).join(((w=I.relative(a))===null||w===void 0?void 0:w.toString())||"").toString()}}else if(D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,D){const I=new l.URI(D);if(I.isEqualOrParent(a))return new d(((y=this.root)===null||y===void 0?void 0:y.path)||"").join(((S=I.relative(a))===null||S===void 0?void 0:S.toString())||"").toString()}}async moveNodeByPath(a,b,y,S,A=o.TreeNodeType.TreeNode){const T=new d(a.path).join(y).toString(),w=new d(b.path).join(S).toString();if(T&&w&&w!==T){const D=a.moveNode(T,w);return D&&c.File.is(D)&&(D.updateMetaData({uri:b.uri.resolve(S),fileStat:{...b.filestat,uri:b.uri.resolve(S).toString(),isDirectory:A!==o.TreeNodeType.TreeNode},tooltip:this.fileTreeAPI.getReadableTooltip(b.uri.resolve(S))}),c.Directory.is(D)&&this.updateChildren(D)),D}}async updateChildren(a){const b=a.children;if(!(!b||b.length===0)){for(const y of b)if(c.File.is(y)){const S=a.uri.resolve(y.uri.displayName);y.updateMetaData({uri:S,fileStat:{...y.filestat,uri:S.toString(),isDirectory:!!c.Directory.is(y)},tooltip:this.fileTreeAPI.getReadableTooltip(S)}),c.Directory.is(y)&&this.updateChildren(y)}}}async addNode(a,b,y){let S,A;const T=d.splitPath(b);if(T.length>1){let D=a.uri;for(const I of T)D=D.resolve(I);!this.isCompactMode||c.Directory.isRoot(a)?A=T[0]:y===o.TreeNodeType.CompositeTreeNode?A=b:A=T.slice(0,T.length-1).join(d.separator)}else A=b;S={uri:a.uri.resolve(A).toString(),isDirectory:y===o.TreeNodeType.CompositeTreeNode||T.length>1,isSymbolicLink:!1,lastModification:new Date().getTime()};const w=await this.fileTreeAPI.toNode(this,S,a,A);return w&&a.addNode(w),w}async deleteAffectedNodeByPath(a,b){var y,S;const A=this.getNodeByPathOrUri(a);A&&A.parent&&(this.isCompactMode&&!b?((y=A.parent.children)===null||y===void 0?void 0:y.length)===2?this.refresh((S=A.parent)===null||S===void 0?void 0:S.parent):this.refresh(A.parent):A.parent.removeNode(A.path))}async deleteAffectedNodes(a,b=[]){const y=[];for(const S of a){const A=this.getNodeByPathOrUri(S);A&&c.File.is(A)&&y.push(A)}for(const S of y)!S?.parent||this._changeEventDispatchQueue.has(S?.parent.path)||await this.deleteAffectedNodeByPath(S.path);return b.filter(S=>S.type!==p.FileChangeType.DELETED)}async getAffectedNodes(a){const b=[];for(const y of a){const S=new l.URI(y.uri),A=this.getNodeByPathOrUri(S.parent);A&&b.push(A)}return b}isFileURI(a){return/^file:\/\//.test(a)}getNodeByPathOrUri(a){var b,y,S,A;let T,w;if(typeof a!="string"?(w=a,a=a.toString()):this.isFileURI(a)?w=new l.URI(a):!this.isFileURI(a)&&typeof a=="string"&&(T=a),this.isFileURI(a)&&w){if(this._symbolicFiles.has(w?.toString()))return this._symbolicFiles.get(w.toString());let D;if(this.isMultipleWorkspace?this._roots&&(D=(y=this._roots.find(I=>new l.URI(I.uri).isEqualOrParent(w)))===null||y===void 0?void 0:y.uri):D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,this.root&&D){const I=new l.URI(D);if(I.isEqualOrParent(w)){const O=I.relative(w);O&&(T=new d(this.root.path).join(O.toString()).toString())}}}if(T){const D=(S=this.root)===null||S===void 0?void 0:S.getTreeNodeByPath(T);if(!D){let I;const O=T.split(d.separator);for(;O.length>=1;){O.pop();const P=O.join(d.separator);if(I=(A=this.root)===null||A===void 0?void 0:A.getTreeNodeByPath(P),I)break}if(I&&c.Directory.is(I)){for(const P of I.children||[])if(P.path.includes(T))return P}}return D}}sortComparator(a,b){return a.constructor===b.constructor?a.name.localeCompare(b.name,"en",{numeric:!0}):a.type===o.TreeNodeType.CompositeTreeNode?-1:b.type===o.TreeNodeType.CompositeTreeNode?1:0}get contextMenuContextKeyService(){return this.fileContextKey?this.fileContextKey.service:this.contextKeyService}reWatch(){for(const[a,b]of this._fileServiceWatchers)b.dispose(),this.watchFilesChange(new l.URI(a))}get isMultipleWorkspace(){return!!this.workspaceService.workspace&&!this.workspaceService.workspace.isDirectory}getDisplayName(a){return this.workspaceService.getWorkspaceName(a)}async refresh(a=this.root){if(a)return c.Directory.is(a)||c.File.is(a)&&a.parent&&(a=a.parent),this._changeEventDispatchQueue.add(a.path),this.doHandleQueueChange()}async doHandleQueueChange(){if(this.refreshable)try{await this.flushEventQueue()}catch(a){this.logger.error("flush file change event queue error:",a)}finally{this.onNodeRefreshedEmitter.fire()}}sortPaths(a){const y=a.slice().map(A=>({node:this.getNodeByPathOrUri(A),path:A})).filter(A=>A&&!!A.node);a.length>1&&y.sort((A,T)=>{var w,D;const I=((w=A.node)===null||w===void 0?void 0:w.depth)||0,O=((D=T.node)===null||D===void 0?void 0:D.depth)||0;return I-O});const S=[];for(let A=y.length-1;A>=0;A--){const T=y[A];let w=!1;for(let D=0;D<A;D++){const I=y[D];c.Directory.is(I)&&T.node.path.startsWith(I.node.path)&&(w=!0)}w||S.push(T)}return S}openFile(a){const b=this.preferenceService.get("editor.previewMode");this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:b})}openAndFixedFile(a){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:!1,focus:!0})}openToTheSide(a){this.commandService.executeCommand(l.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,split:4})}compare(a,b){this.commandService.executeCommand(l.EDITOR_COMMANDS.COMPARE.id,{original:a,modified:b})}toggleFilterMode(){var a;this._filterMode=!this.filterMode,this.onFilterModeChangeEmitter.fire(this.filterMode),(a=this.fileContextKey)===null||a===void 0||a.filesExplorerFilteredContext.set(this.filterMode),this.filterMode===!1&&this.commandService.executeCommand(l.FILE_COMMANDS.LOCATION.id)}};t.FileTreeService=v,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],v.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],v.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(m.CorePreferences),n.__metadata("design:type",Object)],v.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(E.LabelService),n.__metadata("design:type",E.LabelService)],v.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileTreeDecorationService),n.__metadata("design:type",u.FileTreeDecorationService)],v.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],v.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(h.FileContextKey),n.__metadata("design:type",h.FileContextKey)],v.prototype,"fileContextKey",void 0),t.FileTreeService=v=n.__decorate([(0,r.Injectable)()],v)},83709:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeNextModule=void 0;const n=e(85608),r=e(41869),o=e(72665),l=e(41103),m=e(6250),E=e(89508),p=e(40439),_=e(57781),s=e(88808),g=e(93239),c=e(97738),h=e(24861);let u=class extends r.BrowserModule{constructor(){super(...arguments),this.providers=[{token:m.IFileTreeAPI,useClass:s.FileTreeAPI},{token:g.FileTreeDecorationService,useClass:g.FileTreeDecorationService},{token:m.IFileTreeService,useClass:_.FileTreeService},{token:c.FileTreeModelService,useClass:c.FileTreeModelService},{token:o.IWindowDialogService,useClass:E.WindowDialogServiceImpl},p.FileTreeContribution]}};t.FileTreeNextModule=u,t.FileTreeNextModule=u=n.__decorate([(0,r.Domain)(h.name),(0,r.ModuleDependencies)([l.WorkspaceModule])],u)},88808:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeAPI=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(42933),E=e(72665),p=e(26199),_=e(69959);let s=class{async resolveChildren(c,h,u,d){var v;let f;if(!this.userhomePath){const a=await this.fileServiceClient.getCurrentUserHome();a&&(this.userhomePath=new l.URI(a.uri))}if(typeof h=="string"?f=await this.fileServiceClient.getFileStat(h):f=await this.fileServiceClient.getFileStat(h.uri),f){if(((v=f.children)===null||v===void 0?void 0:v.length)===1&&f.children[0].isDirectory&&d)return await this.resolveChildren(c,f.children[0].uri,u,d);{const a={...f,isInSymbolicDirectory:u?.filestat.isSymbolicLink||u?.filestat.isInSymbolicDirectory};return{children:this.toNodes(c,a,u),filestat:a}}}else return{children:[],filestat:null}}async resolveNodeByPath(c,h,u){const d=await this.fileServiceClient.getFileStat(h);if(d)return this.toNode(c,d,u)}async resolveFileStat(c){return await this.fileServiceClient.getFileStat(c.toString())}toNodes(c,h,u){if(u){if(h.children)return h.children.map(d=>this.toNode(c,d,u))}else return[this.toNode(c,h,u)];return[]}toNode(c,h,u,d){var v;const f=new l.URI(h.uri),a=d||f.displayName;let b;return h.isInSymbolicDirectory=(v=u?.filestat.isSymbolicLink)!==null&&v!==void 0?v:u?.filestat.isInSymbolicDirectory,h.isDirectory?b=new _.Directory(c,u,f,a,h,this.getReadableTooltip(f)):b=new _.File(c,u,f,a,h,this.getReadableTooltip(f)),b}async mvFiles(c,h){const u=[];for(const f of c)if(f.url.isEqualOrParent(h))return;const d=c.sort((f,a)=>f.toString().length-a.toString().length),v=[];for(const f of d)v.length>0&&v.find(a=>a.url.isEqualOrParent(f.url))||v.push(f);if(this.corePreferences["explorer.confirmMove"]){const f=(0,l.localize)("file.confirm.move.ok"),a=(0,l.localize)("file.confirm.move.cancel");if(await this.dialogService.warning((0,l.formatLocalize)("file.confirm.move",`[ ${v.map(y=>y.url.displayName).join(",")} ]`,h.displayName),[a,f])!==f)return}for(const f of v){const a=await this.mv(f.url,h.resolve(f.url.displayName),f.isDirectory);a&&u.push(a)}return u}async mv(c,h,u=!1){try{await this.workspaceEditService.apply({edits:[{newResource:h,oldResource:c,options:{isDirectory:u,overwrite:!0}}]})}catch(d){return d.message}}async createFile(c,h){try{await this.workspaceEditService.apply({edits:[{newResource:c,options:{content:h}}]})}catch(u){return u.message}this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,c,{disableNavigate:!0,focus:!0})}async createDirectory(c){try{await this.workspaceEditService.apply({edits:[{newResource:c,options:{isDirectory:!0}}]})}catch(h){return h.message}}async delete(c){try{await this.workspaceEditService.apply({edits:[{oldResource:c,options:{}}]});return}catch(h){return h.message}}async copyFile(c,h){let u=1,d;try{d=await this.fileServiceClient.access(h.toString())}catch(v){return v.message}for(;d;){const v=h.displayName.replace(/\Wcopy\W\d+/,""),f=l.path.extname(v),b=`${l.path.basename(v,f)} copy ${u}${f}`;h=h.parent.resolve(b),u++;try{d=await this.fileServiceClient.access(h.toString())}catch{return}}try{return await this.fileServiceClient.copy(c.toString(),h.toString())}catch(v){return v.message}}getReadableTooltip(c){const h=c.toString(),u=this.userhomePath&&this.userhomePath.toString();return this.userhomePath&&this.userhomePath.isEqualOrParent(c)?decodeURIComponent(h.replace(u,"~")):decodeURIComponent(c.withScheme("").toString())}};t.FileTreeAPI=s,n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceEditService),n.__metadata("design:type",Object)],s.prototype,"workspaceEditService",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],s.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(E.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),t.FileTreeAPI=s=n.__decorate([(0,r.Injectable)()],s)},93239:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDecorationService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(41893),m=e(52416);let E=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.cacheDecorations=new Map,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(_=>{var s,g,c;const h=(g=(s=_._data)===null||s===void 0?void 0:s._iter)===null||g===void 0?void 0:g._value;if(h){const u=new o.URI(h),d=this.getDecoration(u);this.cacheDecorations.has(h)?((c=this.cacheDecorations.get(h))===null||c===void 0?void 0:c.tooltip)!==d?.tooltip&&this.onDidChangeEmitter.fire():(this.cacheDecorations.set(h,d),this.onDidChangeEmitter.fire())}}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(_,s=!1){_ instanceof o.URI&&(_=o.Uri.parse(_.toString()));const g=this.decorationsService.getDecoration(_,s);return g?{...g,color:this.themeService.getColor({id:g.color})}:{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};t.FileTreeDecorationService=E,n.__decorate([(0,r.Autowired)(l.IDecorationsService),n.__metadata("design:type",l.IDecorationsService)],E.prototype,"decorationsService",void 0),n.__decorate([(0,r.Autowired)(m.IThemeService),n.__metadata("design:type",Object)],E.prototype,"themeService",void 0),t.FileTreeDecorationService=E=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],E)},30577:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropService=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(53622),p=e(14951),_=e(72665),s=e(51500),g=e(6250),c=e(69959),h=r.__importDefault(e(89200)),u=r.__importDefault(e(2613)),d=e(57781),v=e(97738);let f=n=class extends m.WithEventBus{constructor(b){super(),this.model=b,this.toCancelNodeExpansion=new m.DisposableCollection,this.beingDraggedDec=new l.Decoration(h.default.mod_dragging),this.draggedOverDec=new l.Decoration(h.default.mod_dragover),this.beingDraggedNodes=[],this.dragOverTrigger=new m.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.handleDragStart=(y,S,A)=>{y.stopPropagation();const T=O=>{this.handleDragEnd(O,S)};y.currentTarget.addEventListener("dragend",T,!1);let w=this.model.selectedFiles,D=!1;for(const O of w)O&&O.id===S.id&&(D=!0);D||(w=[S]),this.beingDraggedNodes=w,this.beingDraggedActiveUri=A;const I=w.find(O=>!c.Directory.is(O));if(I&&y.dataTransfer.setData("uri",I.uri.toString()),y.dataTransfer.setData("beingDraggedNodes",JSON.stringify(this.beingDraggedNodes.map(O=>O.uri.toString()))),I){const O=I;O.uri.scheme==="file"&&y.dataTransfer.setData("DownloadURL",`application/octet-stream:${O.displayName}:data:application/octet-stream;base64,${(0,m.encodeBase64)(m.BinaryBuffer.fromString(O.filestat.uri))}`)}if(w.forEach(O=>{this.beingDraggedDec.addTarget(O,l.TargetMatchMode.Self)}),y.dataTransfer){let O;w.length===1?O=A?A.displayName:typeof S.name=="string"?S.name:"":O=String(w.length);const P=document.createElement("div");P.className=u.default.file_tree_drag_image,P.textContent=O,document.body.appendChild(P),y.dataTransfer.setDragImage(P,-10,-10),setTimeout(()=>document.body.removeChild(P),0)}},this.handleDragEnter=(y,S)=>{y.stopPropagation(),y.preventDefault()},this.handleDragLeave=(y,S)=>{y.preventDefault(),y.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDec.removeTarget(this.potentialParent),this.model.treeModel.dispatchChange())},this.handleDragOver=(y,S)=>{if(y.preventDefault(),y.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(S)>=0)return;this.draggedOverNode=S;const A=c.Directory.is(S)&&S.expanded?S:S.parent;(this.potentialParent!==A||!this.draggedOverDec.hasTarget(A))&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren),this.model.treeModel.dispatchChange()),this.potentialParent!==S&&c.Directory.is(S)&&(this.dragOverTrigger.trigger(async()=>{S.expanded?(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren)):(await S.setExpanded(!0),this.draggedOverNode===S&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,l.TargetMatchMode.SelfAndChildren))),this.model.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(m.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDrop=async(y,S,A)=>{var T,w;this.eventBus.fire(new E.FileTreeDropEvent({event:y.nativeEvent,targetDir:A?A.codeUri.path:S&&S instanceof c.File?(T=S.parent)===null||T===void 0?void 0:T.uri.codeUri.path:S?S.uri.codeUri.path:new m.URI((w=this.workspaceService.workspace)===null||w===void 0?void 0:w.uri).codeUri.path}));try{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="copy";let D;const I=!!this.beingDraggedActiveUri;this.fileTreeService.isCompactMode&&A&&!S?.uri.isEqual(A)?D=null:S?D=c.Directory.is(S)?S:S.parent:D=this.root;let O;if(this.beingDraggedActiveUri){const P=this.fileTreeService.getNodeByPathOrUri(this.beingDraggedActiveUri);O=[new c.Directory(this.fileTreeService,P?.parent,this.beingDraggedActiveUri,this.beingDraggedActiveUri.displayName,{uri:this.beingDraggedActiveUri.toString(),isDirectory:!0,lastModification:new Date().getTime()},this.beingDraggedActiveUri.displayName)]}else if(O=this.beingDraggedNodes,!O||O.length===0)try{const P=JSON.parse(y.dataTransfer.getData("beingDraggedNodes"));P&&P.length!==0&&(O=P.map(R=>this.fileTreeService.getNodeByPathOrUri(new m.URI(R))).filter(Boolean),O.length||(O=await Promise.all(P.map(async R=>{const M=new m.URI(R);let k;const B=await this.filesystem.getFileStat(M.toString());return B?.isDirectory?k=new c.Directory(this.fileTreeService,this.root,M,M.displayName,{uri:M.toString(),isDirectory:!0,lastModification:new Date().getTime()},M.displayName):k=new c.File(this.fileTreeService,this.root,M,M.displayName,{uri:M.toString(),isDirectory:!0,lastModification:new Date().getTime()},M.displayName),k}))))}catch{}if(O.length>0){const P=A||D&&D.uri,R=O.filter(M=>M&&M.parent&&(this.beingDraggedActiveUri?!M.parent.uri.isEqual(P):!0));if(R.length>0){const M=await this.fileTreeAPI.mvFiles(R.map(k=>({url:k.uri,isDirectory:k.filestat.isDirectory})),P);if(M&&M.length>0)M.forEach(k=>{this.messageService.error(k)});else if(M){if(D)if(this.fileTreeService.isCompactMode&&I){for(const k of R)this.fileTreeService.refresh(k.parent);this.fileTreeService.refresh(D)}else for(const k of R){const B=D.uri.resolve(k.name);this.fileTreeService.moveNodeByPath(k.parent,D,k.name,k.name,k.type),k.updateMetaData({name:B.displayName,fileStat:{...k.filestat,uri:B.toString()},uri:B,tooltip:this.fileTreeAPI.getReadableTooltip(B)}),c.Directory.is(k)&&this.fileTreeService.refresh(k)}else if(S){if(this.fileTreeService.isCompactMode&&I)for(const k of R)this.fileTreeService.refresh(k.parent);else for(const k of R)this.fileTreeService.deleteAffectedNodeByPath(k.path);this.fileTreeService.refresh(S.parent)}}else return}}S&&this.beingDraggedDec.removeTarget(S),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(P=>{this.beingDraggedDec.removeTarget(P)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()}catch(D){this.logger.error(D)}},this.handleDragEnd=(y,S)=>{this.beingDraggedDec.removeTarget(S),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(A=>{this.beingDraggedDec.removeTarget(A)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.model.decorations.addDecoration(this.beingDraggedDec),this.model.decorations.addDecoration(this.draggedOverDec)}get root(){return this.model.treeModel.root}};t.DragAndDropService=f,f.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(g.IFileTreeAPI),r.__metadata("design:type",Object)],f.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(m.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(_.IMessageService),r.__metadata("design:type",Object)],f.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(g.IFileTreeService),r.__metadata("design:type",d.FileTreeService)],f.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(s.IWorkspaceService),r.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),t.DragAndDropService=f=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.FileTreeModelService])],f)},97738:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModelService=void 0;const r=e(85608),o=e(76003),l=e(97267),m=e(41869),E=e(91830),p=e(93899),_=e(26542),s=e(54414),g=e(14951),c=e(63067),h=e(53576),u=e(72665),d=e(6250),v=e(69959),f=e(2812),a=e(46377),b=r.__importDefault(e(89200)),y=e(57781),S=e(30577),{Path:A,isValidBasename:T}=m.path,{coalesce:w}=m.arrays,{trim:D,rtrim:I}=m.strings;let O=n=class{constructor(){this._isDisposed=!1,this._whenReady=new m.Deferred,this.selectedDecoration=new l.Decoration(b.default.mod_selected),this.focusedDecoration=new l.Decoration(b.default.mod_focused),this.contextMenuDecoration=new l.Decoration(b.default.mod_actived),this.loadingDecoration=new l.Decoration(b.default.mod_loading),this.cutDecoration=new l.Decoration(b.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new m.DisposableCollection,this._isMultiSelected=!1,this.refreshedActionDelayer=new m.ThrottledDelayer(n.DEFAULT_REFRESHED_ACTION_DELAY),this.labelChangedDelayer=new m.ThrottledDelayer(n.DEFAULT_LABEL_CHANGED_DELAY),this.locationThrottler=new m.Throttler,this.onDidFocusedFileChangeEmitter=new m.Emitter,this.onDidContextMenuFileChangeEmitter=new m.Emitter,this.onDidSelectedFileChangeEmitter=new m.Emitter,this.onFileTreeModelChangeEmitter=new m.Emitter,this._initTreeModelReady=!1,this.clearFileSelectedDecoration=()=>{this.selectedDecoration.clearAppliedTarget(),this._selectedFiles=[]},this.activeFileDecoration=(R,M=!0)=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.selectedFiles=[R],M&&this.treeModel.dispatchChange())},this.selectFileDecoration=(R,M=!0)=>{R!==this.treeModel.root&&(this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this._selectedFiles=[R],M&&this.treeModel.dispatchChange()))},this.activateFileActivedDecoration=R=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuDecoration.addTarget(R),this.contextMenuFile=R,this.treeModel.dispatchChange()},this.activateFileFocusedDecoration=R=>{this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.treeModel.dispatchChange()},this.activeFileFocusedDecoration=(R,M=!1)=>{R!==this.treeModel.root&&(this.focusedFile!==R&&(M?(this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile=R):this.focusedFile&&(this.contextMenuFile=void 0,this.focusedDecoration.clearAppliedTarget()),R&&(this._selectedFiles.indexOf(R)<0&&(this.selectedDecoration.addTarget(R),this._selectedFiles.push(R),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri))),this.focusedDecoration.addTarget(R),this.focusedFile=R)),this.treeModel.dispatchChange())},this.toggleFileSelectedDecoration=R=>{const M=this._selectedFiles.indexOf(R);M>-1?(this.focusedFile===R&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this._selectedFiles.splice(M,1),this.selectedDecoration.clearAppliedTarget()):(this._selectedFiles.push(R),this.selectedDecoration.addTarget(R),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.focusedFile=R,this.focusedDecoration.addTarget(R)),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.activeFileDecorationByRange=(R,M)=>{for(this.clearFileSelectedDecoration(),this.contextMenuFile=void 0;R<=M;R++){const k=this.treeModel.root.getTreeNodeAtIndex(R);k&&(this._selectedFiles.push(k),this.selectedDecoration.addTarget(k))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.deactivateFileDecoration=()=>{var R;this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(R=this.treeModel)===null||R===void 0||R.dispatchChange()},this.toggleDirectory=async R=>{R.expanded?this.fileTreeHandle.collapseNode(R):this.fileTreeHandle.expandNode(R)},this.handleDblClick=()=>{this.commandService.executeCommand(m.FILE_COMMANDS.NEW_FILE.id)},this.handleContextMenu=(R,M,k)=>{var B;R.stopPropagation(),R.preventDefault();let x,N;M?(N=M,this._isMultiSelected?this.selectedFiles.indexOf(N)>=0?x=this.selectedFiles:x=[N]:x=[N]):(x=[this.treeModel.root],N=this.treeModel.root),this.activateFileActivedDecoration(N),this.setFileTreeContextKey(N),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(B=this.contextKey)===null||B===void 0||B.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null);const j=this.contextMenuService.createMenu({id:p.MenuId.ExplorerContext,contextKeyService:this.fileTreeService.contextMenuContextKeyService}),K=j.getMergedMenuNodes();j.dispose(),this.updateExplorerCompressedContextKey(N,k);const{x:U,y:Y}=R.nativeEvent;this.ctxMenuRenderer.show({anchor:{x:U,y:Y},menuNodes:K,args:k?[k,[k]]:[N.uri,x.map(z=>z.uri)]})},this.handleTreeBlur=()=>{var R,M,k;this._isDisposed||((M=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||M===void 0||M.set(!1),this.deactivateFileDecoration(),(k=this.contextKey)===null||k===void 0||k.explorerResourceIsFolder.set(!1))},this.handleTreeFocus=()=>{var R,M;(M=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||M===void 0||M.set(!0)},this.handleItemRangeClick=(R,M)=>{if(this.selectedFiles.length===1&&v.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),!this.focusedFile)this.handleItemClick(R,M);else if(this.focusedFile&&this.focusedFile!==R){this._isMultiSelected=!0;const k=this.treeModel.root.getIndexAtTreeNode(R),B=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);B>k?this.activeFileDecorationByRange(k,B):B<k&&this.activeFileDecorationByRange(B,k)}},this.handleItemToggleClick=(R,M)=>{this._isMultiSelected=!0,!(M!==l.TreeNodeType.CompositeTreeNode&&M!==l.TreeNodeType.TreeNode)&&(this.selectedFiles.length===1&&v.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),this.toggleFileSelectedDecoration(R))},this.handleItemClick=(R,M=this.fileTreeService.isMultipleWorkspace?l.TreeNodeType.TreeNode:l.TreeNodeType.CompositeTreeNode,k)=>{var B,x,N,j;if(this.treeModel&&(R||(R=this.treeModel.root),this.updateExplorerCompressedContextKey(R,k),this._isMultiSelected=!1,(M===l.TreeNodeType.CompositeTreeNode||M===l.TreeNodeType.TreeNode)&&this.activeFileDecoration(R),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(B=this.contextKey)===null||B===void 0||B.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null,(x=this.contextKey)===null||x===void 0||x.explorerResourceIsFolder.set(M===l.TreeNodeType.CompositeTreeNode)),this.corePreferences["workbench.list.openMode"]==="singleClick")){if(M===l.TreeNodeType.CompositeTreeNode){if((N=this.contextKey)===null||N===void 0||N.explorerResourceIsFolder.set(!0),R===this.treeModel.root)return;this.toggleDirectory(R)}else if(M===l.TreeNodeType.TreeNode){if((j=this.contextKey)===null||j===void 0||j.explorerResourceIsFolder.set(!1),R===this.treeModel.root)return;this.fileTreeService.openFile(R.uri),this.mainlayoutService.bottomExpanded&&this.commandService.executeCommand(h.RETRACT_BOTTOM_PANEL.id)}}},this.handleItemDoubleClick=(R,M)=>{M===l.TreeNodeType.TreeNode?this.fileTreeService.openAndFixedFile(R.uri):this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(R)},this.validateFileName=(R,M)=>{var k;if(M=this.getWellFormedFileName(M),!M||M.length===0||/^\s+$/.test(M))return{message:(0,m.localize)("validate.tree.emptyFileNameError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M};if(M[0]==="/"||M[0]==="\\")return{message:(0,m.localize)("validate.tree.fileNameStartsWithSlashError"),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M};if(M[0]===" "||M[M.length-1]===" ")return{message:(0,m.localize)("validate.tree.fileNameFollowOrStartWithSpaceWarning"),type:l.PROMPT_VALIDATE_TYPE.WARNING,value:M};let B;if(R.target){const N=R.target;if(M===N.name)return null;B=N.parent}else B=R.parent;return B&&!(R instanceof l.RenamePromptHandle&&R.target.displayName.indexOf(A.separator)>0)&&((k=B.children)===null||k===void 0?void 0:k.find(K=>K.name===M))?{message:(0,m.formatLocalize)("validate.tree.fileNameExistsError",M),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M}:w(M.split(/[\\/]/)).some(N=>!T(N))?{message:(0,m.formatLocalize)("validate.tree.invalidFileNameError",this.trimLongName(M)),type:l.PROMPT_VALIDATE_TYPE.ERROR,value:M}:null},this.proxyPrompt=R=>{let M=!1;const k=async z=>{const G=await this.fileTreeService.getNodeByPathOrUri(z);G&&(v.Directory.is(G)?this.selectFileDecoration(G):this.location(G.uri))},B=async z=>{var G,Q,Z;if(this.validateMessage=void 0,R instanceof l.RenamePromptHandle){const $=R.target,H=R.target.displayName.split(A.separator),X=$.name.indexOf(A.separator)>0;if(X&&this.activeUri&&!R.target.uri.toString().includes(this.activeUri.toString()))return!1;const J=this.activeUri?H.length-R.target.uri.toString().replace(this.activeUri.toString(),"").split(A.separator).length:-1,re=J===-1?[]:H.slice(0,J).concat(z);let ce=$.uri,fe=$.parent.uri.resolve(z);if(X&&((G=this.activeUri)===null||G===void 0?void 0:G.displayName)===z||!X&&z===$.name)return!0;R.addAddonAfter("loading_indicator"),X&&re.length>0&&v.Directory.is($.parent)&&(ce=$.parent.uri.resolve(H.slice(0,J+1).join(A.separator)),fe=$.parent.uri.resolve(re.concat().join(A.separator)));const Ae=await this.fileTreeAPI.mv(ce,fe,$.type===l.TreeNodeType.CompositeTreeNode);if(Ae)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:Ae,value:z},this.fileTreeService.updateRefreshable(!0),R.addValidateMessage(this.validateMessage),!1;if(this.fileTreeService.updateRefreshable(!1),R.removeAddonAfter(),!X&&$.parent){const te=await this.fileTreeService.moveNodeByPath($.parent,$.parent,$.name,z,$.type);te&&this.selectFileDecoration(te,!1),this.fileTreeService.updateRefreshable(!0)}else if(v.Directory.is($)&&!v.Directory.isRoot($)){$.updateMetaData({name:re.concat(H.slice(J+1)).join(A.separator),uri:fe,fileStat:{...$.filestat,uri:fe.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(fe)}),this.treeModel.dispatchChange();let te;v.Directory.is($.parent)&&(!((Q=$.parent.children)===null||Q===void 0)&&Q.find(Le=>$.path.indexOf(Le.path)>=0))?te=this.fileTreeService.refresh($.parent):te=this.fileTreeService.refresh($),te.then(()=>{k(fe)})}R.removeAddonAfter()}else if(R instanceof l.NewPromptHandle){const $=R.parent,H=$.uri.resolve(z);let X;if(R.addAddonAfter("loading_indicator"),this.fileTreeService.updateRefreshable(!0),R.type===l.TreeNodeType.CompositeTreeNode?X=await this.fileTreeAPI.createDirectory(H):X=await this.fileTreeAPI.createFile(H),R.removeAddonAfter(),X)return this.validateMessage={type:l.PROMPT_VALIDATE_TYPE.ERROR,message:X,value:z},this.fileTreeService.updateRefreshable(!1),R.addValidateMessage(this.validateMessage),!1;if(z.includes(A.separator)&&this.fileTreeService.refresh($).then(()=>{k($.uri.resolve(z))}),this.fileTreeService.isCompactMode)if(R.type===l.TreeNodeType.CompositeTreeNode)if((!$.children||$.children.length===0)&&!v.Directory.isRoot($)){const re=$.uri.resolve(z),ce=[$.name].concat(z).join(A.separator);$.updateMetaData({name:ce,uri:re,fileStat:{...$.filestat,uri:re.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(re)}),k(re)}else await this.fileTreeService.addNode($,z,R.type),k($.uri.resolve(z));else await this.fileTreeService.addNode($,z,R.type),k($.uri.resolve(z));else await this.fileTreeService.addNode($,z,R.type),k($.uri.resolve(z))}return(Z=this.contextKey)===null||Z===void 0||Z.filesExplorerInputFocused.set(!1),!0},x=async z=>{var G,Q,Z,$;if(this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;if(M)return!1;if(!z){(G=this.contextKey)===null||G===void 0||G.explorerCompressedFocusContext.set(!1),(Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFirstFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedLastFocusContext.set(!1),this.fileTreeService.isCompactMode&&R instanceof l.NewPromptHandle&&this.fileTreeService.refresh(R.parent);return}return($=this.contextKey)===null||$===void 0||$.filesExplorerInputFocused.set(!1),await B(z),!0},N=async z=>{if(M=!0,this.validateMessage&&this.validateMessage.type===l.PROMPT_VALIDATE_TYPE.ERROR)return!1;if(z.trim()===""||this.validateMessage&&this.validateMessage.type!==l.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;const G=await B(z);return M=!1,!!G},j=async()=>{var z;(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!0)},K=()=>{var z;this.fileTreeService.updateRefreshable(!0),(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!1),this.contextMenuFile&&this.selectFileDecoration(this.contextMenuFile,!0)},U=()=>{var z;(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!1),this.fileTreeService.isCompactMode&&R instanceof l.NewPromptHandle&&this.fileTreeService.refresh(R.parent)},Y=z=>{const G=this.validateFileName(R,z);G?(this.validateMessage=G,R.addValidateMessage(G)):!G&&this.validateMessage&&this.validateMessage.value!==z&&(this.validateMessage=void 0,R.removeValidateMessage())};R.destroyed||(this.fileTreeService.updateRefreshable(!1),R.onChange(Y),R.onCommit(N),R.onBlur(x),R.onFocus(j),R.onDestroy(K),R.onCancel(U))},this.copyFile=async R=>{var M;this.pasteStore&&this.pasteStore.type===d.PasteTypes.CUT&&(this._pasteStore.files.forEach(B=>{B&&this.cutDecoration.removeTarget(B)}),(M=this.contextKey)===null||M===void 0||M.explorerResourceCut.set(!1)),this.treeModel.dispatchChange();const k=[];for(const B of R){const x=this.fileTreeService.getNodeByPathOrUri(B);x&&k.push(x)}this._pasteStore={files:k,type:d.PasteTypes.COPY},this.clipboardService.writeResources(R)},this.pasteFile=async R=>{var M,k;let B=!1,x=this.fileTreeService.getNodeByPathOrUri(R.toString());if(!x)return;let N=this.pasteStore,j=!1;if(!N){const K=await this.clipboardService.readResources();if(!K||!K.length)return;N={files:[],type:d.PasteTypes.COPY,crossFiles:K},j=!0}if(N){if(v.Directory.is(x)||(B=!0,x=x.parent),j){const K=(0,m.localize)("file.confirm.paste.ok"),U=(0,m.localize)("file.confirm.paste.cancel");if(await this.dialogService.warning((0,m.formatLocalize)("file.confirm.paste",`[ ${(M=N.crossFiles)===null||M===void 0?void 0:M.map(z=>z.displayName).join(",")} ]`,v.Directory.isRoot(x)?x.uri.displayName:x.displayName),[U,K])!==K)return}if(N.type===d.PasteTypes.CUT){for(const U of N.files)U&&this.cutDecoration.removeTarget(U),x.expanded||await x.setExpanded(!0);const K=await this.fileTreeAPI.mvFiles(N.crossFiles?N.crossFiles.map(U=>{var Y;return{url:U,isDirectory:((Y=this.fileTreeService.getNodeByPathOrUri(U))===null||Y===void 0?void 0:Y.filestat.isDirectory)||!1}}):N.files.map(U=>({url:U.uri,isDirectory:U.filestat.isDirectory})),x.uri);K&&K.length>0&&(K.forEach(U=>{this.messageService.error(U)}),this.fileTreeService.refresh()),(k=this.contextKey)===null||k===void 0||k.explorerResourceCut.set(!1),this.treeModel.dispatchChange(),this._pasteStore={files:[],type:d.PasteTypes.NONE,crossFiles:void 0}}else if(N.type===d.PasteTypes.COPY){const K=N.crossFiles?N.crossFiles:N.files.map(U=>U.uri);for(const U of K){x.uri.isEqual(U)&&!B&&(x=x.parent);const Y=x.uri.resolve(U.displayName);x.expanded||await x.setExpanded(!0);const z=await this.fileTreeAPI.copyFile(U,Y);if(z)if(z.uri){const G=new m.URI(z.uri),Q=await this.filesystem.getFileStat(U.toString());this.fileTreeService.addNode(x,G.displayName,Q?.isDirectory?l.TreeNodeType.CompositeTreeNode:l.TreeNodeType.TreeNode)}else this.messageService.error(`Error when copy file: ${U.toString()}, ${z}`)}}}},this.cutFile=async R=>{var M;R.length>0&&((M=this.contextKey)===null||M===void 0||M.explorerResourceCut.set(!0)),this._pasteStore&&this._pasteStore.type===d.PasteTypes.CUT&&this._pasteStore.files.forEach(B=>{this.cutDecoration.removeTarget(B)});const k=[];for(const B of R){const x=this.fileTreeService.getNodeByPathOrUri(B);x&&k.push(x)}this._pasteStore={files:k,type:d.PasteTypes.CUT};for(const B of k)B&&this.cutDecoration.addTarget(B);this.treeModel.dispatchChange()},this.location=async R=>{if(await this.whenReady,!this.fileTreeService.filterMode)return this._fileToLocation=R,this.locationThrottler.queue(this.doLocation)},this.doLocation=async()=>{if(!this._fileToLocation)return;const R=this._fileToLocation;let M;if(typeof R=="string"?M=R:M=await this.fileTreeService.getFileTreeNodePathByUri(R),M){if(!this.fileTreeHandle)return;const k=await this.fileTreeHandle.ensureVisible(M,"center",!0);k&&this.selectFileDecoration(k)}this._fileToLocation=void 0},this.locationOnShow=R=>{this._nextLocationTarget=R},this.performLocationOnHandleShow=async()=>{this._nextLocationTarget&&(await this.location(this._nextLocationTarget),this._nextLocationTarget=void 0)}}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidContextMenuFileChange(){return this.onDidContextMenuFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get onFileTreeModelChange(){return this.onFileTreeModelChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get dndService(){return this._dndService}get whenReady(){return this._whenReady.promise}get focusedFile(){return this._focusedFile}set focusedFile(R){this.onDidFocusedFileChangeEmitter.fire(R?R.uri:void 0),this._focusedFile=R}get contextMenuFile(){return this._contextMenuFile}set contextMenuFile(R){this.onDidContextMenuFileChangeEmitter.fire(R?R.uri:void 0),this._contextMenuFile=R}get selectedFiles(){return this._selectedFiles}set selectedFiles(R){this.onDidSelectedFileChangeEmitter.fire(R?R.map(M=>M.uri):[]),this._selectedFiles=R}get activeUri(){return this._activeUri}get pasteStore(){return this._pasteStore}get explorerStorage(){return this._explorerStorage}get currentRelativeUriContextKey(){return this._currentRelativeUriContextKey||(this._currentRelativeUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextRelativeUri","")),this._currentRelativeUriContextKey}get currentContextUriContextKey(){return this._currentContextUriContextKey||(this._currentContextUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextUri","")),this._currentContextUriContextKey}get contextMenuResourceContext(){return this._contextMenuResourceContext||(this._contextMenuResourceContext=new E.ResourceContextKey(this.fileTreeService.contextMenuContextKeyService)),this._contextMenuResourceContext}get contextKey(){return this.fileTreeService.contextKey}get initTreeModelReady(){return this._initTreeModelReady}async initTreeModel(){this._initTreeModelReady=!1;const R=(await this.fileTreeService.resolveChildren())[0];if(!R){this._whenReady.resolve();return}this._treeModel=this.injector.get(f.FileTreeModel,[R]),this.initDecorations(R),this._dndService=this.injector.get(S.DragAndDropService,[this]),this.treeStateWatcher=this._treeModel.getTreeStateWatcher(!0),this.disposableCollection.push(this.fileTreeService.onNodeRefreshed(()=>{this.initTreeModelReady&&(this.refreshedActionDelayer.isTriggered()||this.refreshedActionDelayer.cancel(),this.refreshedActionDelayer.trigger(async()=>{if(this.selectedFiles.length===0){const k=this.editorService.currentEditor;k&&k.currentUri&&this.location(k.currentUri)}this.fileTreeService.isCompactMode||(this._activeUri=null)}))})),this.disposableCollection.push(this.fileTreeService.onWorkspaceChange(()=>{this.disposableCollection.dispose(),this.initTreeModel()})),this.disposableCollection.push(this.labelService.onDidChange(async()=>{this.initTreeModelReady&&(this.labelChangedDelayer.isTriggered()||this.labelChangedDelayer.cancel(),this.labelChangedDelayer.trigger(async()=>{this.fileTreeService.refresh()}))})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.WillResolveChildren,k=>{this.loadingDecoration.addTarget(k),this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(l.TreeNodeEvent.DidResolveChildren,k=>{this.loadingDecoration.clearAppliedTarget(),this.treeModel.dispatchChange()})),this._explorerStorage=await this.storageProvider(m.STORAGE_NAMESPACE.EXPLORER);const M=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);M&&await this.loadFileTreeSnapshot(M),this.disposableCollection.push(this.treeStateWatcher.onDidChange(()=>{if(!this._initTreeModelReady)return;const k=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),B=this.treeStateWatcher.snapshot();this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...k,...B})})),this.fileTreeService.startWatchFileEvent(),this.onFileTreeModelChangeEmitter.fire(this._treeModel),this._whenReady.resolve(),this._initTreeModelReady=!0}initDecorations(R){this._decorations=new l.DecorationsManager(R),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}setFileTreeContextKey(R){var M;this.currentContextUriContextKey.set(R.uri.toString()),this.currentRelativeUriContextKey.set((this.treeModel.root.uri.relative(R.uri)||"").toString()),this.contextMenuResourceContext.set(R.uri),(M=this.contextKey)===null||M===void 0||M.explorerResourceIsFolder.set(R&&R.type===l.TreeNodeType.CompositeTreeNode)}async loadFileTreeSnapshot(R){await this._treeModel.loadTreeState(R)}updateExplorerCompressedContextKey(R,M){var k,B,x,N,j,K,U,Y,z,G,Q,Z,$,H,X,J;if(R&&M){(k=this.contextKey)===null||k===void 0||k.explorerCompressedFocusContext.set(!0);const re=new A(R.name);re.name===M.displayName?((B=this.contextKey)===null||B===void 0||B.explorerCompressedLastFocusContext.set(!0),(x=this.contextKey)===null||x===void 0||x.explorerCompressedFirstFocusContext.set(!1)):re.root&&re.root.name===M.displayName?((N=this.contextKey)===null||N===void 0||N.explorerCompressedLastFocusContext.set(!1),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFirstFocusContext.set(!0)):((K=this.contextKey)===null||K===void 0||K.explorerCompressedLastFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedFirstFocusContext.set(!1))}else R?R.name.indexOf(A.separator)>0?((Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFocusContext.set(!0),(z=this.contextKey)===null||z===void 0||z.explorerCompressedFirstFocusContext.set(!1),(G=this.contextKey)===null||G===void 0||G.explorerCompressedLastFocusContext.set(!0)):((Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedFirstFocusContext.set(!1),($=this.contextKey)===null||$===void 0||$.explorerCompressedLastFocusContext.set(!1)):((H=this.contextKey)===null||H===void 0||H.explorerCompressedFocusContext.set(!1),(X=this.contextKey)===null||X===void 0||X.explorerCompressedFirstFocusContext.set(!1),(J=this.contextKey)===null||J===void 0||J.explorerCompressedLastFocusContext.set(!1))}handleTreeHandler(R){this._fileTreeHandle=R}toggleOrOpenCurrentFile(){let R;this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),R&&(this.activeFileDecoration(R),v.Directory.is(R)?this.toggleDirectory(R):this.fileTreeService.openFile(R.uri))}moveToNext(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const k=this.treeModel.root.getIndexAtTreeNode(R)+1,B=this.treeModel.root.getTreeNodeAtIndex(k),x=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=(k+1)*a.FILE_TREE_NODE_HEIGHT-(x.scrollPosition||0),{height:j}=this.fileTreeHandle.getCurrentSize();B&&(this.activateFileFocusedDecoration(B),N>j&&this.fileTreeHandle.ensureVisible(B,"end"))}moveToPrev(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const M=this.treeModel.root.getIndexAtTreeNode(R);if(M===0)return;const k=M-1,B=this.treeModel.root.getTreeNodeAtIndex(k);if(!B)return;const x=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),N=k*a.FILE_TREE_NODE_HEIGHT;this.activateFileFocusedDecoration(B),(x.scrollPosition||0)>N&&this.fileTreeHandle.ensureVisible(B,"start")}async collapseCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const M=this.selectedFiles.indexOf(R);M>=0&&(this.selectedFiles.splice(M,1),this.selectedDecoration.removeTarget(R));let k;if(v.Directory.is(R)&&R.expanded)k=R;else if(R)v.Directory.isRoot(R.parent)?k=R:k=R.parent;else return;this.focusedFile=k,k&&k.expanded&&(await this.fileTreeHandle.collapseNode(k),this.activeFileFocusedDecoration(k,!0))}async expandCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const M=this.selectedFiles.indexOf(R);M>=0&&(this.selectedFiles.splice(M,1),this.selectedDecoration.removeTarget(R)),this.focusedFile=R,v.Directory.is(R)&&(R.expanded||await this.fileTreeHandle.expandNode(R))}async collapseAll(){await this.treeModel.root.collapsedAll();const R=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);R&&this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...R,expandedDirectories:{atSurface:[],buried:[]}})}async deleteFileByUris(R){var M;if(R.length===0)return;if(this.corePreferences["explorer.confirmDelete"]){const N=m.isLinux?(0,m.localize)("file.confirm.delete.ok"):(0,m.localize)("file.confirm.moveToTrash.ok"),j=(0,m.localize)("file.confirm.delete.cancel"),K=10;let U=R.slice(0,K).map(z=>z.displayName).join(`
28467
+ `);if(R.length>K&&(U+=`
28468
+ ...`),m.isLinux||(U+=`
28469
+
28470
+ <small>${(0,m.localize)("file.confirm.deleteTips")}</small>`),await this.dialogService.open({message:(0,m.toMarkdown)((0,m.formatLocalize)("file.confirm.delete",R.length,U)),type:m.MessageType.Warning,props:{width:580},buttons:[j,N]})!==N)return}const k=this.fileTreeService.sortPaths(R);let B;if(this.treeModel.root.branchSize===R.length)B=void 0;else if(this.selectedFiles.length&&!k.find(N=>N.path.toString()===this.selectedFiles[0].uri.toString()))B=this.selectedFiles[0];else{const N=(M=k[k.length-1])===null||M===void 0?void 0:M.node;if(!N)B=void 0;else{let K=this.treeModel.root.getIndexAtTreeNode(N)+1;if(K>=this.treeModel.root.branchSize){const U=k[0].node;K=this.treeModel.root.getIndexAtTreeNode(U)-1}B=this.treeModel.root.getTreeNodeAtIndex(K)}}const x=[];k.forEach(N=>{this.loadingDecoration.addTarget(N.node),x.push(this.deleteFile(N.node,N.path).then(j=>(this.loadingDecoration.removeTarget(N.node),j)))}),this.treeModel.dispatchChange(),await Promise.all(x),B&&this.activeFileDecoration(B)}async deleteFile(R,M){const k=typeof M=="string"?new m.URI(M):M,B=await this.fileTreeAPI.delete(k);return B?(this.messageService.error(B),!1):((N=>{var j,K,U;N.uri.isEqual(k)?this.fileTreeService.deleteAffectedNodeByPath(N.path):this.fileTreeService.refresh(R.parent),this.loadingDecoration.removeTarget(N),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFocusContext.set(!1),(K=this.contextKey)===null||K===void 0||K.explorerCompressedFirstFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedLastFocusContext.set(!1)})(R),!0)}getWellFormedFileName(R){return R&&(R=D(R," "),R=I(R,"."),R=I(R,"/"),R=I(R,"\\"),R)}trimLongName(R){return R&&R.length>255?`${R.substr(0,255)}...`:R}async getPromptTarget(R,M){let k;if(R.isEqual(this.treeModel.root.uri))k=await this.fileTreeService.getNodeByPathOrUri(R);else if(this.focusedFile)k=this.focusedFile;else if(this.contextMenuFile)k=this.contextMenuFile;else if(this.selectedFiles.length>0){const x=this.selectedFiles[this.selectedFiles.length-1];if(this.treeModel.root.isItemVisibleAtSurface(x))k=x;else{const N=await this.fileTreeService.getFileTreeNodePathByUri(R);k=await this.treeModel.root.loadTreeNodeByPath(N)}}else k=await this.fileTreeService.getNodeByPathOrUri(R);k||(k=this.treeModel.root);const B=A.splitPath(k.name);if(v.Directory.isRoot(k))return k;if(k.name!==R.displayName&&B[B.length-1]!==R.displayName&&M){const x=R.relative(k.uri).toString(),N=k.name.replace(`${A.separator}${x}`,""),j=k.parent.uri.resolve(N),K=x.split(A.separator)[0];if(!N)return;if(k.children)for(const U of k.children)this.fileTreeService.deleteAffectedNodeByPath(U.path,!0);k.updateMetaData({name:N?.toString(),uri:j,tooltip:this.fileTreeAPI.getReadableTooltip(j),fileStat:{...k.filestat,uri:j.toString()}}),this.fileTreeService.addNode(k,K,l.TreeNodeType.CompositeTreeNode)}return k}async newFilePrompt(R){const M=await this.getPromptTarget(R,!0);M&&this.proxyPrompt(await this.fileTreeHandle.promptNewTreeNode(M))}async newDirectoryPrompt(R){const M=await this.getPromptTarget(R,!0);M&&this.proxyPrompt(await this.fileTreeHandle.promptNewCompositeTreeNode(M))}async renamePrompt(R){const M=await this.getPromptTarget(R);M&&this.proxyPrompt(await this.fileTreeHandle.promptRename(M,R.displayName))}selectChildNode(R){var M;for(const k of R){const B=this.fileTreeService.getNodeByPathOrUri(k);if(B){const x=v.Directory.isRoot(B)?B.children:(M=B.parent)===null||M===void 0?void 0:M.children;if(x){const N=x[0],j=x[x.length-1],K=this.treeModel.root.getIndexAtTreeNode(N),U=this.treeModel.root.getIndexAtTreeNode(j);this._isMultiSelected=!0,this.activeFileDecorationByRange(K,U)}}}}dispose(){this._isDisposed=!0}};t.FileTreeModelService=O,O.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",O.DEFAULT_REFRESHED_ACTION_DELAY=500,O.DEFAULT_LOCATION_FLUSH_DELAY=200,O.DEFAULT_LABEL_CHANGED_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],O.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(d.IFileTreeService),r.__metadata("design:type",y.FileTreeService)],O.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(m.CorePreferences),r.__metadata("design:type",Object)],O.prototype,"corePreferences",void 0),r.__decorate([(0,o.Autowired)(p.ICtxMenuRenderer),r.__metadata("design:type",p.ICtxMenuRenderer)],O.prototype,"ctxMenuRenderer",void 0),r.__decorate([(0,o.Autowired)(p.AbstractContextMenuService),r.__metadata("design:type",p.AbstractContextMenuService)],O.prototype,"contextMenuService",void 0),r.__decorate([(0,o.Autowired)(d.IFileTreeAPI),r.__metadata("design:type",Object)],O.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(g.IFileServiceClient),r.__metadata("design:type",Object)],O.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(m.StorageProvider),r.__metadata("design:type",Function)],O.prototype,"storageProvider",void 0),r.__decorate([(0,o.Autowired)(u.IDialogService),r.__metadata("design:type",Object)],O.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(_.LabelService),r.__metadata("design:type",_.LabelService)],O.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(u.IMessageService),r.__metadata("design:type",Object)],O.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(s.WorkbenchEditorService),r.__metadata("design:type",s.WorkbenchEditorService)],O.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(m.CommandService),r.__metadata("design:type",Object)],O.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(c.IMainLayoutService),r.__metadata("design:type",Object)],O.prototype,"mainlayoutService",void 0),r.__decorate([(0,o.Autowired)(m.IClipboardService),r.__metadata("design:type",Object)],O.prototype,"clipboardService",void 0),t.FileTreeModelService=O=n=r.__decorate([(0,o.Injectable)()],O)},4446:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymlinkDecorationsProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(57781);let m=class{constructor(p){this.fileTreeService=p,this.label="symbollink",this.onDidChangeEmitter=new o.Emitter}get onDidChange(){return this.onDidChangeEmitter.event}provideDecorations(p){const _=this.fileTreeService.getNodeByPathOrUri(p.toString());if(_&&_.filestat&&_.filestat.isSymbolicLink)return{letter:"\u2937",source:_.filestat.uri,color:"gitDecoration.ignoredResourceForeground",tooltip:(0,o.localize)("file.tooltip.symbolicLink"),weight:-1,bubble:!_.filestat.isDirectory}}};t.SymlinkDecorationsProvider=m,t.SymlinkDecorationsProvider=m=n.__decorate([n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[l.FileTreeService])],m)},69959:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Directory=void 0;const n=e(97267),r=e(41869);class o extends n.CompositeTreeNode{static is(E){return n.CompositeTreeNode.is(E)}constructor(E,p,_=new r.URI(""),s="",g={children:[],isDirectory:!0,uri:"",lastModification:0},c){super(E,p,void 0,{name:s}),this.uri=_,this.filestat=g,this.tooltip=c,p||(this.isExpanded=!0)}get displayName(){return this.name}updateName(E){this.name!==E&&(n.TreeNode.removeTreeNode(this.id,this.path),this.name=E,n.TreeNode.setTreeNode(this.id,this.path,this))}updateURI(E){this.uri=E}updateFileStat(E){this.filestat=E}updateToolTip(E){this.tooltip=E}updateMetaData(E){const{fileStat:p,tooltip:_,name:s,uri:g}=E;s&&this.updateName(s),p&&this.updateFileStat(p),g&&this.updateURI(g),_&&this.updateToolTip(_)}}t.Directory=o;class l extends n.TreeNode{static is(E){return n.TreeNode.is(E)}constructor(E,p,_=new r.URI(""),s="",g={children:[],isDirectory:!1,uri:"",lastModification:0},c){super(E,p,void 0,{name:s}),this.uri=_,this.filestat=g,this.tooltip=c}get displayName(){return this.name}updateName(E){this.name!==E&&(n.TreeNode.removeTreeNode(this.id,this.path),this.name=E,n.TreeNode.setTreeNode(this.id,this.path,this))}updateURI(E){this.uri=E}updateFileStat(E){this.filestat=E}updateToolTip(E){this.tooltip=E}updateMetaData(E){const{fileStat:p,tooltip:_,name:s,uri:g}=E;s&&this.updateName(s),p&&this.updateFileStat(p),g&&this.updateURI(g),_&&this.updateToolTip(_)}}t.File=l},6250:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCE_VIEW_ID=t.IFileDialogTreeService=t.IFileDialogModel=t.PasteTypes=t.FileStatNode=t.FileTreeExpandedStatusUpdateEvent=t.IFileTreeService=t.IFileTreeAPI=t.FILE_EXPLORER_WELCOME_ID=void 0;const n=e(43718);t.FILE_EXPLORER_WELCOME_ID="file-explorer",t.IFileTreeAPI=Symbol("IFileTreeAPI"),t.IFileTreeService=Symbol("IFileTreeService");class r extends n.BasicEvent{}t.FileTreeExpandedStatusUpdateEvent=r;var o;(function(m){function E(s){return!!s&&"filestat"in s}m.is=E;function p(s){return!!s&&"filestat"in s&&!s.fileStat.isDirectory}m.isContentFile=p;function _(s){if(E(s))return s.filestat.uri}m.getUri=_})(o||(t.FileStatNode=o={}));var l;(function(m){m[m.NONE=0]="NONE",m[m.COPY=1]="COPY",m[m.CUT=2]="CUT"})(l||(t.PasteTypes=l={})),t.IFileDialogModel=Symbol("IFileDialogModel"),t.IFileDialogTreeService=Symbol("IFileDialogTreeService"),t.RESOURCE_VIEW_ID="file-explorer"},87518:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(6250),t),n.__exportStar(e(83709),t)},67240:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserViews=void 0,t.browserViews={"sumiContributes.contributes":"Declare all contributions of the OpenSumi Extension.","sumiContributes.common.command":'The command to execute. The command must be declared in "contributes.command" (except built-in commands)',"sumiContributes.common.when":"This condition must be true to display this item","sumiContributes.common.group":"The group this item belongs to","sumiContributes.browserViews":"Provide a custom view to the editor","sumiContributes.browserViews.left":"Provide a view in the left activity bar container","sumiContributes.browserViews.right":"Provide a view in the right activity bar container","sumiContributes.browserViews.bottom":"Provides a view in the bottom tab bar container (no icon will be rendered, so a title is required)","sumiContributes.browserViews.location.custom":'Provide a view to the "{0}" container',"sumiContributes.browserViews.view.id":"View id, browser/index needs to export a component with the same name as this id","sumiContributes.browserViews.view.icon":"Icon name, reference: [icon](https://opensumi.github.io/core/)","sumiContributes.browserViews.view.iconPath":"local icon relative path","sumiContributes.browserViews.view.title":"View title (will be displayed when type is bottom)","sumiContributes.browserViews.view.titleComponentId":"The id of the custom view title component, the characteristics are exactly the same as the normal browserView","sumiContributes.browserViews.view.expanded":"Do you need to expand to full screen, which will cover up the editor area","sumiContributes.browserMain":"Declare the extension browser entry (the path to the compiled code file relative to the extension directory)","sumiContributes.nodeMain":"Declare the extension node entry (the path to the compiled code file relative to the extension directory)","sumiContributes.workerMain":"Declare the extension workser entry (the path to the compiled code file relative to the extension directory)","sumiContributes.viewsProxies":'Declare the component id that needs to be bound to the componentProxy call, which is the same as the export name. For example, after declaring ["component"], the xxxx function of the component component of the browser layer can be called at the node layer through **`context.componentProxy.component.xxxx`**',"sumiContributes.toolbar":"Toolbar is located on the right side of the menu bar at the top of the IDE by default, and can also be displayed as a separate column","sumiContributes.toolbar.actions":"Used to describe the elements on the Toolbar, currently only supports `button` and `select`, we call it action, in some cases it needs to be used with the Toolbar API","sumiContributes.toolbar.actions.id":"unique identifier","sumiContributes.toolbar.actions.weight":"Order weight, the larger the value, the higher the ranking","sumiContributes.toolbar.actions.preferredPosition":`Register the position of this action, if strictPosition exists, this option has no effect
28451
28471
  rule:
28452
28472
  Note: Each location has two groups _head _tail by default, representing the first and last group
28453
28473
  1. If a group value is provided, and the group is not _head and _tail
@@ -28525,8 +28545,8 @@ menu-right (\u9876\u90E8\u83DC\u5355\u5DE6\u4FA7\u9760\u53F3)
28525
28545
  inline \u5219\u4E0D\u4F1A\u6709\u5916\u8FB9\u6846
28526
28546
  button \u5219\u4E3A\u6309\u94AE\u6837\u5F0F
28527
28547
  \u4E0D\u6307\u5B9A\u5219\u9ED8\u8BA4\u4E3A button
28528
- inline \u6A21\u5F0F showTitle \u4F1A\u5931\u6548, \u53EA\u663E\u793A icon`,"sumiContributes.toolbar.actions.button.states.btnTitleStyle":"button \u7684\u6587\u672C\u4F4D\u7F6E\u6837\u5F0F","sumiContributes.toolbar.actions.button.states.btnTitleStyle.vertical":"\u4E0A icon \u4E0B\u6587\u672C","sumiContributes.toolbar.actions.button.states.btnTitleStyle.horizontal":"\u5DE6 icon \u53F3\u6587\u672C","sumiContributes.toolbar.actions.popoverComponent":"\u6307\u5B9A\u81EA\u5B9A\u4E49\u7684 Popover \u7EC4\u4EF6 id","sumiContributes.toolbar.actions.popoverStyle":"\u6307\u5B9A Popover \u7684\u6837\u5F0F","sumiContributes.toolbar.actions.popoverStyle.position":"\u6307\u5B9A\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4\u4E3A bottom","sumiContributes.toolbar.actions.popoverStyle.position.top":"\u5728 action \u7684\u4E0A\u65B9","sumiContributes.toolbar.actions.popoverStyle.position.bottom":"\u5728 action \u7684\u4E0B\u65B9","sumiContributes.toolbar.actions.popoverStyle.horizontalOffset":"\u8DDD\u79BB\u53F3\u8FB9\u7684\u504F\u79FB\u91CF(px), \u9ED8\u8BA4 30px","sumiContributes.toolbar.actions.popoverStyle.hideOnClickOutside":"\u70B9\u51FB\u7EC4\u4EF6\u5916\u90E8\u65F6\u81EA\u52A8\u9690\u85CF, \u9ED8\u8BA4 true","sumiContributes.toolbar.actions.popoverStyle.noContainerStyle":"\u4E0D\u8981\u5E26\u7BAD\u5934\uFF0C\u9634\u5F71\uFF0C\u80CC\u666F\u8272\u7B49\u9ED8\u8BA4\u6837\u5F0F","sumiContributes.toolbar.actions.popoverStyle.minWidth":"\u6307\u5B9A popOver \u7684\u6700\u5C0F\u5BBD\u5EA6","sumiContributes.toolbar.actions.popoverStyle.minHeight":"\u6307\u5B9A popOver \u7684\u6700\u5C0F\u9AD8\u5EA6","sumiContributes.toolbar.actions.when":"\u5F53\u6EE1\u8DB3\u6761\u4EF6\u65F6","sumiContributes.toolbar.actions.select.options":"\u5B9A\u4E49 select \u4E0B\u62C9\u5217\u8868\u9879","sumiContributes.toolbar.actions.select.options.iconPath":"\u6309\u94AE\u56FE\u6807\u8DEF\u5F84\uFF0C\u76F8\u5BF9\u4E8E\u63D2\u4EF6\u6839\u76EE\u5F55","sumiContributes.toolbar.actions.select.options.iconMaskMode":"\u56FE\u6807\u6E32\u67D3\u6A21\u5F0F","sumiContributes.toolbar.actions.select.options.label":"\u663E\u793A\u7684\u6587\u6848","sumiContributes.toolbar.actions.select.options.value":"\u9009\u4E2D\u7684\u503C","sumiContributes.toolbar.actions.select.defaultValue":"\u9ED8\u8BA4\u503C","sumiContributes.toolbar.actions.select.optionEqualityKey":"\u7528\u4E8E\u5BF9\u6BD4\u503C\u662F\u5426\u76F8\u7B49\u7684 key","sumiContributes.toolbar.actions.select.states":"\u6837\u5F0F\u72B6\u6001","sumiContributes.toolbar.actions.select.states.backgroundColor":"\u80CC\u666F\u8272","sumiContributes.toolbar.actions.select.states.labelForegroundColor":"\u6587\u6848\u524D\u666F\u8272","sumiContributes.toolbar.actions.select.states.iconForegroundColor":"\u56FE\u6807\u524D\u666F\u8272","sumiContributes.toolbar.actions.select.states.width":"\u5BBD\u5EA6","sumiContributes.toolbar.actions.select.states.minWidth":"\u6700\u5C0F\u5BBD\u5EA6","sumiContributes.menubars":"\u6CE8\u518C\u83DC\u5355\u680F","sumiContributes.menubars.id":"\u4F5C\u4E3A menubar item \u7684 menu id, \u540E\u7EED\u53EF\u901A\u8FC7 menus \u5F80\u8FD9\u91CC\u8D21\u732E\u83DC\u5355\u9879","sumiContributes.menubars.title":"\u5C55\u793A\u7684\u6587\u6848","sumiContributes.menubars.order":"\u6392\u5E8F\u6743\u91CD\uFF0C\u8D8A\u5C0F\u8D8A\u9760\u524D","sumiContributes.menubars.nativeRole":"electron native \u83DC\u5355\u4F7F\u7528\uFF08web \u7AEF\u53EF\u4E0D\u586B\uFF09","sumiContributes.menu":"\u63D0\u4F9B\u83DC\u5355\u9879","sumiContributes.menu.api.CommandPalette":"\u547D\u4EE4\u9762\u677F\u83DC\u5355","sumiContributes.menu.api.ActivityBarExtra":"\u5DE6\u4FA7\u6D3B\u52A8\u680F\u5E95\u90E8\u7684\u83DC\u5355","sumiContributes.menu.api.ActivityBarTopExtra":"\u5DE6\u4FA7\u6D3B\u52A8\u680F\u9876\u90E8\u7684\u83DC\u5355","sumiContributes.menu.api.DebugBreakpointsContext":"\u8C03\u8BD5\u65AD\u70B9\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugCallStackContext":"\u8C03\u8BD5\u8C03\u7528\u5806\u6808\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugConsoleContext":"\u5E95\u90E8\u8C03\u8BD5\u63A7\u5236\u53F0\u65E5\u5FD7\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugVariablesContext":"\u8C03\u8BD5\u53D8\u91CF\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugWatchContext":"\u8C03\u8BD5\u76D1\u89C6\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugToolBar":"\u8C03\u8BD5\u5DE5\u5177\u680F\u7684\u83DC\u5355","sumiContributes.menu.api.EditorContext":"\u7F16\u8F91\u5668\u5185\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.EditorTitle":"\u7F16\u8F91\u5668\u53F3\u4E0A\u89D2\u7684\u6807\u9898\u83DC\u5355","sumiContributes.menu.api.EditorTitleContext":"\u7F16\u8F91\u5668\u4E0A\u65B9\u7684\u9009\u9879\u5361\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.ExplorerContext":"\u8D44\u6E90\u7BA1\u7406\u5668\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.MenubarAppMenu":"\u9876\u5C42\u4E3B\u83DC\u5355\u7684\u5B50\u83DC\u5355\uFF08\u4EC5\u9650\u672C\u5730 Electron \u7AEF\uFF09","sumiContributes.menu.api.MenubarEditMenu":'\u9876\u5C42 "\u7F16\u8F91" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarFileMenu":'\u9876\u5C42 "\u6587\u4EF6" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarGoMenu":'\u9876\u5C42 "\u524D\u5F80" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarHelpMenu":'\u9876\u5C42 "\u5E2E\u52A9" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarViewMenu":'\u9876\u5C42 "\u89C6\u56FE" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarSelectionMenu":'\u9876\u5C42 "\u9009\u62E9" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarTerminalMenu":'\u9876\u5C42 "\u7EC8\u7AEF" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.TerminalInstanceContext":"\u7EC8\u7AEF\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.TerminalNewDropdownContext":"\u7EC8\u7AEF\u9009\u9879\u5361\u53F3\u8FB9\u7684\u4E0B\u62C9\u6846\u5B50\u83DC\u5355","sumiContributes.menu.api.TerminalTabContext":"\u7EC8\u7AEF\u9009\u9879\u5361\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.OpenEditorsContext":'\u8D44\u6E90\u7BA1\u7406\u5668\u91CC "\u6253\u5F00\u7684\u7F16\u8F91\u5668" \u7684\u53F3\u952E\u83DC\u5355',"sumiContributes.menu.api.SCMResourceContext":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u72B6\u6001\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.SCMResourceGroupContext":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u8D44\u6E90\u7EC4\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.SCMResourceFolderContext":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u8D44\u6E90\u6587\u4EF6\u5939\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.SCMTitle":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u7684\u9876\u90E8\u83DC\u5355\u9879","sumiContributes.menu.api.SCMInput":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u7684\u8F93\u5165\u6846\u53F3\u4FA7\u83DC\u5355","sumiContributes.menu.api.SearchContext":"\u8DE8\u6587\u4EF6\u641C\u7D22\u7ED3\u679C\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.StatusBarContext":"\u6700\u5E95\u90E8\u72B6\u6001\u680F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.ViewItemContext":"\u63D0\u4F9B\u7684\u81EA\u5B9A\u4E49\u89C6\u56FE\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.ViewTitle":"\u63D0\u4F9B\u7684\u81EA\u5B9A\u4E49\u89C6\u56FE\u7684\u9876\u90E8\u83DC\u5355\u9879","sumiContributes.menu.api.SettingsIconMenu":'\u5DE6\u4E0B\u89D2 \u201C\u504F\u597D\u8BBE\u7F6E" \u7684\u53F3\u952E\u83DC\u5355',"sumiContributes.submenus":'\u63D0\u4F9B\u5B50\u83DC\u5355\u9879\uFF08\u5C5E\u6027\u7684 key \u662F\u5DF2\u7ECF\u5728 "contributes.menubars" \u6CE8\u518C\u597D\u7684 menubar id\uFF09',"sumiContributes.submenus.id":'\u662F\u5DF2\u7ECF\u5728 "contributes.menus" \u6CE8\u518C\u597D\u7684 menu id',"sumiContributes.submenus.title":"\u5B50\u83DC\u5355\u9879\u7684\u540D\u79F0","sumiContributes.submenus.icon":'(\u53EF\u9009) \u7528\u4E8E\u8868\u793A UI \u4E2D\u7684\u5B50\u83DC\u5355\u7684\u56FE\u6807\u3002\u6587\u4EF6\u8DEF\u5F84\u3001\u5177\u6709\u6DF1\u8272\u548C\u6D45\u8272\u4E3B\u9898\u7684\u6587\u4EF6\u8DEF\u5F84\u7684\u5BF9\u8C61\uFF0C\u6216\u8005\u4E3B\u9898\u56FE\u6807\u5F15\u7528(\u5982 "$(zap)")',"sumiContributes.submenus.icon.light":"\u4F7F\u7528\u6D45\u8272\u4E3B\u9898\u65F6\u7684\u56FE\u6807\u8DEF\u5F84","sumiContributes.submenus.icon.dark":"\u4F7F\u7528\u6DF1\u8272\u4E3B\u9898\u65F6\u7684\u56FE\u6807\u8DEF\u5F84","sumiContributes.SCM":"\u63D0\u4F9B\u81EA\u5B9A\u4E49\u7684 scm \u63A7\u4EF6","sumiContributes.SCM.additional":"\u9700\u8981\u989D\u5916\u8FFD\u52A0\u7684 scm \u63A7\u4EF6\u5217\u8868","sumiContributes.SCM.additional.input":"\u5BF9 input \u63A7\u4EF6\u8FFD\u52A0\u5C5E\u6027"}},46101:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLocalizations=void 0,t.editorLocalizations={"editor.format.preferredFormatterNotFound":"Preferred formatter {0} not found for {1}","editor.configuration.unicodeHighlight.allowedCharacters":"Defines allowed characters that are not being highlighted.","editor.configuration.unicodeHighlight.allowedLocales":"Unicode characters that are common in allowed locales are not being highlighted.","editor.configuration.columnSelection":"Enable that the selection with the mouse and keys is doing column selection","editor.action.toggleColumnSelection":"Toggle Column Selection Mode"}},12651:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLocalizations=void 0,t.editorLocalizations={"editor.format.preferredFormatterNotFound":"\u672A\u627E\u5230 {1} \u7684\u9996\u9009\u683C\u5F0F\u5316\u7A0B\u5E8F {0}","editor.configuration.unicodeHighlight.allowedCharacters":"\u5B9A\u4E49\u4E0D\u88AB\u9AD8\u4EAE\u663E\u793A\u7684\u5141\u8BB8\u5B57\u7B26","editor.configuration.unicodeHighlight.allowedLocales":"\u5728\u5141\u8BB8\u7684\u533A\u57DF\u4E2D\u5E38\u89C1\u7684Unicode\u5B57\u7B26\u4E0D\u4F1A\u88AB\u9AD8\u4EAE\u663E\u793A","editor.configuration.columnSelection":"\u542F\u7528\u5217\u9009\u62E9\u6A21\u5F0F","editor.action.toggleColumnSelection":"\u5207\u6362\u5217\u9009\u62E9\u6A21\u5F0F"}},20741:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(67240),o=e(46101),l=e(36942);t.localizationBundle={languageId:n.LOCALE_TYPES.EN_US,languageName:"english",localizedLanguageName:"English",contents:{ButtonAllow:"Allow",ButtonOK:"Confirm",ButtonCancel:"Cancel",extension:"Extension","common.yes":"Yes","common.no":"No",editTtile:"Edit","common.loading":"Loading...","tree.filter.placeholder":"Enter a keyword or path to filter","file.new":"New File","file.folder.new":"New Folder","file.locate":"Locate File","file.save":"Save File","file.saveAll":"Save All","file.autoSave":"Auto Save","file.open":"Open","file.open.side":"Open to the Side","file.open.type":"Open With...","file.open.type.placeholder":'Select editor for "{0}"',"file.open.type.detail.active":"Active","file.open.type.detail.and":"and","file.open.type.detail.default":"Default","file.open.type.preference.default":'Configure default editor for "{0}"...',"file.delete":"Delete","file.compare":"Compare with Current File","file.rename":"Rename","file.close":"Close","file.copy.path":"Copy Path","file.copy.relativepath":"Copy Relative Path","file.paste.file":"Paste","file.copy.file":"Copy","file.cut.file":"Cut","file.location":"Locate in Files Explorer","file.action.new.file":"New File","file.action.new.folder":"New Folder","file.action.refresh":"Refresh","file.open.folder":"Open Folder","file.open.workspace":"Open Workspace from File ...","file.action.collapse":"Collapse","file.confirm.delete":`Are you sure you want to delete the following files?
28529
- {0}`,"file.confirm.delete.ok":"Move to trash","file.confirm.delete.cancel":"Cancel","file.confirm.move":"Are you sure you want to move file {0} to {1}?","file.confirm.move.ok":"Move","file.confirm.move.cancel":"Cancel","file.confirm.paste":"Are you sure you want to paste the file {0} to {1} ?","file.confirm.paste.ok":"Paste","file.confirm.paste.cancel":"Cancel","file.confirm.replace":"Are you sure you want to replace file {0}?","file.confirm.replace.ok":"Replace","file.confirm.replace.cancel":"Cancel","file.move.existMessage":"The file to be pasted is deleted or moved at the same time. Unable to move/copy. The file already exists at the target location.","file.empty.defaultTitle":"No Open Folder","file.empty.defaultMessage":"The folder has not been opened yet","file.workspace.defaultTip":"Untitled (WORKSPACE)","file.workspace.defaultWorkspaceTip":"{0} (WORKSPACE)","file.empty.openFolder":"Open Folder","file.collapse":"Collapse All","file.refresh":"Refresh","file.search.folder":"Search on this folder","file.focus.files":"Focus on Files Explorer","file.filetree.filter":"Filter on opened files","file.filetree.openTerminalWithPath":"Open In Integrated Terminal","file.tooltip.symbolicLink":"Symbolic Link","file.resource-deleted":"(Deleted)","file.revealInExplorer":"Reveal in File Tree","menu-bar.title.file":"File","menu-bar.title.edit":"Edit","menu-bar.title.selection":"Selection","menu-bar.title.view":"View","menu-bar.title.go":"Go","menu-bar.title.debug":"Debug","menu-bar.title.terminal":"Terminal","menu-bar.title.window":"Window","menu-bar.title.help":"Help","menu-bar.file.save-as":"Save As","menu-bar.file.save-all":"Save All","menu-bar.file.open":"Open File","menu-bar.view.quick.command":"Command Palette...","menu-bar.go.jumpToBracket":"Go to Bracket","menu-bar.go.nextProblemInFiles":"Next Problem","menu-bar.go.prevProblemInFiles":"Previous Problem","menu-bar.file.pref":"Preference","menu-bar.mode.compact":"Compact Mode",editor:"Editor","editor.undo":"Undo","editor.redo":"Redo","editor.saveAll":"Save All","editor.saveCurrent":"Save Current File","editor.saveCodeActions.getting":"Getting code actions from {0}.","editor.saveCodeActions.saving":'Saving "{0}"',"editor.title.context.close":"Close","editor.closeTab.title":"Close ({0})","editor.closeCurrent":"Close Current Editor","editor.openExternal":"Open Externally","editor.cannotOpenBinary":"The file is not displayed in the text editor because it is binary.","editor.splitToLeft":"Split To Left","editor.splitToRight":"Split To Right","editor.splitToTop":"Split To Top","editor.splitToBottom":"Split To Bottom","editor.closeAllInGroup":"Close All","editor.closeToRight":"Close To Right","editor.closeSaved":"Close Saved","editor.cannotSaveWithoutDirectory":"Cannot save file without directory","editor.action.accept":"Accept Changes (Use version on the right)","editor.action.revert":"Revert Changes (Use version on the left)","editor.format.chooseFormatter":"Choose the Formatter","editor.formatDocument.label.multiple":"Format Document With...","editor.formatSelection.label.multiple":"Format Selection With...","editor.chooseEncoding":"Reopen with encoding (Unsaved Changes will be lost)","editor.guessEncodingFromContent":"Guess from content","editor.changeEol":"Select End Of Line Sequence","editor.failToOpen":"Failed to open {0}. Error message: {1}","editor.changeLanguageId":"Select Language Mode","editor.lineHeight":"Line Height","editor.lineHeight.description":`Controls the line height.\r
28548
+ inline \u6A21\u5F0F showTitle \u4F1A\u5931\u6548, \u53EA\u663E\u793A icon`,"sumiContributes.toolbar.actions.button.states.btnTitleStyle":"button \u7684\u6587\u672C\u4F4D\u7F6E\u6837\u5F0F","sumiContributes.toolbar.actions.button.states.btnTitleStyle.vertical":"\u4E0A icon \u4E0B\u6587\u672C","sumiContributes.toolbar.actions.button.states.btnTitleStyle.horizontal":"\u5DE6 icon \u53F3\u6587\u672C","sumiContributes.toolbar.actions.popoverComponent":"\u6307\u5B9A\u81EA\u5B9A\u4E49\u7684 Popover \u7EC4\u4EF6 id","sumiContributes.toolbar.actions.popoverStyle":"\u6307\u5B9A Popover \u7684\u6837\u5F0F","sumiContributes.toolbar.actions.popoverStyle.position":"\u6307\u5B9A\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4\u4E3A bottom","sumiContributes.toolbar.actions.popoverStyle.position.top":"\u5728 action \u7684\u4E0A\u65B9","sumiContributes.toolbar.actions.popoverStyle.position.bottom":"\u5728 action \u7684\u4E0B\u65B9","sumiContributes.toolbar.actions.popoverStyle.horizontalOffset":"\u8DDD\u79BB\u53F3\u8FB9\u7684\u504F\u79FB\u91CF(px), \u9ED8\u8BA4 30px","sumiContributes.toolbar.actions.popoverStyle.hideOnClickOutside":"\u70B9\u51FB\u7EC4\u4EF6\u5916\u90E8\u65F6\u81EA\u52A8\u9690\u85CF, \u9ED8\u8BA4 true","sumiContributes.toolbar.actions.popoverStyle.noContainerStyle":"\u4E0D\u8981\u5E26\u7BAD\u5934\uFF0C\u9634\u5F71\uFF0C\u80CC\u666F\u8272\u7B49\u9ED8\u8BA4\u6837\u5F0F","sumiContributes.toolbar.actions.popoverStyle.minWidth":"\u6307\u5B9A popOver \u7684\u6700\u5C0F\u5BBD\u5EA6","sumiContributes.toolbar.actions.popoverStyle.minHeight":"\u6307\u5B9A popOver \u7684\u6700\u5C0F\u9AD8\u5EA6","sumiContributes.toolbar.actions.when":"\u5F53\u6EE1\u8DB3\u6761\u4EF6\u65F6","sumiContributes.toolbar.actions.select.options":"\u5B9A\u4E49 select \u4E0B\u62C9\u5217\u8868\u9879","sumiContributes.toolbar.actions.select.options.iconPath":"\u6309\u94AE\u56FE\u6807\u8DEF\u5F84\uFF0C\u76F8\u5BF9\u4E8E\u63D2\u4EF6\u6839\u76EE\u5F55","sumiContributes.toolbar.actions.select.options.iconMaskMode":"\u56FE\u6807\u6E32\u67D3\u6A21\u5F0F","sumiContributes.toolbar.actions.select.options.label":"\u663E\u793A\u7684\u6587\u6848","sumiContributes.toolbar.actions.select.options.value":"\u9009\u4E2D\u7684\u503C","sumiContributes.toolbar.actions.select.defaultValue":"\u9ED8\u8BA4\u503C","sumiContributes.toolbar.actions.select.optionEqualityKey":"\u7528\u4E8E\u5BF9\u6BD4\u503C\u662F\u5426\u76F8\u7B49\u7684 key","sumiContributes.toolbar.actions.select.states":"\u6837\u5F0F\u72B6\u6001","sumiContributes.toolbar.actions.select.states.backgroundColor":"\u80CC\u666F\u8272","sumiContributes.toolbar.actions.select.states.labelForegroundColor":"\u6587\u6848\u524D\u666F\u8272","sumiContributes.toolbar.actions.select.states.iconForegroundColor":"\u56FE\u6807\u524D\u666F\u8272","sumiContributes.toolbar.actions.select.states.width":"\u5BBD\u5EA6","sumiContributes.toolbar.actions.select.states.minWidth":"\u6700\u5C0F\u5BBD\u5EA6","sumiContributes.menubars":"\u6CE8\u518C\u83DC\u5355\u680F","sumiContributes.menubars.id":"\u4F5C\u4E3A menubar item \u7684 menu id, \u540E\u7EED\u53EF\u901A\u8FC7 menus \u5F80\u8FD9\u91CC\u8D21\u732E\u83DC\u5355\u9879","sumiContributes.menubars.title":"\u5C55\u793A\u7684\u6587\u6848","sumiContributes.menubars.order":"\u6392\u5E8F\u6743\u91CD\uFF0C\u8D8A\u5C0F\u8D8A\u9760\u524D","sumiContributes.menubars.nativeRole":"electron native \u83DC\u5355\u4F7F\u7528\uFF08web \u7AEF\u53EF\u4E0D\u586B\uFF09","sumiContributes.menu":"\u63D0\u4F9B\u83DC\u5355\u9879","sumiContributes.menu.api.CommandPalette":"\u547D\u4EE4\u9762\u677F\u83DC\u5355","sumiContributes.menu.api.ActivityBarExtra":"\u5DE6\u4FA7\u6D3B\u52A8\u680F\u5E95\u90E8\u7684\u83DC\u5355","sumiContributes.menu.api.ActivityBarTopExtra":"\u5DE6\u4FA7\u6D3B\u52A8\u680F\u9876\u90E8\u7684\u83DC\u5355","sumiContributes.menu.api.DebugBreakpointsContext":"\u8C03\u8BD5\u65AD\u70B9\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugCallStackContext":"\u8C03\u8BD5\u8C03\u7528\u5806\u6808\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugConsoleContext":"\u5E95\u90E8\u8C03\u8BD5\u63A7\u5236\u53F0\u65E5\u5FD7\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugVariablesContext":"\u8C03\u8BD5\u53D8\u91CF\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugWatchContext":"\u8C03\u8BD5\u76D1\u89C6\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.DebugToolBar":"\u8C03\u8BD5\u5DE5\u5177\u680F\u7684\u83DC\u5355","sumiContributes.menu.api.EditorContext":"\u7F16\u8F91\u5668\u5185\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.EditorTitle":"\u7F16\u8F91\u5668\u53F3\u4E0A\u89D2\u7684\u6807\u9898\u83DC\u5355","sumiContributes.menu.api.EditorTitleContext":"\u7F16\u8F91\u5668\u4E0A\u65B9\u7684\u9009\u9879\u5361\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.ExplorerContext":"\u8D44\u6E90\u7BA1\u7406\u5668\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.MenubarAppMenu":"\u9876\u5C42\u4E3B\u83DC\u5355\u7684\u5B50\u83DC\u5355\uFF08\u4EC5\u9650\u672C\u5730 Electron \u7AEF\uFF09","sumiContributes.menu.api.MenubarEditMenu":'\u9876\u5C42 "\u7F16\u8F91" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarFileMenu":'\u9876\u5C42 "\u6587\u4EF6" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarGoMenu":'\u9876\u5C42 "\u524D\u5F80" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarHelpMenu":'\u9876\u5C42 "\u5E2E\u52A9" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarViewMenu":'\u9876\u5C42 "\u89C6\u56FE" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarSelectionMenu":'\u9876\u5C42 "\u9009\u62E9" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.MenubarTerminalMenu":'\u9876\u5C42 "\u7EC8\u7AEF" \u83DC\u5355\u4E2D\u7684\u5B50\u83DC\u5355',"sumiContributes.menu.api.TerminalInstanceContext":"\u7EC8\u7AEF\u9762\u677F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.TerminalNewDropdownContext":"\u7EC8\u7AEF\u9009\u9879\u5361\u53F3\u8FB9\u7684\u4E0B\u62C9\u6846\u5B50\u83DC\u5355","sumiContributes.menu.api.TerminalTabContext":"\u7EC8\u7AEF\u9009\u9879\u5361\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.OpenEditorsContext":'\u8D44\u6E90\u7BA1\u7406\u5668\u91CC "\u6253\u5F00\u7684\u7F16\u8F91\u5668" \u7684\u53F3\u952E\u83DC\u5355',"sumiContributes.menu.api.SCMResourceContext":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u72B6\u6001\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.SCMResourceGroupContext":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u8D44\u6E90\u7EC4\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.SCMResourceFolderContext":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u8D44\u6E90\u6587\u4EF6\u5939\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.SCMTitle":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u7684\u9876\u90E8\u83DC\u5355\u9879","sumiContributes.menu.api.SCMInput":"SCM \u6E90\u4EE3\u7801\u7BA1\u7406\u7684\u8F93\u5165\u6846\u53F3\u4FA7\u83DC\u5355","sumiContributes.menu.api.SearchContext":"\u8DE8\u6587\u4EF6\u641C\u7D22\u7ED3\u679C\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.StatusBarContext":"\u6700\u5E95\u90E8\u72B6\u6001\u680F\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.ViewItemContext":"\u63D0\u4F9B\u7684\u81EA\u5B9A\u4E49\u89C6\u56FE\u7684\u53F3\u952E\u83DC\u5355","sumiContributes.menu.api.ViewTitle":"\u63D0\u4F9B\u7684\u81EA\u5B9A\u4E49\u89C6\u56FE\u7684\u9876\u90E8\u83DC\u5355\u9879","sumiContributes.menu.api.SettingsIconMenu":'\u5DE6\u4E0B\u89D2 \u201C\u504F\u597D\u8BBE\u7F6E" \u7684\u53F3\u952E\u83DC\u5355',"sumiContributes.submenus":'\u63D0\u4F9B\u5B50\u83DC\u5355\u9879\uFF08\u5C5E\u6027\u7684 key \u662F\u5DF2\u7ECF\u5728 "contributes.menubars" \u6CE8\u518C\u597D\u7684 menubar id\uFF09',"sumiContributes.submenus.id":'\u662F\u5DF2\u7ECF\u5728 "contributes.menus" \u6CE8\u518C\u597D\u7684 menu id',"sumiContributes.submenus.title":"\u5B50\u83DC\u5355\u9879\u7684\u540D\u79F0","sumiContributes.submenus.icon":'(\u53EF\u9009) \u7528\u4E8E\u8868\u793A UI \u4E2D\u7684\u5B50\u83DC\u5355\u7684\u56FE\u6807\u3002\u6587\u4EF6\u8DEF\u5F84\u3001\u5177\u6709\u6DF1\u8272\u548C\u6D45\u8272\u4E3B\u9898\u7684\u6587\u4EF6\u8DEF\u5F84\u7684\u5BF9\u8C61\uFF0C\u6216\u8005\u4E3B\u9898\u56FE\u6807\u5F15\u7528(\u5982 "$(zap)")',"sumiContributes.submenus.icon.light":"\u4F7F\u7528\u6D45\u8272\u4E3B\u9898\u65F6\u7684\u56FE\u6807\u8DEF\u5F84","sumiContributes.submenus.icon.dark":"\u4F7F\u7528\u6DF1\u8272\u4E3B\u9898\u65F6\u7684\u56FE\u6807\u8DEF\u5F84","sumiContributes.SCM":"\u63D0\u4F9B\u81EA\u5B9A\u4E49\u7684 scm \u63A7\u4EF6","sumiContributes.SCM.additional":"\u9700\u8981\u989D\u5916\u8FFD\u52A0\u7684 scm \u63A7\u4EF6\u5217\u8868","sumiContributes.SCM.additional.input":"\u5BF9 input \u63A7\u4EF6\u8FFD\u52A0\u5C5E\u6027"}},46101:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLocalizations=void 0,t.editorLocalizations={"editor.format.preferredFormatterNotFound":"Preferred formatter {0} not found for {1}","editor.configuration.unicodeHighlight.allowedCharacters":"Defines allowed characters that are not being highlighted.","editor.configuration.unicodeHighlight.allowedLocales":"Unicode characters that are common in allowed locales are not being highlighted.","editor.configuration.columnSelection":"Enable that the selection with the mouse and keys is doing column selection","editor.action.toggleColumnSelection":"Toggle Column Selection Mode"}},12651:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLocalizations=void 0,t.editorLocalizations={"editor.format.preferredFormatterNotFound":"\u672A\u627E\u5230 {1} \u7684\u9996\u9009\u683C\u5F0F\u5316\u7A0B\u5E8F {0}","editor.configuration.unicodeHighlight.allowedCharacters":"\u5B9A\u4E49\u4E0D\u88AB\u9AD8\u4EAE\u663E\u793A\u7684\u5141\u8BB8\u5B57\u7B26","editor.configuration.unicodeHighlight.allowedLocales":"\u5728\u5141\u8BB8\u7684\u533A\u57DF\u4E2D\u5E38\u89C1\u7684Unicode\u5B57\u7B26\u4E0D\u4F1A\u88AB\u9AD8\u4EAE\u663E\u793A","editor.configuration.columnSelection":"\u542F\u7528\u5217\u9009\u62E9\u6A21\u5F0F","editor.action.toggleColumnSelection":"\u5207\u6362\u5217\u9009\u62E9\u6A21\u5F0F"}},20741:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(67240),o=e(46101),l=e(36942);t.localizationBundle={languageId:n.LOCALE_TYPES.EN_US,languageName:"english",localizedLanguageName:"English",contents:{ButtonAllow:"Allow",ButtonOK:"Confirm",ButtonCancel:"Cancel",extension:"Extension","common.yes":"Yes","common.no":"No",editTtile:"Edit","common.loading":"Loading...","tree.filter.placeholder":"Enter a keyword or path to filter","file.new":"New File","file.folder.new":"New Folder","file.locate":"Locate File","file.save":"Save File","file.saveAll":"Save All","file.autoSave":"Auto Save","file.open":"Open","file.open.side":"Open to the Side","file.open.type":"Open With...","file.open.type.placeholder":'Select editor for "{0}"',"file.open.type.detail.active":"Active","file.open.type.detail.and":"and","file.open.type.detail.default":"Default","file.open.type.preference.default":'Configure default editor for "{0}"...',"file.delete":"Delete","file.compare":"Compare with Current File","file.rename":"Rename","file.close":"Close","file.copy.path":"Copy Path","file.copy.relativepath":"Copy Relative Path","file.paste.file":"Paste","file.copy.file":"Copy","file.cut.file":"Cut","file.location":"Locate in Files Explorer","file.action.new.file":"New File","file.action.new.folder":"New Folder","file.action.refresh":"Refresh","file.open.folder":"Open Folder","file.open.workspace":"Open Workspace from File ...","file.action.collapse":"Collapse","file.confirm.delete":`### Are you sure you want to delete the following {0} files?
28549
+ {1}`,"file.confirm.deleteTips":"You can restore files from the Trash","file.confirm.moveToTrash.ok":"Move to trash","file.confirm.delete.ok":"Delete","file.confirm.delete.cancel":"Cancel","file.confirm.move":"Are you sure you want to move file {0} to {1}?","file.confirm.move.ok":"Move","file.confirm.move.cancel":"Cancel","file.confirm.paste":"Are you sure you want to paste the file {0} to {1} ?","file.confirm.paste.ok":"Paste","file.confirm.paste.cancel":"Cancel","file.confirm.replace":"Are you sure you want to replace file {0}?","file.confirm.replace.ok":"Replace","file.confirm.replace.cancel":"Cancel","file.move.existMessage":"The file to be pasted is deleted or moved at the same time. Unable to move/copy. The file already exists at the target location.","file.empty.defaultTitle":"No Open Folder","file.empty.defaultMessage":"The folder has not been opened yet","file.workspace.defaultTip":"Untitled (WORKSPACE)","file.workspace.defaultWorkspaceTip":"{0} (WORKSPACE)","file.empty.openFolder":"Open Folder","file.collapse":"Collapse All","file.refresh":"Refresh","file.search.folder":"Search on this folder","file.focus.files":"Focus on Files Explorer","file.filetree.filter":"Filter on opened files","file.filetree.openTerminalWithPath":"Open In Integrated Terminal","file.tooltip.symbolicLink":"Symbolic Link","file.resource-deleted":"(Deleted)","file.revealInExplorer":"Reveal in File Tree","menu-bar.title.file":"File","menu-bar.title.edit":"Edit","menu-bar.title.selection":"Selection","menu-bar.title.view":"View","menu-bar.title.go":"Go","menu-bar.title.debug":"Debug","menu-bar.title.terminal":"Terminal","menu-bar.title.window":"Window","menu-bar.title.help":"Help","menu-bar.file.save-as":"Save As","menu-bar.file.save-all":"Save All","menu-bar.file.open":"Open File","menu-bar.view.quick.command":"Command Palette...","menu-bar.go.jumpToBracket":"Go to Bracket","menu-bar.go.nextProblemInFiles":"Next Problem","menu-bar.go.prevProblemInFiles":"Previous Problem","menu-bar.file.pref":"Preference","menu-bar.mode.compact":"Compact Mode",editor:"Editor","editor.undo":"Undo","editor.redo":"Redo","editor.saveAll":"Save All","editor.saveCurrent":"Save Current File","editor.saveCodeActions.getting":"Getting code actions from {0}.","editor.saveCodeActions.saving":'Saving "{0}"',"editor.title.context.close":"Close","editor.closeTab.title":"Close ({0})","editor.closeCurrent":"Close Current Editor","editor.openExternal":"Open Externally","editor.cannotOpenBinary":"The file is not displayed in the text editor because it is binary.","editor.splitToLeft":"Split To Left","editor.splitToRight":"Split To Right","editor.splitToTop":"Split To Top","editor.splitToBottom":"Split To Bottom","editor.closeAllInGroup":"Close All","editor.closeToRight":"Close To Right","editor.closeSaved":"Close Saved","editor.cannotSaveWithoutDirectory":"Cannot save file without directory","editor.action.accept":"Accept Changes (Use version on the right)","editor.action.revert":"Revert Changes (Use version on the left)","editor.format.chooseFormatter":"Choose the Formatter","editor.formatDocument.label.multiple":"Format Document With...","editor.formatSelection.label.multiple":"Format Selection With...","editor.chooseEncoding":"Reopen with encoding (Unsaved Changes will be lost)","editor.guessEncodingFromContent":"Guess from content","editor.changeEol":"Select End Of Line Sequence","editor.failToOpen":"Failed to open {0}. Error message: {1}","editor.changeLanguageId":"Select Language Mode","editor.lineHeight":"Line Height","editor.lineHeight.description":`Controls the line height.\r
28530
28550
  Use 0 to automatically compute the line height from the font size.\r
28531
28551
  Values between 0 and 8 will be used as a multiplier with the font size.\r
28532
28552
  Values greater than or equal to 8 will be used as effective values.`,"status-bar.label.line":"Ln","status-bar.label.column":"Col","status-bar.label.selected":"Selected","status-bar.label.tabType.space":"Spaces","status-bar.label.tabType.tab":"Tab Size","status-bar.scm":"Source Control","status-bar.editor-selection":"Editor Selection","status-bar.editor-language":"Editor Language","status-bar.editor-encoding":"Editor Encoding","status-bar.editor-space":"Editor Space","status-bar.editor-eol":"Editor End Of Line","status-bar.editor-indentation":"Editor Indentation","status-bar.editor-langStatus":"Editor Language Status","editor.closeOtherEditors":"Close Others","status.editor.chooseLanguage":"Choose Language Mode","status.editor.goToLineCol":"Go to Line/Column","status.editor.chooseEncoding":"Choose Encoding","status.editor.changeEol":"Select End Of Line Sequence","edit.cut":"Cut","edit.copy":"Copy","edit.paste":"Paste","edit.selectAll":"Select All","editor.copyPath":"Copy Path","editor.copyRelativePath":"Copy Relative Path","editor.goBack":"Back","editor.goForward":"Forward","editor.quickOpen":"Go to File...","editor.editor.goToSymbol":"Go to Symbol...","editor.goToLine":"Go to Line...","editor.openType":"Open Type","editor.closeEditorsInOtherGroups":"Close Other Groups","editor.resetEditorGroups":"Reset Editor Group","editor.revert":"Revert Document","editor.tokenize.test":"Try Tokenize First Selection","quickopen.goToLine.defaultMessage":"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.","quickopen.goToLine.notValid":"Not A valid Editor","quickopen.goToLine.lineInfo":"Go To Line {0}","quickopen.goToLine.colInfo":" and Character {0}","quickopen.goToLine.desc":"Go to Line...","quickopen.command.placeholder":"Placeholder","quickopen.command.description":"Run IDE Command","quickopen.command.nohandler":"Cannot Find Anymore","quickopen.quickinput.prompt":"Press 'Enter' to confirm or 'Escape' to cancel","quickopen.tab.file":"File","quickopen.tab.class":"Class","quickopen.tab.symbol":"Symbol","quickopen.tab.command":"Command","quickopen.tab.goToLine":"Go To Line","quickopen.tab.tip.prefix":"Press","quickopen.tab.tip.suffix":"to switch","quickOpen.openOnTheRightSide":"Open on the side","explorer.title":"Explorer","explorer.electron.revealInFinder":"Reveal In Explorer","explorer.electron.openInSystemTerminal":"Open In Terminal","explorer.electron.openInSystemTerminal.error":"Open {0} In Terminal Fail: {1}","search.title":"Search","search.input.placeholder":"Enter search content","search.input.title":"Search","search.replace.title":"Replace","search.input.checkbox":"Display search rules","file-search.command.fileOpen.description":"Open File","file-search.command.fileOpen.placeholder":"Search File By Name(Append : To Go to Line or @ To Go to Symbol)","search.includes":"Files to include","search.includes.description":'Enter the file name or folder name, multiple separated by ","',"search.excludes":"Files to exclude","search.excludes.default.enable":"Enable default exclusions","search.replaceAll.label":"Replace All","search.replace.label":"Replace","search.files.result":"{0} results found in {1} files","search.CollapseDeepestExpandedLevelAction.label":"Collapse All","search.ExpandDeepestExpandedLevelAction.label":"Expand All","search.ClearSearchResultsAction.label":"Clear Search Results","search.RefreshAction.label":"Refresh","search.removeAll.occurrences.files.confirmation.message":"Are you sure to replace {0} of the {1} files","search.removeAll.occurrences.file.confirmation.message":"Are you sure to replace the {0} results in this file?","search.result.hide":"Hide","search.menu.copyAll":"Copy All","search.help.showIncludeRule":"View syntax rules","search.help.supportRule":"Support the following syntax rules:","search.help.excludeList":"Excluded items include:","search.help.concatRule":"Multiple conditional separation","search.help.matchOneOrMoreRule":"To match one or more characters in a path segment","search.help.matchOne":"To match on one character in a path segment","search.help.matchAny":"To match any number of path segments, including none","search.help.matchWithGroup":"To group conditions","search.help.matchRange":"To declare a range of characters to match","search.help.modify":"Modify","search.replace.buttonOK":"Replace","search.replace.buttonCancel":"Cancel","search.too.many.results":"Because your search terms are too loose, we only show some search results","search.fileReplaceChanges":"{0} \u2194 {1} (Replace Preview)","search.fileResults":"File results","search.fileResults.notfound":"No files matching","search.fileSymbolResults":"symbols ({0})","search.fileSymbolResults.notfound":"No symbols matching","search.historyMatches":"Recently Opened","search.replaceAll.occurrencesMessage":"Replaced {0} occurrences across {1} files with '{2}'.","search.replace.toggle.button.title":"Toggle Replace","search.caseDescription":"Match Case","search.wordsDescription":"Match Whole Word","search.regexDescription":"Use Regular Expression","search.includeIgnoredFiles":"Include Ignored Files","search.onlyOpenEditors":"Search only in Open Editors","search.noResultsFound":"No results found. Review your settings for configured exclusions and ignore files","quickopen.recent-commands":"recently used","quickopen.other-commands":"other commands","quickopen.commands.notfound":"No commands matchings",mSelection:"Selection","selection.all":"Select All","dialog.confirm":"confirm","dialog.file.name":"File Name","dialog.file.title":"Select Directory:","dialog.file.openLabel":"Open File:","dialog.file.saveLabel":"Save File:","dialog.file.close":"Close","dialog.file.ok":"OK","dialog.ensure":"OK","editorOpenType.code":"Code","editorOpenType.preview":"Preview","scm.title":"Source Control","scm.action.git.refresh":"Refresh","scm.action.git.commit":"Commit","scm.action.git.more":"More Actions","scm.statusbar.repo":"Repo","scm.provider.title":"Source Control Providers","scm.provider.empty":"No source control providers registered.","scm.provider.init":"Click to initialize a repository","scm.diff.change.next":"Next Change","scm.diff.change.previous":"Previous Change","scm.diff.toggle.renderSideBySide":"Toggle Inline View","scm.dirtyDiff.changes":"{0} of {1} changes","debug.action.add.smartAddConfiguration":"Smart Add Configuration","debug.action.add.configuration":"Add Configuration","debug.action.edit.configuration":"Edit Configuration","debug.action.open.launch.editor":"Open Launch Editor UI","debug.action.no.configuration":"No Configurations","debug.action.start":"Start Debugging","debug.action.open.configuration":"Open launch.json","debug.action.debug.console":"Debug Console","debug.action.step-into":"Step Into","debug.action.step-over":"Step Over","debug.action.step-out":"Step Out","debug.action.restart":"Restart","debug.action.pause":"Pause","debug.action.stop":"Stop","debug.action.disattach":"Disattach","debug.action.runToCursor":"Run to Cursor","debug.action.forceRunToCursor":"Force Run to Cursor","debug.breakpoint.toggle":"Enable/Disable Breakpoints","debug.breakpoint.removeAll":"Remove All Breakpoints","debug.breakpoint.uncaughtExceptions":"Uncaught Exceptions","debug.breakpoint.allExceptions":"All Exceptions","debug.watch.removeAll":"Remove All Expression","debug.watch.collapseAll":"Collapse All Expression","debug.watch.add":"Add Expression","debug.watch.notAvailable":"not available","debug.watch.edit":"Edit Expression","debug.watch.copyValue":"Copy Value","debug.watch.remove":"Remove Expression","debug.action.continue":"Continue","debug.console.panel.title":"Debug Console","debug.console.panel.default":"default","debug.console.filter.placeholder":"Filter (e.g. text, !exclude)","debug.console.clear":"Clear","debug.console.copy":"Copy","debug.console.copyAll":"Copy All","debug.console.collapseAll":"Collapse All","debug.console.followLink":"{0} + click to follow link","debug.console.input.placeholder":"Please start a debug session to evaluate expressions","debug.console.errorMessage":"Debug session initialization failed. See console for details.","debug.console.consoleCleared":"Console was cleared","debug.notSupported.type":'Debug type "{0}" is not supported, please check your launch config.',"debug.notSupported.any":"Debug is not supported, please check your launch config.","debug.stack.loadMore":"Load All Stack Frames","debug.stack.loading":"Loading...","debug.stack.showMoreAndOrigin":"Show {0} More: {1}","debug.breakpoint.deactive":"Deactivate Breakpoints","debug.breakpoint.active":"Activate Breakpoints","debug.threads.title":"THREADS","debug.watch.title":"WATCH","debug.callStack.title":"CALL STACK","debug.variables.title":"VARIABLES","debug.variables.view.memory":"View Binary Data","debug.variables.view.memory.prompt.hexEditor.notInstalled":"Inspecting binary data requires the Hex Editor extension.","debug.breakpoints.title":"BREAKPOINTS","debug.container.title":"Debug","debug.breakpoint.breakpointMessage":"Breakpoint","debug.breakpoint.logpointMessage":"Logpoint","debug.breakpoint.conditionalMessage":"Conditional Breakpoint","debug.breakpoint.unverified":"Unverified ","debug.breakpoint.disabled":"Disabled ","debug.breakpoint.blank":"Blank","debug.configuration.selectAutomaticDebugTypesHint":"Automatic Configuration","debug.configuration.selectAutomaticDebugTypes":"Select a Debug Type","debug.configuration.selectAutomaticDebugConfiguration":"Select a DebugConfiguration","debug.configuration.comment1":"Use IntelliSense to learn about possible attributes.","debug.configuration.comment2":"Hover to view descriptions of existing attributes.","debug.configuration.comment3":"For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387","debug.launch.existed":'Debug configuration "{0}" is already running',"debug.expression.log.placeholder":'Message to log when breakpoint is hit. Expressions within {} are interpolated. Press "Enter" to confirm and "Esc" to cancel.',"debug.expression.hit.placeholder":'Break when hit count condition is met. Press "Enter" to confirm and "Esc" to cancel.',"debug.expression.condition.placeholder":'Break when the expression evaluates to true. Press "Enter" to confirm and "Esc" to cancel.',"debug.expression.condition":"Expression","debug.expression.hitCondition":"Hit Count","debug.expression.logMessage":"Log Message","debug.menu.delete.breakpoint":"Delete Breakpoint","debug.menu.edit.breakpoint":"Edit Breakpoint","debug.menu.disable.breakpoint":"Disable Breakpoint","debug.menu.enable.breakpoint":"Enable Breakpoint","debug.menu.add.logpoint":"Add Log breakpoint","debug.menu.add.conditional":"Add Condition Breakpoint","debug.menu.add.breakpoint":"Add Breakpoint","debug.menu.disable.logpoint":"Disable Log Breakpoint","debug.menu.title.run":"Run or Debug...","debug.stack.frame.noSource":"Unknown","debug.stack.frame.because":"Because Of","debug.stack.frame.stopped":"Stopped","debug.stack.frame.running":"Running","debug.launch.configurations.debugType":"Type of configuration.","debug.launch.configurations.debugTypeNotRecognised":"The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled.","debug.launch.configurations.node2NotSupported":'"node2" is no longer supported, use "node" instead and set the "protocol" attribute to "inspector".',"debug.launch.configurations.debugName":"Name of configuration; appears in the launch configuration drop down menu.","debug.launch.configurations.debugRequest":'Request type of configuration. Can be "launch" or "attach".',"debug.launch.configurations.debugServer":"For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode","debug.launch.configurations.debugPrelaunchTask":"Task to run before debug session starts.","debug.launch.configurations.debugPostDebugTask":"Task to run after debug session ends.","debug.launch.configurations.debugWindowsConfiguration":"Windows specific launch configuration attributes.","debug.launch.configurations.debugOSXConfiguration":"OS X specific launch configuration attributes.","debug.launch.configurations.debugLinuxConfiguration":"Linux specific launch configuration attributes.","debug.launch.typeNotSupported":'The debug session type "{0}" is not supported.',"debug.launch.catchError":"There was an error starting the debug session, check the logs for more details.","debug.launch.view.template.button.addItem":"Add items","debug.launch.view.template.input.placeholder":"Please enter {0}","debug.launch.view.template.button.submit":"Add new configuration item","debug.launch.view.edit.inLaunchJson":"Edit in launch.json","debug.widget.exception.thrownWithId":"Exception has occurred: {0}","debug.widget.exception.thrown":"Exception has occurred.","output.tabbar.title":"Output","output.channel.none":"<no output yet>","output.configurationTitle":"Output settings","output.logWhenNoPanel":"Whether to output to the browser when no available panel","output.maxChannelLine":"Max channel message line length","output.maxChannelLineDesc":"Max channel message line length","output.enableLogHighlight":"Enable/disable Log Highlight","output.enableLogHighlightDesc":"Use Log language to tokenization log text, vscode-log extension is required","output.enableSmartScroll":"Enable/disable Smart scrolling","output.enableSmartScrollDesc":"Smart scrolling allows you to lock scrolling automatically when you click in the output view and unlocks when you click in the last line.","preference.menubar.mode.compact":"Controls whether the menu bar uses compact mode","preference.explorer.confirm.delete":"Controls whether the explorer should ask for confirmation when deleting a file via trash","preference.explorer.confirm.move":"Controls whether the explorer should ask for confirmation when moving a file","preference.files.watcherExclude":"Configure glob patterns of file paths to exclude from file watching. Patterns must match on absolute paths (i.e. prefix with ** or the full path to match properly). Changing this setting requires a restart. When you experience Code consuming lots of cpu time on startup, you can exclude large folders to reduce the initial load.","preference.files.exclude":"Configure glob patterns for excluding files and folders. For example, the files explorer decides which files and folders to show or hide based on this setting.","preference.search.exclude":"Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the `#files.exclude#` setting.","preference.search.include":"Configure glob patterns for including files and folders in searches.","preference.files.watcherExclude.title":"Exclusion file watch `files.watcherExclude`","preference.search.exclude.title":"Search exclusion file `search.exclude`","preference.search.useReplacePreview":"Controls whether to open Replace Preview when selecting or replacing a match.","preference.search.searchOnType":"Controls whether to search as you type","preference.search.searchOnTypeDebouncePeriod":"Controls the debounce period of search as you type in milliseconds.","preference.files.exclude.title":"Exclude file display `files.exclude`","preference.array.additem":"Add","preference.files.associations.title":"File Association","preference.files.associations":'Configure file associations to languages (e.g. "*.extension": "html"). These have precedence over the default associations of the languages installed.',"preference.files.encoding.title":"File Encoding","preference.files.encoding":"The default character set encoding to use when reading and writing files.","preference.files.autoGuessEncoding":"When enabled, the editor will attempt to guess the character set encoding when opening files. This setting can also be configured per language.","preference.files.autoGuessEncoding.title":"Auto Guess Encoding","preference.explorer.fileTree.indent.title":"Explorer: FileTree Indent","preference.explorer.fileTree.baseIndent.title":"Explorer: FileTree BaseIndent","preference.explorer.compactFolders.title":"Explorer: Compact Mode","preference.explorer.compactFolders":"Controls whether the explorer should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element. Useful for Java package structures, for example.","preference.explorer.autoReveal":"Controls whether the explorer should automatically reveal and select files when opening them.","preference.editorTitle.openSource":"Open Setting (JSON)","preference.editorTitle.openUserSource":"Open User Setting (JSON)","preference.editorTitle.openWorkspaceSource":"Open Workspace Setting (JSON)","preference.editorTitle.openPreference":"Open Setting","preference.view.saveLayoutWithWorkspace.title":"Controls whether the layout should bind with workspace","preference.stringArray.operate.delete":"Delete","preference.stringArray.operate.edit":"Edit","preference.stringArray.operate.editTip":"Press \u21B2","preference.stringArray.none":"None","preference.enum.default":"Default","preference.terminal.type":"Default Shell Type","preference.terminal.typeDesc":"To change the default type of create a new terminal","preference.terminal.fontFamily":"Terminal > Font Family","preference.terminal.fontSize":"Terminal > Font Size","preference.terminal.fontWeight":"Terminal > Font Weight","preference.terminal.lineHeight":"Terminal > Line Height","preference.terminal.cursorBlink":"Terminal > Cursor Blink","preference.terminal.scrollback":"Terminal > Cursor Scrollback","preference.terminal.integrated.shellArgs.linux":"Terminal > Shell Args Linux","preference.terminal.integrated.shellArgs.linuxDesc":"The command line arguments to use when on the Linux terminal. ","preference.terminal.integrated.copyOnSelection":"Terminal > Copy On Selection","preference.terminal.integrated.copyOnSelectionDesc":"Controls whether text selected in the terminal will be copied to the clipboard.","preference.terminal.integrated.localEchoEnabled":"Terminal > Local Echo","preference.terminal.integrated.localEchoDesc":"When local echo should be enabled.","preference.terminal.integrated.localEchoLatencyThreshold":"Local Echo Latency Threshold","preference.terminal.integrated.localEchoLatencyThresholdDesc":"Length of network delay, in milliseconds, where local edits will be echoed on the terminal without waiting for server acknowledgement. If '0', local echo will always be on, and if '-1' it will be disabled.","preference.terminal.integrated.localEchoExcludePrograms":"Local Echo Exclude Programs","preference.terminal.integrated.localEchoExcludeProgramsDesc":"Local echo will be disabled when any of these program names are found in the terminal title.","preference.terminal.integrated.localEchoStyle":"Local Echo Style","preference.terminal.integrated.localEchoStyleDesc":"Terminal style of locally echoed text; either a font style or an RGB color.","preference.terminal.integrated.xtermRenderType":"Xterm Render Type","preference.terminal.integrated.xtermRenderTypeDesc":"Choose Xterm render type, Webgl for better performance, Canvas better compatibility","preference.terminal.integrated.enablePersistentSessionDesc":"Persist terminal sessions/history for the workspace across window reloads.","preference.terminal.integrated.cursorStyle":"Terminal > Cursor Style","preference.terminal.integrated.cursorStyleDesc":"Control the style of terminal cursor","common.preference.open":"Settings","common.keymaps.open":"Keyboard Shortcut","common.about":"About","common.find":"Find","common.replace":"Replace","common.remoteMode":"Remote Mode","component.message.origin":"Origin","component.modal.okText":"OK","component.modal.cancelText":"Cancel","component.modal.justOkText":"OK","preference.tab.user":"User","preference.tab.workspace":"Workspace","settings.group.general":"General","settings.group.shortcut":"Shortcut","settings.group.editor":"Editor","settings.group.extension":"Extensions","settings.group.feature":"Feature","settings.group.view":"View","settings.group.terminal":"Terminal","preference.general.theme":"Theme","preference.general.icon":"File Icon Theme","preference.general.productIconTheme":"Product Icon Theme","preference.workbench.colorCustomizations":"Overwrite colors of current color theme","preference.general.language":"Language","preference.general.language.change.refresh.info":"After changing the language, it should be restarted to take effect. Will it be refreshed immediately?","preference.general.language.change.refresh.now":"Refresh","preference.general.language.change.refresh.later":"Later","preference.debug.internalConsoleOptions":"Controls when the internal debug console should open.","preference.debug.openDebug":"Controls when the debug view should open.","preference.debug.debugViewLocation":"Controls the location of the debug view.","preference.debug.trace":"Enable/disable tracing communications with debug adapters.","preference.debug.allowBreakpointsEverywhere":"Allow setting breakpoints in any file.","preference.debug.toolbar.float.title":"Run And Debug: Float Mode","preference.debug.toolbar.float":"Float mode","preference.debug.console.filter.mode":"Debug console filter mode","preference.debug.console.filter.mode.filter":"filter","preference.debug.console.filter.mode.matcher":"matcher","preference.debug.console.wordWrap":"Controls if the lines should wrap in the debug console.","preference.debug.inline.values":"Show variable values inline in editor while debugging.","preference.debug.breakpoint.editorHint":"After enabling, there will be a background color blinking prompt when clicking on the breakpoint list to jump to the editor.","preference.debug.breakpoint.showBreakpointsInOverviewRuler":"Controls whether breakpoints should be shown in the overview ruler.","preference.workbench.refactoringChanges.showPreviewStrategy":"Show preview confirm when triggering some refactoring changes","preference.workbench.refactoringChanges.showPreviewStrategy.title":"Refactor Confirm","preference.tab.name":"Settings","preference.noResults":"No Setting Found Containing '{0}'","preference.empty":"Loading Settings...","preference.editSettingsJson":"Edit in settings.json","preference.overwritten":"(Overwritten by next scope)","preference.overwrittenInUser":"(Modified in User Settings)","preference.overwrittenInWorkspace":"(Modified in Workspace Settings)","preference.searchPlaceholder":"Search Settings...","preference.editor.formatOnSave":"Enable format on manual save.","preference.editor.formatOnSaveTimeout":"Timeout in milliseconds after which the formatting that is run on file save is cancelled.","preference.editor.formatOnSaveTimeoutError":"Aborted format on save after ${0}ms","preference.editor.maxTokenizationLineLength":"Max Tokenization Line Length","preference.editor.quickSuggestionsDelay":"Quick suggestions show delay (in ms) Defaults to 10 (ms)","preference.editor.largeFile":"Large File Size","preference.editor.formatOnPaste":"Format On Paste","preference.files.eol":"EOL","preference.files.trimFinalNewlines":"Trim Final Newlines","preference.files.trimTrailingWhitespace":"Trim Trailing Whitespace","preference.files.insertFinalNewline":"Insert Final Newline","preference.editor.lineHeight":"Line Height","preference.editor.saveCodeActions":"Code Actions On Save","preference.editor.saveCodeActionsNotification":"Whether to notify when code operations run at save time","keymaps.tab.name":"Keyboard Shortcuts","preference.editor.wrapTab":"Wrap Editor Tabs","preference.editor.preferredFormatter":"Default Formatter","preference.editor.fontFamily":"Font Family","preference.editor.minimap":"minimap","preference.editor.forceReadOnly":"readOnly","preference.editor.renderLineHighlight":"Render Line Highlight","preference.editor.askIfDiff":"Error If File On Disk is newer","preference.editor.autoSave":"Editor Auto Save","preference.editor.autoSaveDelay":"Auto Save Delay","preference.editor.detectIndentation":"Auto Detect Indentation","preference.editor.bracketPairColorization.enabled":"Bracket Pair Colorization","preference.editor.fontWeight":"Font Weight","preference.editor.wordWrap":"Word Wrap","preference.editor.wordWrapColumn":"Word Wrap Length","preference.item.notValid":"{0} is not a valid option","editor.configuration.formatOnSaveTimeout":"Control the timeout time of formatting (ms). Effective Only when `#editor.formatOnSave#` enables.","editor.configuration.enablePreviewFromCodeNavigation":"Controls whether editors remain in preview when a code navigation is started from them. Preview editors do not keep open and are reused until explicitly set to be kept open (e.g. via double click or editing). This value is ignored when `#workbench.editor.enablePreview#` is disabled.","editor.configuration.wrapTab":"Controls whether to wrap editor tabs instead of scroll mode when tabs are beyond the visible area.","editor.configuration.askIfDiff":"When saving files, throw error if the file on disk has a newer version.","editor.configuration.autoSave":"Controls how dirty files are auto saved.","editor.configuration.autoSaveDelay":"Controls the delay in ms after which a dirty file is saved automatically. Only applies when `#editor.formatOnSave#` is set to 'Save After Delay'.","editor.configuration.forceReadOnly":"If Enable readOnly","editor.configuration.largeFileSize":"Custom size of the large file (B)","editor.configuration.fontFamily":"Controls the font family.","editor.configuration.fontWeight":'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.',"editor.configuration.lineDecorationsWidth":'The width reserved for line decorations (in px). Line decorations are placed between line numbers and the editor content. You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch. Defaults to 10.',"editor.configuration.lineNumbersMinChars":"Control the width of line numbers, by reserving horizontal space for rendering at least an amount of digits. Defaults to 5.","editor.configuration.wordWrapBreakBeforeCharacters":"Configure word wrapping characters. A break will be introduced before these characters. Defaults to '([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B'.","editor.configuration.wrappingStrategy":"Controls the algorithm that computes wrapping points.","editor.configuration.wordWrapBreakAfterCharacters":"Configure word wrapping characters. A break will be introduced after these characters. Defaults to ' })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63'.","editor.configuration.wordWrapMinified":"Force word wrapping when the text appears to be of a minified/generated file. Defaults to true.","editor.configuration.selectOnLineNumbers":"Should the corresponding line be selected when clicking on the line number? Defaults to true.","editor.configuration.revealHorizontalRightPadding":"When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle. This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport. Defaults to 30 (px).","editor.configuration.fixedOverflowWidgets":"Display overflow widgets as fixed.","editor.configuration.extraEditorClassName":"Class name to be added to the editor.","editor.configuration.ariaLabel":"The aria label for the editor's textarea (when it is focused).","editor.configuration.suggest.insertMode":"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.","editor.configuration.suggest.filterGraceful":"Controls whether filtering and sorting suggestions accounts for small typos.","editor.configuration.suggest.localityBonus":"Controls whether sorting favours words that appear close to the cursor.","editor.configuration.suggest.shareSuggestSelections":"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).","editor.configuration.suggest.snippetsPreventQuickSuggestions":"Controls whether an active snippet prevents quick suggestions.","editor.configuration.suggest.showIcons":"Controls whether to show or hide icons in suggestions.","editor.configuration.suggest.maxVisibleSuggestions":"Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).","editor.configuration.suggest.showMethods":"When enabled IntelliSense shows `method`-suggestions.","editor.configuration.suggest.showFunctions":"When enabled IntelliSense shows `function`-suggestions.","editor.configuration.suggest.showConstructors":"When enabled IntelliSense shows `constructor`-suggestions.","editor.configuration.suggest.showFields":"When enabled IntelliSense shows `field`-suggestions.","editor.configuration.suggest.showVariables":"When enabled IntelliSense shows `variable`-suggestions.","editor.configuration.suggest.showClasss":"When enabled IntelliSense shows `class`-suggestions.","editor.configuration.suggest.showStructs":"When enabled IntelliSense shows `struct`-suggestions.","editor.configuration.suggest.showInterfaces":"When enabled IntelliSense shows `interface`-suggestions.","editor.configuration.suggest.showModules":"When enabled IntelliSense shows `module`-suggestions.","editor.configuration.suggest.showPropertys":"When enabled IntelliSense shows `property`-suggestions.","editor.configuration.suggest.showEvents":"When enabled IntelliSense shows `event`-suggestions.","editor.configuration.suggest.showOperators":"When enabled IntelliSense shows `operator`-suggestions.","editor.configuration.suggest.showUnits":"When enabled IntelliSense shows `unit`-suggestions.","editor.configuration.suggest.showValues":"When enabled IntelliSense shows `value`-suggestions.","editor.configuration.suggest.showConstants":"When enabled IntelliSense shows `constant`-suggestions.","editor.configuration.suggest.showEnums":"When enabled IntelliSense shows `enum`-suggestions.","editor.configuration.suggest.showEnumMembers":"When enabled IntelliSense shows `enumMember`-suggestions.","editor.configuration.suggest.showKeywords":"When enabled IntelliSense shows `keyword`-suggestions.","editor.configuration.suggest.showTexts":"When enabled IntelliSense shows `text`-suggestions.","editor.configuration.suggest.showColors":"When enabled IntelliSense shows `color`-suggestions.","editor.configuration.suggest.showFiles":"When enabled IntelliSense shows `file`-suggestions.","editor.configuration.suggest.showReferences":"When enabled IntelliSense shows `reference`-suggestions.","editor.configuration.suggest.showCustomcolors":"When enabled IntelliSense shows `customcolor`-suggestions.","editor.configuration.suggest.showFolders":"When enabled IntelliSense shows `folder`-suggestions.","editor.configuration.suggest.showTypeParameters":"When enabled IntelliSense shows `typeParameter`-suggestions.","editor.configuration.suggest.showSnippets":"When enabled IntelliSense shows `snippet`-suggestions.","editor.configuration.suggest.showUsers":"When enabled IntelliSense shows `user`-suggestions.","editor.configuration.suggest.showIssues":"When enabled IntelliSense shows `issues`-suggestions.","editor.configuration.suggest.statusBar.visible":"Controls the visibility of the status bar at the bottom of the suggest widget.","editor.configuration.suggest.preview":"Enable or disable the rendering of the suggestion preview.","editor.configuration.suggest.details.visible":"Controls whether editor code completion expands details by default","editor.configuration.inlineSuggest.enabled":"Enable or disable the rendering of automatic inline completions.","editor.configuration.inlineSuggest.showToolbar":"Controls when to show the inline suggestion toolbar.","editor.configuration.inlineSuggest.showToolbar.always":"Show the inline suggestion toolbar whenever an inline suggestion is shown.","editor.configuration.inlineSuggest.showToolbar.onHover":"Show the inline suggestion toolbar when hovering over an inline suggestion.","editor.configuration.inlineSuggest.showToolbar.never":"Never show the inline suggestion toolbar.","editor.configuration.hover.enabled":"Controls whether the hover is shown.","editor.configuration.hover.delay":"Controls the delay in milliseconds after which the hover is shown.","editor.configuration.hover.sticky":"Controls whether the hover should remain visible when mouse is moved over it.","editor.configuration.hover.hidingDelay":"Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be.","editor.configuration.hover.above":"Prefer showing hovers above the line, if there's space.","editor.configuration.experimental.stickyScroll":"Shows the nested current scopes during the scroll at the top of the editor.","editor.configuration.customCodeActionMenu.showHeaders":"Enabling this will show the code action menu with group headers, if the custom code action menu is enabled.","editor.configuration.useCustomCodeActionMenu":"Enabling this adjusts how the code action menu is rendered.","editor.configuration.letterSpacing":"Controls the letter spacing in pixels.","editor.configuration.lineNumbers":"Controls the display of line numbers.","editor.configuration.lineNumbers.off":"Line numbers are not rendered.","editor.configuration.lineNumbers.on":"Line numbers are rendered as absolute number.","editor.configuration.lineNumbers.relative":"Line numbers are rendered as distance in lines to cursor position.","editor.configuration.lineNumbers.interval":"Line numbers are rendered every 10 lines.","editor.configuration.renderFinalNewline":"Render last line number when the file ends with a newline.","editor.configuration.rulers":"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.","editor.configuration.wordSeparators":"Characters that will be used as word separators when doing word related navigations or operations.","editor.configuration.tabSize":"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.","editor.configuration.insertSpaces":"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.","editor.configuration.detectIndentation":"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.","editor.configuration.roundedSelection":"Controls whether selections should have rounded corners.","editor.configuration.scrollBeyondLastLine":"Controls whether the editor will scroll beyond the last line.","editor.configuration.scrollBeyondLastColumn":"Controls the number of extra characters beyond which the editor will scroll horizontally.","editor.configuration.smoothScrolling":"Controls whether the editor will scroll using an animation.","editor.configuration.minimap.enabled":"Controls whether the minimap is shown.","editor.configuration.minimap.side":"Controls the side where to render the minimap.","editor.configuration.minimap.showSlider":"Controls whether the minimap slider is automatically hidden.","editor.configuration.minimap.renderCharacters":"Render the actual characters on a line as opposed to color blocks.","editor.configuration.minimap.maxColumn":"Limit the width of the minimap to render at most a certain number of columns.","editor.configuration.find.seedSearchStringFromSelection":"Controls whether the search string in the Find Widget is seeded from the editor selection.","editor.configuration.find.autoFindInSelection":"Controls whether the find operation is carried out on selected text or the entire file in the editor.","editor.configuration.find.globalFindClipboard":"Controls whether the Find Widget should read or modify the shared find clipboard on macOS.","editor.configuration.find.addExtraSpaceOnTop":"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.","editor.configuration.wordWrap.off":"Lines will never wrap.","editor.configuration.wordWrap.on":"Lines will wrap at the viewport width.","editor.configuration.wordWrap.wordWrapColumn":"Lines will wrap at `#editor.wordWrapColumn#`.","editor.configuration.wordWrap.bounded":"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.","editor.configuration.wordWrap":"Controls how lines should wrap.","editor.configuration.wordWrapColumn":"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.","editor.configuration.wrappingIndent.none":"No indentation. Wrapped lines begin at column 1.","editor.configuration.wrappingIndent.same":"Wrapped lines get the same indentation as the parent.","editor.configuration.wrappingIndent.indent":"Wrapped lines get +1 indentation toward the parent.","editor.configuration.wrappingIndent.deepIndent":"Wrapped lines get +2 indentation toward the parent.","editor.configuration.wrappingIndent":"Controls the indentation of wrapped lines.","editor.configuration.mouseWheelScrollSensitivity":"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.","editor.configuration.fastScrollSensitivity":"Scrolling speed multiplier when pressing `Alt`.","editor.configuration.multiCursorModifier.ctrlCmd":"Maps to `Control` on Windows and Linux and to `Command` on macOS.","editor.configuration.multiCursorModifier.alt":"Maps to `Alt` on Windows and Linux and to `Option` on macOS.","editor.configuration.multiCursorMergeOverlapping":"Merge multiple cursors when they are overlapping.","editor.configuration.quickSuggestions.strings":"Enable quick suggestions inside strings.","editor.configuration.quickSuggestions.comments":"Enable quick suggestions inside comments.","editor.configuration.quickSuggestions.other":"Enable quick suggestions outside of strings and comments.","editor.configuration.quickSuggestions":"Controls whether suggestions should automatically show up while typing.","editor.configuration.quickSuggestionsDelay":"Controls the delay in milliseconds after which quick suggestions will show up.","editor.configuration.parameterHints.enabled":"Enables a pop-up that shows parameter documentation and type information as you type.","editor.configuration.parameterHints.cycle":"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.","editor.configuration.autoClosingBrackets.languageDefined":"Use language configurations to determine when to autoclose brackets.","editor.configuration.autoClosingBrackets.beforeWhitespace":"Autoclose brackets only when the cursor is to the left of whitespace.","editor.configuration.autoClosingBrackets":"Controls whether the editor should automatically close brackets after the user adds an opening bracket.","editor.configuration.autoClosingQuotes.languageDefined":"Use language configurations to determine when to autoclose quotes.","editor.configuration.autoClosingQuotes.beforeWhitespace":"Autoclose quotes only when the cursor is to the left of whitespace.","editor.configuration.autoClosingQuotes":"Controls whether the editor should automatically close quotes after the user adds an opening quote.","editor.configuration.autoSurround.languageDefined":"Use language configurations to determine when to automatically surround selections.","editor.configuration.autoSurround.brackets":"Surround with brackets but not quotes.","editor.configuration.autoSurround.quotes":"Surround with quotes but not brackets.","editor.configuration.autoSurround":"Controls whether the editor should automatically surround selections.","editor.configuration.formatOnType":"Controls whether the editor should automatically format the line after typing.","editor.configuration.formatOnPaste":"Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.","editor.configuration.autoIndent":"Controls whether the editor should automatically adjust the indentation when users type, paste or move lines. Extensions with indentation rules of the language must be available.","editor.configuration.suggestOnTriggerCharacters":"Controls whether suggestions should automatically show up when typing trigger characters.","editor.configuration.acceptSuggestionOnEnterSmart":"Only accept a suggestion with `Enter` when it makes a textual change.","editor.configuration.acceptSuggestionOnEnter":"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.","editor.configuration.acceptSuggestionOnCommitCharacter":"Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.","editor.configuration.snippetSuggestions.top":"Show snippet suggestions on top of other suggestions.","editor.configuration.snippetSuggestions.bottom":"Show snippet suggestions below other suggestions.","editor.configuration.snippetSuggestions.inline":"Show snippets suggestions with other suggestions.","editor.configuration.snippetSuggestions.none":"Do not show snippet suggestions.","editor.configuration.snippetSuggestions":"Controls whether snippets are shown with other suggestions and how they are sorted.","editor.configuration.emptySelectionClipboard":"Controls whether copying without a selection copies the current line.","editor.configuration.copyWithSyntaxHighlighting":"Controls whether syntax highlighting should be copied into the clipboard.","editor.configuration.wordBasedSuggestions":"Controls whether completions should be computed based on words in the document.","editor.configuration.suggestSelection.first":"Always select the first suggestion.","editor.configuration.suggestSelection.recentlyUsed":"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.","editor.configuration.suggestSelection.recentlyUsedByPrefix":"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.","editor.configuration.suggestSelection":"Controls how suggestions are pre-selected when showing the suggest list.","editor.configuration.suggestFontSize":"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.","editor.configuration.suggestLineHeight":"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.","editor.configuration.tabCompletion.on":"Tab complete will insert the best matching suggestion when pressing tab.","editor.configuration.tabCompletion.off":"Disable tab completions.","editor.configuration.tabCompletion.onlySnippets":"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.","editor.configuration.tabCompletion":"Enables tab completions.","editor.configuration.suggest.filtered":"Controls whether some suggestion types should be filtered from IntelliSense. A list of suggestion types can be found here: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions.","editor.configuration.suggest.filtered.method":"When set to `false` IntelliSense never shows `method` suggestions.","editor.configuration.suggest.filtered.function":"When set to `false` IntelliSense never shows `function` suggestions.","editor.configuration.suggest.filtered.constructor":"When set to `false` IntelliSense never shows `constructor` suggestions.","editor.configuration.suggest.filtered.field":"When set to `false` IntelliSense never shows `field` suggestions.","editor.configuration.suggest.filtered.variable":"When set to `false` IntelliSense never shows `variable` suggestions.","editor.configuration.suggest.filtered.class":"When set to `false` IntelliSense never shows `class` suggestions.","editor.configuration.suggest.filtered.struct":"When set to `false` IntelliSense never shows `struct` suggestions.","editor.configuration.suggest.filtered.interface":"When set to `false` IntelliSense never shows `interface` suggestions.","editor.configuration.suggest.filtered.module":"When set to `false` IntelliSense never shows `module` suggestions.","editor.configuration.suggest.filtered.property":"When set to `false` IntelliSense never shows `property` suggestions.","editor.configuration.suggest.filtered.event":"When set to `false` IntelliSense never shows `event` suggestions.","editor.configuration.suggest.filtered.operator":"When set to `false` IntelliSense never shows `operator` suggestions.","editor.configuration.suggest.filtered.unit":"When set to `false` IntelliSense never shows `unit` suggestions.","editor.configuration.suggest.filtered.value":"When set to `false` IntelliSense never shows `value` suggestions.","editor.configuration.suggest.filtered.constant":"When set to `false` IntelliSense never shows `constant` suggestions.","editor.configuration.suggest.filtered.enum":"When set to `false` IntelliSense never shows `enum` suggestions.","editor.configuration.suggest.filtered.enumMember":"When set to `false` IntelliSense never shows `enumMember` suggestions.","editor.configuration.suggest.filtered.keyword":"When set to `false` IntelliSense never shows `keyword` suggestions.","editor.configuration.suggest.filtered.text":"When set to `false` IntelliSense never shows `text` suggestions.","editor.configuration.suggest.filtered.color":"When set to `false` IntelliSense never shows `color` suggestions.","editor.configuration.suggest.filtered.file":"When set to `false` IntelliSense never shows `file` suggestions.","editor.configuration.suggest.filtered.reference":"When set to `false` IntelliSense never shows `reference` suggestions.","editor.configuration.suggest.filtered.customcolor":"When set to `false` IntelliSense never shows `customcolor` suggestions.","editor.configuration.suggest.filtered.folder":"When set to `false` IntelliSense never shows `folder` suggestions.","editor.configuration.suggest.filtered.typeParameter":"When set to `false` IntelliSense never shows `typeParameter` suggestions.","editor.configuration.suggest.filtered.snippet":"When set to `false` IntelliSense never shows `snippet` suggestions.","editor.configuration.editor.gotoLocation.multiple":"Controls the behavior of 'Go To' commands, like Go To Definition, when multiple target locations exist.","editor.configuration.gotoLocation.multiple.peek":"Show peek view of the results (default)","editor.configuration.gotoLocation.multiple.gotoAndPeek":"Go to the primary result and show a peek view","editor.configuration.gotoLocation.multiple.goto":"Go to the primary result and enable peek-less navigation to others","editor.configuration.selectionHighlight":"Controls whether the editor should highlight matches similar to the selection.","editor.configuration.occurrencesHighlight":"Controls whether the editor should highlight semantic symbol occurrences.","editor.configuration.overviewRulerLanes":"Controls the number of decorations that can show up at the same position in the overview ruler.","editor.configuration.overviewRulerBorder":"Controls whether a border should be drawn around the overview ruler.","editor.configuration.cursorBlinking":"Control the cursor animation style.","editor.configuration.mouseWheelZoom":"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.","editor.configuration.cursorSmoothCaretAnimation":"Controls whether the smooth caret animation should be enabled.","editor.configuration.cursorStyle":"Controls the cursor style.","editor.configuration.cursorWidth":"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.","editor.configuration.fontLigatures":"Enables/Disables font ligatures.","editor.configuration.hideCursorInOverviewRuler":"Controls whether the cursor should be hidden in the overview ruler.","editor.configuration.renderWhitespace.boundary":"Render whitespace characters except for single spaces between words.","editor.configuration.renderWhitespace.selection":"Render whitespace characters only on selected text.","editor.configuration.renderWhitespace":"Controls how the editor should render whitespace characters.","editor.configuration.rename.enablePreview":"Enable/disable the ability to preview changes before renaming","editor.configuration.renderControlCharacters":"Controls whether the editor should render control characters.","editor.configuration.guides.indentation":"Controls whether the editor should render indent guides.","editor.configuration.guides.highlightActiveIndentation":"Controls whether the editor should highlight the active indent guide.","editor.configuration.guides.bracketPairs":"Controls whether bracket pair guides are enabled or not.","editor.configuration.renderLineHighlight.all":"Highlights both the gutter and the current line.","editor.configuration.renderLineHighlight":"Controls how the editor should render the current line highlight.","editor.configuration.codeLens":"Controls whether the editor shows CodeLens.","editor.configuration.folding":"Controls whether the editor has code folding enabled.","editor.configuration.foldingStrategy":"Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.","editor.configuration.showFoldingControls":"Controls whether the fold controls on the gutter are automatically hidden.","editor.configuration.matchBrackets":"Highlight matching brackets when one of them is selected.","editor.configuration.glyphMargin":"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.","editor.configuration.useTabStops":"Inserting and deleting whitespace follows tab stops.","editor.configuration.trimAutoWhitespace":"Remove trailing auto inserted whitespace.","editor.configuration.stablePeek":"Keep peek editors open even when double clicking their content or when hitting `Escape`.","editor.configuration.dragAndDrop":"Controls whether the editor should allow moving selections via drag and drop.","editor.configuration.accessibilitySupport.auto":"The editor will use platform APIs to detect when a Screen Reader is attached.","editor.configuration.accessibilitySupport.on":"The editor will be permanently optimized for usage with a Screen Reader.","editor.configuration.accessibilitySupport.off":"The editor will never be optimized for usage with a Screen Reader.","editor.configuration.accessibilitySupport":"Controls whether the editor should run in a mode where it is optimized for screen readers.","editor.configuration.showUnused":"Controls fading out of unused code.","editor.configuration.comments.insertSpace":"Insert a space after the line comment token and inside the block comments tokens.","editor.configuration.comments.ignoreEmptyLines":"Ignore empty lines when inserting line comments.","editor.configuration.links":"Controls whether the editor should detect links and make them clickable.","editor.configuration.colorDecorators":"Controls whether the editor should render the inline color decorators and color picker.","editor.configuration.lightbulb.enabled":"Enables the code action lightbulb in the editor.","editor.configuration.lightbulb.enabled.off":"Disable the code action menu.","editor.configuration.lightbulb.enabled.onCode":"Show the code action menu when the cursor is on lines with code.","editor.configuration.lightbulb.enabled.on":"Show the code action menu when the cursor is on lines with code or on empty lines.","editor.configuration.maxTokenizationLineLength":"Lines above this length will not be tokenized for performance reasons","editor.configuration.codeActionsOnSave.organizeImports":"Controls whether organize imports action should be run on file save.","editor.configuration.codeActionsOnSave.fixAll":"Controls whether auto fix action should be run on file save.","editor.configuration.codeActionsOnSave":"Code action kinds to be run on save.","editor.configuration.codeActionsOnSaveTimeout":"Timeout in milliseconds after which the code actions that are run on save are cancelled.","editor.configuration.codeActionsOnSaveNotification":"Whether to notify when code operations run at save time.","editor.configuration.selectionClipboard":"Controls whether the Linux primary clipboard should be supported.","editor.configuration.largeFileOptimizations":"Special handling for large files to disable certain memory intensive features.","editor.configuration.renderIndicators":"Controls whether the diff editor shows +/- indicators for added/removed changes.","editor.configuration.defaultFormatter":"Default code formatter","editor.configuration.tokenColorCustomizations":"Overwrite token colors of current color theme","editor.configuration.semanticHighlighting.enabled":"Controls whether the semanticHighlighting is shown for the languages that support it.","editor.configuration.semanticHighlighting.true":"Semantic highlighting enabled for all color themes.","editor.configuration.semanticHighlighting.false":"Semantic highlighting disabled for all color themes.","editor.configuration.semanticHighlighting.configuredByTheme":"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.","editor.configuration.experimental.stickyScroll.enabled":"Shows the nested current scopes during the scroll at the top of the editor.","editor.configuration.previewMode":"Enable Preview Mode","editor.configuration.workbench.editorAssociations":'Configure glob patterns to editors (e.g. `"*.hex": "hexEditor.hexEdit"`). These have precedence over the default behavior.',"editor.configuration.preferredFormatter":"Preferred formatter for files","editor.configuration.bracketPairColorization.enabled":"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.","editor.configuration.mouseBackForwardToNavigate":"Enables the use of mouse buttons four and five for commands 'Go Back' and 'Go Forward'.","editor.configuration.suggest.insertMode.insert":"Insert suggestion without overwriting text right of the cursor.","editor.configuration.suggest.insertMode.replace":"Insert suggestion and overwrite text right of the cursor.","editor.configuration.unicodeHighlight.ambiguousCharacters":"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.","diffEditor.configuration.renderSideBySide":"Controls whether the diff editor shows the diff side by side or inline.","diffEditor.configuration.ignoreTrimWhitespace":"Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.","diffEditor.action.toggleCollapseUnchangedRegions":"Toggle Collapse Unchanged Regions","editor.largeFile.prevent":"The file is too large, continuing to open it may cause lag or crash.","editor.autoSave.enum.off":"OFF","editor.autoSave.enum.editorFocusChange":"When editor focus changed","editor.autoSave.enum.afterDelay":"Save after delay","editor.autoSave.enum.windowLostFocus":"When window lost focus","editor.file.prevent.stillOpen":"Open Anyway","editor.workspaceSymbol.quickopen":"Search Workspace Symbol","editor.workspaceSymbolClass.quickopen":"Search Workspace Class Symbol","editor.workspaceSymbol.description":"Go to Symbol in Workspace","editor.workspaceSymbol.search":"Type to search for symbols","editor.workspaceSymbolClass.search":"Type to search for class symbols","editor.workspaceSymbol.notfound":"No symbols matching","editor.workspaceSymbolClass.notfound":"No class symbols matching","preference.diffEditor.renderSideBySide":"Render Side By Side","preference.diffEditor.ignoreTrimWhitespace":"Ignore Trim Whitespace","preference.mergeEditor.autoApplyNonConflictChanges":"Automatically apply non-conflicting changes","validate.tree.emptyFileNameError":"Please provide a file or folder name","validate.tree.fileNameStartsWithSlashError":"File or folder name cannot start with /","validate.tree.fileNameFollowOrStartWithSpaceWarning":"Leading or trailing spaces detected in file or folder name","validate.tree.fileNameExistsError":"File or folder **{0}** already exists. Please use a different name.","validate.tree.invalidFileNameError":"The name **{0}** is not available. Please use a different name.","editor.close.all":"Close All Editors","opened.editors.title":"OPENED EDITORS","opened.editors.save.all":"Save All","opened.editors.close.all":"Close All","opened.editors.close.byGroup":"Close files in the group","opened.editors.save.byGroup":"Save files in the group","opened.editors.empty":"No file is open in the editor","opened.editors.group.title":"GROUP {0}","opened.editors.open":"Open","opened.editors.openToTheSide":"Open To The Side","opened.editors.compare":"Compare With Current File","opened.editors.copyRelativePath":"Copy Relative Path","opened.editors.copyPath":"Copy Path","opened.editors.unsaved":"{0} unsaved","terminal.name":"Terminal","terminal.disconnected":"Terminal Already Disconnected","terminal.can.not.create":"Create Terminal Failed","terminal.can.not.reconnect":"Terminal Unavailable, Please","terminal.stop":"Stop The Terminal","terminal.try.reconnect":"Try To Reconnect The Terminal","terminal.try.recreate":"Try To Recreate The Terminal","terminal.new":"Create Terminal","terminal.new.type":"Create terminal by type","terminal.split":"Split Terminal","terminal.clear":"Remove All Terminals","terminal.clear.content":"Clear All Contents","terminal.independ":"Independent Terminal","terminal.maximum":"Maximum Terminal Panel","terminal.or":"Or","terminal.search":"Search","terminal.search.next":"Search Next","terminal.openWithPath":"Open In Integrated Terminal","terminal.remove":"Kill terminal","terminal.menu.search":"Search","terminal.menu.split":"Split","terminal.menu.rename":"Rename","terminal.menu.selectAll":"Select All","terminal.menu.copy":"Copy","terminal.menu.paste":"Paste","terminal.menu.clear":"Clear","terminal.menu.stop":"Stop","terminal.menu.stopGroup":"Stop Group","terminal.menu.clearGroups":"Clear All Terminals","terminal.menu.selectType":"Default Terminal Type","terminal.menu.moreSettings":"More Settings","terminal.menu.clearCurrentContent":"Clear","terminal.menu.selectCurrentContent":"Select All","terminal.menu.clearAllContents":"Clear All Terminals Content","terminal.menu.selectAllContent":"Select All Terminals Content","terminal.environment.changed":"Extensions have made changes to this terminal's environment","terminal.environment.changes":"Extensions want to make the following changes to the terminal's environment:","terminal.environment.removal":"Extensions want to remove these existing changes from the terminal's environment:","terminal.launchFail.cwdNotDirectory":'Starting directory (cwd) "{0}" is not a directory',"terminal.launchFail.cwdDoesNotExist":'Starting directory (cwd) "{0}" does not exist',"terminal.launchFail.executableIsNotFileOrSymlink":'Path to shell executable "{0}" is not a file or a symlink',"terminal.launchFail.executableDoesNotExist":'Path to shell executable "{0}" does not exist',"terminal.openFile":"Open file in editor","terminal.focusFolder":"Focus folder in explorer","terminal.openFolder":"Open folder in new window","terminal.relaunch":"Relaunch Terminal","terminal.toggleTerminal":"Toggle Terminal","terminal.killProcess":"Kill Process","terminal.process.unHealthy":"*This terminal session has been timed out and killed by the system. Please open a new terminal session to proceed with operations.","terminal.selectCWDForNewTerminal":"Select current working directory for new terminal","terminal.focusNext.inTerminalGroup":"Terminal: Focus Next Terminal in Terminal Group","terminal.focusPrevious.inTerminalGroup":"Terminal: Focus Previous Terminal in Terminal Group","terminal.ai.requesting":"AI Requesting...","terminal.ai.selectHint":"Use keyboard \u2191\u2193 to select a command, \u23CE to confirm command","terminal.ai.thinking":"AI Thinking...","terminal.ai.escClose":"Press ESC to close the dialog","terminal.ai.headerHint":"Use AI to get terminal input suggestions","terminal.ai.inputHint":"Eg. show current process pid","terminal.ai.inputSharpToGetHint":"Type # for AI Suggestions","terminal.ai.cannotGetTerminalConnection":"Cannot establish terminal connection, please provide feedback in the user group","view.command.show":"Show {0}","layout.tabbar.setting":"Open Preference Panel","debugger.menu.setValue":"Set Value","debugger.menu.setValue.param":"Please input the value of this variable","debugger.menu.copyValue":"Copy Value","debugger.menu.copyEvaluatePath":"Copy as Expression","debugger.menu.addToWatchExpressions":"Add to Watch","debugger.menu.restartFrame":"Restart Frame","debugger.menu.copyCallstack":"Copy Call Stack","theme.toggle":"Color Theme","theme.icon.toggle":"File Icon Theme","theme.productIcon.toggle":"Product Icon Theme","theme.base.vs":"Light Theme","theme.base.vs-dark":"Dark Theme","theme.base.hc":"High Contrast Themes","theme.current":"Current","theme.quickopen.plh":"Select Color Theme\uFF08Up/Down Keys to Preview\uFF09","theme.icon.quickopen.plh":"Select Icon Theme\uFF08Up/Down Keys to Preview\uFF09","theme.productIcon.quickopen.plh":"Select Product Icon Theme\uFF08Up/Down Keys to Preview\uFF09","preference.workbench.list.openMode":"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable.","preference.workbench.list.openMode.title":"Tree/List open mode","keymaps.search.placeholder":"Type to search in keybindings","keymaps.search.keyboard.placeholder":"Type to search in keybindings","keymaps.header.command.title":"Command","keymaps.header.source.title":"Source","keymaps.header.keybinding.title":"Keybinding","keymaps.header.when.title":"When","keymaps.source.default":"DEFAULT","keymaps.source.user":"USER","keymaps.source.workspace":"WORKSPACE","keymaps.keybinding.full.collide":'Contains conflict between this shortcut and "{0}" command, please reset',"keymaps.keybinding.partial.collide":'Contains conflict between this shortcut and "{0}" command, please reset',"keymaps.keybinding.shadow.collide":'Contains conflict between this shortcut and "{0}" command, please reset',"keymaps.keybinding.duplicate":"This shortcut is bound to the following {0} commands:","keymaps.keybinding.loading":"Setting keymaps ...","keymaps.keybinding.success":"Setting keymaps success","keymaps.keybinding.fail":"Setting keymaps fail","keymaps.keybinding.require":"keybinding value is required","keymaps.action.edit":"Edit","keymaps.action.add":"Add","keymaps.action.reset":"Reset","keymaps.action.clear":"Clear","keymaps.edit.placeholder":"Press Enter to save","keymaps.editorTitle.openSource":"Open Keymap ShortCut(JSON)","keymaps.editorTitle.openKeymap":"Open Keymap ShortCut","keymaps.commandId.title":"Command ID: {0}","keybinding.combination.tip":"({0}) was pressed, waiting for more keys","layout.tabbar.toggle":"Toggle Bottom Panel","layout.tabbar.expand":"Maximize Bottom Panel","layout.tabbar.retract":"Retract Bottom Panel","layout.view.hide":"HIDE","layout.action.openView":"Open View ...","layout.openView.containerTitle":"SideBar / Panel","layout.openView.viewTitle":"{0} / View","marketplace.extension.update.now":"Update now","marketplace.extension.update.delay":"Update later","marketplace.extension.uninstall.failed":"Failed to uninstall","marketplace.extension.uninstall.failed.depended":'Cannot uninstall extension "{0}". Extension "{1}" depends on this.',"marketplace.extension.disabled.failed.depended":'Cannot disable extension "{0}". Extension "{1}" depends on this.',"marketplace.extension.reload.delay":"Restart later","marketplace.extension.reload.now":"Restart now","marketplace.extension.builtin":"Builtin","marketplace.extension.development":"Develop","marketplace.extension.enable":"Enable","marketplace.extension.disable":"Disable","marketplace.extension.enable.workspace":"Enable(workspace)","marketplace.extension.disable.workspace":"Disable(workspace)","marketplace.extension.enable.all":"Enable All Extensions","marketplace.extension.disable.all":"Disable All Extensions","marketplace.extension.install":"Install","marketplace.extension.container":"Extensions","marketplace.extension.empty.disabled":"No disabled extensions yet","marketplace.extension.notfound":"No Extension","marketplace.panel.hot":"Hot Extensions","marketplace.panel.search":"Search","marketplace.panel.enabled":"Enabled","marketplace.panel.disabled":"Disabled","marketplace.panel.tab.marketplace":"Marketplace","marketplace.panel.tab.placeholder.search":"Search from marketplace","marketplace.tab.installed":"Installed","marketplace.panel.tab.placeholder.installed":"Search from installed","marketplace.extension.findUpdate":"Find Extension {0} has new version {1}\uFF0CDo you want to update\uFF1F","marketplace.extension.updateAll":"Find multiple extensions that can be updated. Do you want to update all?","marketplace.extension.needreloadFromAll":"All extensions are updated and will take effect after reload window. Do you want to reload window now?","marketplace.extension.needreload":"Updating extension {0} is completed. Do you want to reload window now?","marketplace.extension.canupdate":"Can update","marketplace.extension.updating":"Updating","marketplace.extension.update":"Update","marketplace.extension.installing":"Installing","marketplace.extension.reloadrequire":"Require reload","marketplace.extension.uninstalling":"Uninstalling","marketplace.extension.uninstall":"Uninstall","marketplace.extension.uninstalled":"Uninstalled","marketplace.extension.readme":"Readme","marketplace.extension.changelog":"Changelog","marketplace.extension.dependencies":"Dependencies","marketplace.extension.otherVersion":"Install Other Version","marketplace.extension.currentVersion":"Current Version","marketplace.extension.installed":"Installed","marketplace.quickopen.install":"Install Extension","marketplace.quickopen.install.byReleaseId":"Install Extension (ReleaseId)","marketplace.quickopen.install.releaseId":"Extension ReleaseId","marketplace.quickopen.install.releaseId.required":"Extension Release ID is required","marketplace.quickopen.install.id":"Extension ID","marketplace.quickopen.install.id.required":"Extension ID is required","marketplace.quickopen.install.version.required":"Extension version is require","marketplace.quickopen.install.version.placeholder":"Extension version","marketplace.quickopen.install.error":"Install Extension has error",saveChangesMessage:"Do you want to save the changes you made to {0}?",saveNFilesChangesMessage:`Do you want to save these changes you made to {0} files?
@@ -28543,8 +28563,8 @@ Run with Automatic Debug Configurations
28543
28563
  {1}
28544
28564
 
28545
28565
  Sign out of these features?`,"authentication.signOutMessageSimple":"Sign out of {0}?","authentication.useOtherAccount":"Sign in to another account","authentication.selectAccount":"The extension '{0}' wants to access a {1} account","authentication.getSessionPlaceholder":"Select an account for '{0}' to use or Esc to cancel","authentication.confirmAuthenticationAccess":"The extension '{0}' wants to access the {1} account '{2}'.","authentication.confirmLogin":"The extension '{0}' wants to sign in using {1}.","authentication.confirmReLogin":"The extension '{0}' wants to sign in again using {1}.","authentication.signInRequests":"Sign in to use {0} (1)","authentication.signOut":"Sign out {0}","authentication.noAccounts":"You are not signed in to any accounts","authentication.signedOut":"Successfully signed out.","refactoring-changes.ask.1.create":"Extension '{0}' wants to make refactoring changes with this file creation","refactoring-changes.ask.1.copy":"Extension '{0}' wants to make refactoring changes with this file copy","refactoring-changes.ask.1.move":"Extension '{0}' wants to make refactoring changes with this file move","refactoring-changes.ask.1.delete":"Extension '{0}' wants to make refactoring changes with this file deletion","refactoring-changes.ask.N.create":"{0} extensions want to make refactoring changes with this file creation","refactoring-changes.ask.N.copy":"{0} extensions want to make refactoring changes with this file copy","refactoring-changes.ask.N.move":"{0} extensions want to make refactoring changes with this file move","refactoring-changes.ask.N.delete":"{0} extensions want to make refactoring changes with this file deletion","refactoring-changes.msg.showPreview":"Show Preview","refactoring-changes.msg.skipChanges":"Skip Changes","keyboard.chooseKeyboardLayout":"Choose keyboard layout","keyboard.autoDetect.label":"Auto Detect","keyboard.autoDetect.description":"(Current: '{0} ')","keyboard.autoDetect.detail":"Try to detect the keyboard layout from browser information and pressed keys.","editor.toggleWordWrap":"Toggle Word Wrap","editor.suggest.details.visible":"Controls whether editor code completion expands details by default","view.component.renderedError":"View Component Rendering Exception","view.component.tryAgain":"Refresh","test.title":"Testing","test.result.runFinished":"Test run at {0}","test.task.unnamed":"Unnamed Task","test.results":"Test Results","menu.missing.command":"menuId {0} register command not exist: {1}","menu.missing.altCommand":"menuId {0} register altCommand not exist: {1}","menu.dupe.command":"menuId {0} register command({1}) is duplicated with alt({2})","command.category.developerTools":"Developer Tool","connection.start.rtt":"Measure Connection RTT","connection.stop.rtt":"Stop Connection RTT","debug.terminal.label":"Javascript Debug Terminal","debug.terminal.title":"Debug Process","output.channel.clear":"Clear Output Panel","workbench.action.tasks.runTask":"Run Task","workbench.action.tasks.reRunTask":"Rerun Last Task","workbench.action.tasks.restartTask":"Restart Running Task","workbench.action.tasks.terminate":"Terminate Task","workbench.action.tasks.showTasks":"Show Running Tasks","workbench.action.tasks.showLog":"Show Task Log","task.contribute":"Contribute","task.cannotFindTask":"Cannot find task for {0}. Press Enter key to return.","comment.reply.count":"{0} comments","comment.reply.lastReply":"Last reply from {0}","walkthroughs.welcome":"Welcome","walkthroughs.get.started":"Open the 'Getting Started' walkthrough","mergeEditor.reset":"Reset","mergeEditor.workbench.tab.name":"Merging: {0}","mergeEditor.conflict.action.apply.confirm.title":"The file has unresolved conflicts or changes, whether to apply and save the changes?","mergeEditor.conflict.action.apply.confirm.continue":"Continue Merge","mergeEditor.conflict.action.apply.confirm.complete":"Apply Changes","mergeEditor.action.button.apply":"Apply","mergeEditor.action.button.apply-and-stash":"Apply and Stash","mergeEditor.action.button.accept.left":"Accept Left","mergeEditor.action.button.accept.right":"Accept Right","mergeEditor.open.3way":"3-Way Editor","mergeEditor.conflict.prev":"Previous Conflict","mergeEditor.conflict.next":"Next Conflict","mergeEditor.conflict.ai.resolve.all":"AI Resolution","mergeEditor.conflict.ai.resolve.all.stop":"Stop All","mergeEditor.open.tradition":"Text Editor","aiNative.chat.ai.assistant.name":"AI Assistant","aiNative.chat.input.placeholder.default":"Ask Copilot or type / for commands","aiNative.chat.stop.immediately":"I don\u2019t think about it anymore. If you need anything, you can ask me anytime.","aiNative.chat.error.response":"There are too many people interacting with me at the moment. Please try again later. Thank you for your understanding and support.","aiNative.chat.code.insert":"Insert code","aiNative.chat.code.copy":"Copy code","aiNative.chat.code.copy.success":"Copied successfully","aiNative.chat.expand.unfullscreen":"unfullscreen","aiNative.chat.expand.fullescreen":"fullescreen","aiNative.chat.enter.send":"Send (Enter)","aiNative.inline.chat.operate.check.title":"Check","aiNative.inline.chat.operate.thumbsup.title":"Thumbs up","aiNative.inline.chat.operate.thumbsdown.title":"Thumbs down","aiNative.inline.chat.operate.loading.cancel":"Esc to cancel","aiNative.inline.chat.input.placeholder.default":"New code instructions...(\u2191\u2193 for history)","aiNative.inline.hint.widget.placeholder":"{0} to inline chat","aiNative.inline.problem.fix.title":"Fix with AI","aiNative.inline.diff.accept":"Accept","aiNative.inline.diff.reject":"Reject","aiNative.resolve.conflict.dialog.afresh":"Are you sure you want to regenerate?","aiNative.resolve.conflict.dialog.detection":`It is detected that you have made modifications. Regeneration will overwrite
28546
- your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.message.not.processed.yet":"AI has processed conflicts at {0}, but conflicts at {1} have not yet been processed (still marked as yellow) and require manual processing.","aiNative.operate.discard.title":"Discard","aiNative.operate.afresh.title":"Afresh","aiNative.operate.stop.title":"Stop","aiNative.operate.close.title":"Close","aiNative.operate.clear.title":"Clear","aiNative.chat.welcome.loading.text":"Initializing...","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"Interface Quick Navigation","preference.ai.native.interface.quick.navigation":"Click the icon on the left side of the editor to quickly jump to the interface implementation.","preference.ai.native.interface.quick.navigation.hover":"Go to implementation","preference.ai.native.inlineChat.auto.visible":"Does Inline Chat automatically appear when code are selected?","preference.ai.native.inlineChat.codeAction.enabled":"Does Inline Chat related code actions automatically appear when code are selected?","preference.ai.native.chat.visible.type":"Control how the chat panel is displayed by default","preference.ai.native.inlineDiff.preview.mode":"Inline Diff preview mode","preference.ai.native.inlineDiff.preview.mode.sideBySide":"Displayed in the editor as left and right diff panels","preference.ai.native.inlineDiff.preview.mode.inlineLive":"Displayed in the editor through streaming rendering","preference.ai.native.intelligentCompletions.title":"Intelligent Completions","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"Whether to enable prompt engineering, some LLM models may not perform well on prompt engineering.","preference.ai.native.intelligentCompletions.debounceTime":"Debounce time for intelligent completions","preference.ai.native.intelligentCompletions.cache.enabled":"Whether to enable cache for intelligent completions","preference.ai.native.intelligentCompletions.alwaysVisible":"Whether to always show intelligent completions","preference.ai.native.codeEdits.title":"Code Edits","preference.ai.native.codeEdits.lintErrors":"Whether to trigger intelligent rewriting when Lint Error occurs","preference.ai.native.codeEdits.lineChange":"Whether to trigger intelligent rewriting when the cursor line number changes","preference.ai.native.codeEdits.typing":"Whether to trigger intelligent rewriting when the content changes","workbench.quickOpen.preserveInput":"Controls whether the last typed input to Quick Open(include Command Palette) should be preserved.","webview.webviewTagUnavailable":"webview is unsupported on non-electron env, please use iframe instead","notebook.kernel.panel.empty":"No content found.","notebook.kernel.panel.title":"Running Terminals and Kernels","notebook.kernel.panel.opened.pages":"Opened Pages","notebook.kernel.panel.running.kernels":"Running Kernels","notebook.kernel.close.all.confirmation":"Are you sure you want to close all?","notebook.variable.panel.title":"Variable Inspector","notebook.variable.panel.unsupported":"The file format is not supported for variable inspection","notebook.variable.panel.refresh.success":"Variable refresh successful","notebook.variable.panel.refresh.error":"Variable refresh failed","notebook.variable.panel.search.placeholder":"Please enter the variable name to search","notebook.variable.panel.show.detail":"View details",...r.browserViews,...o.editorLocalizations,...l.enUS}}},32581:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(43718),r=e(20741),o=e(61647);(0,n.registerLocalizationBundle)(o.localizationBundle),(0,n.registerLocalizationBundle)(r.localizationBundle)},36942:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enUS=void 0,t.enUS={"merge-conflicts.merge.type.auto":"auto merged","merge-conflicts.merge.type.manual":"merged","merge-conflicts.conflicts.summary":"Total {0} conflicts ({1})","merge-conflicts.conflicts.all-resolved":"All resolved","merge-conflicts.conflicts.partial-resolved":"{0} conflicts resolved, {1} remaining","merge-conflicts.non-conflicts.summary":"Non-conflict changes {0} in total","merge-conflicts.non-conflicts.progress":"{0} non-conflict changes have been {1}","merge-conflicts.non-conflicts.from.left":"target branch: {0} places","merge-conflicts.non-conflicts.from.right":"source branch: {0} places","merge-conflicts.non-conflicts.from.base":"base branch: {0} places","merge-conflicts.merge.conflict.remain":"Unresolved conflicts {0} remaining"}},40028:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zhCN=void 0,t.zhCN={"merge-conflicts.merge.type.auto":"\u81EA\u52A8\u5408\u5E76","merge-conflicts.merge.type.manual":"\u5408\u5E76","merge-conflicts.conflicts.summary":"\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904 ({1})","merge-conflicts.conflicts.all-resolved":"\u5DF2\u5168\u90E8\u89E3\u51B3","merge-conflicts.conflicts.partial-resolved":"\u5DF2\u89E3\u51B3 {0} \u5904, \u5269\u4F59 {1} \u5904","merge-conflicts.non-conflicts.summary":"\u975E\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904","merge-conflicts.non-conflicts.progress":"{0} \u5904\u975E\u51B2\u7A81\u53D8\u66F4\u5DF2{1}","merge-conflicts.non-conflicts.from.left":"\u76EE\u6807\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.right":"\u6765\u6E90\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.base":"\u4E24\u8005: {0} \u5904","merge-conflicts.merge.conflict.remain":"\u5269\u4F59\u672A\u89E3\u51B3\u51B2\u7A81 {0} \u5904"}},61647:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(21714),o=e(12651),l=e(40028);t.localizationBundle={languageId:n.LOCALE_TYPES.ZH_CN,languageName:"Chinese",localizedLanguageName:"\u4E2D\u6587(\u4E2D\u56FD)",contents:{ButtonAllow:"\u5141\u8BB8",ButtonOK:"\u786E\u5B9A",ButtonCancel:"\u53D6\u6D88","common.yes":"\u662F","common.no":"\u5426",extension:"\u63D2\u4EF6",editTtile:"\u7F16\u8F91","common.loading":"\u52A0\u8F7D\u4E2D...","tree.filter.placeholder":"\u8F93\u5165\u5173\u952E\u5B57\u6216\u8DEF\u5F84\u7B5B\u9009","file.new":"\u65B0\u5EFA\u6587\u4EF6","file.folder.new":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.locate":"\u6587\u4EF6\u5B9A\u4F4D","file.save":"\u4FDD\u5B58\u6587\u4EF6","file.saveAll":"\u4FDD\u5B58\u5168\u90E8","file.autoSave":"\u81EA\u52A8\u4FDD\u5B58","file.open":"\u6253\u5F00\u6587\u4EF6","file.open.side":"\u4FA7\u8FB9\u680F\u6253\u5F00","file.open.type":"\u6253\u5F00\u65B9\u5F0F...","file.open.type.placeholder":'\u4E3A "{0}" \u9009\u62E9\u6253\u5F00\u65B9\u5F0F',"file.open.type.detail.active":"\u5F53\u524D","file.open.type.detail.and":"\u548C","file.open.type.detail.default":"\u9ED8\u8BA4","file.open.type.preference.default":'\u4E3A "{0}" \u914D\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668...',"file.delete":"\u5220\u9664","file.rename":"\u91CD\u547D\u540D","file.compare":"\u4E0E\u7F16\u8F91\u5668\u4E2D\u7684\u6587\u4EF6\u6BD4\u8F83","file.close":"\u5173\u95ED\u6587\u4EF6","file.copy.path":"\u590D\u5236\u8DEF\u5F84","file.copy.relativepath":"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84","file.paste.file":"\u7C98\u8D34","file.copy.file":"\u590D\u5236","file.cut.file":"\u526A\u5207","file.move.existMessage":"\u8981\u7C98\u8D34\u7684\u6587\u4EF6\u540C\u65F6\u88AB\u5220\u9664\u6216\u79FB\u52A8\u3002\u65E0\u6CD5\u79FB\u52A8/\u590D\u5236\u3002\u6587\u4EF6\u5DF2\u5B58\u5728\u4E8E\u76EE\u6807\u4F4D\u7F6E\u3002","file.action.new.file":"\u65B0\u5EFA\u6587\u4EF6","file.action.new.folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.action.refresh":"\u5237\u65B0\u6587\u4EF6","file.action.collapse":"\u5168\u90E8\u6298\u53E0","file.location":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","file.open.folder":"\u6253\u5F00\u6587\u4EF6\u5939","file.open.workspace":"\u4ECE\u6587\u4EF6\u6253\u5F00\u5DE5\u4F5C\u533A","file.confirm.delete":`\u786E\u5B9A\u5220\u9664\u4E0B\u9762\u5217\u7684\u6587\u4EF6?
28547
- {0}`,"file.confirm.delete.ok":"\u79FB\u5165\u56DE\u6536\u7AD9","file.confirm.delete.cancel":"\u53D6\u6D88","file.confirm.move":"\u786E\u5B9A\u79FB\u52A8\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.move.ok":"\u79FB\u52A8","file.confirm.move.cancel":"\u53D6\u6D88","file.confirm.paste":"\u786E\u5B9A\u62F7\u8D1D\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.paste.ok":"\u62F7\u8D1D","file.confirm.paste.cancel":"\u53D6\u6D88","file.confirm.replace":"\u786E\u5B9A\u66FF\u6362{0}\u6587\u4EF6?","file.confirm.replace.ok":"\u66FF\u6362","file.confirm.replace.cancel":"\u53D6\u6D88","file.empty.defaultTitle":"\u65E0\u6253\u5F00\u7684\u6587\u4EF6\u5939","file.empty.defaultMessage":"\u5C1A\u672A\u6253\u5F00\u6587\u4EF6\u5939","file.workspace.defaultTip":"\u65E0\u6807\u9898\uFF08\u5DE5\u4F5C\u533A\uFF09","file.workspace.defaultWorkspaceTip":"{0}\uFF08\u5DE5\u4F5C\u533A\uFF09","file.empty.openFolder":"\u6253\u5F00\u6587\u4EF6\u5939","file.collapse":"\u5168\u90E8\u6298\u53E0","file.refresh":"\u5237\u65B0","file.search.folder":"\u5728\u6587\u4EF6\u5939\u4E2D\u67E5\u627E","file.focus.files":"\u5728\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u805A\u7126\u6587\u4EF6","file.filetree.filter":"\u57FA\u4E8E\u5F53\u524D\u6587\u4EF6\u6811\u7B5B\u9009\u6587\u4EF6","file.filetree.openTerminalWithPath":"\u5728\u7EC8\u7AEF\u4E2D\u6253\u5F00","file.tooltip.symbolicLink":"\u7B26\u53F7\u94FE\u63A5","file.resource-deleted":"\uFF08\u5DF2\u5220\u9664\uFF09","file.revealInExplorer":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","menu-bar.title.file":"\u6587\u4EF6","menu-bar.title.edit":"\u7F16\u8F91","menu-bar.title.selection":"\u9009\u62E9","menu-bar.title.view":"\u89C6\u56FE","menu-bar.title.go":"\u524D\u5F80","menu-bar.title.debug":"\u8C03\u8BD5","menu-bar.title.terminal":"\u7EC8\u7AEF","menu-bar.title.window":"\u7A97\u53E3","menu-bar.title.help":"\u5E2E\u52A9","menu-bar.file.open":"\u6253\u5F00\u6587\u4EF6","menu-bar.file.save-as":"\u53E6\u5B58\u4E3A","menu-bar.file.save-all":"\u5168\u90E8\u4FDD\u5B58","menu-bar.view.quick.command":"\u547D\u4EE4\u9762\u677F","menu-bar.go.jumpToBracket":"\u8DF3\u8F6C\u5230\u62EC\u53F7","menu-bar.go.nextProblemInFiles":"\u4E0B\u4E00\u4E2A\u95EE\u9898","menu-bar.go.prevProblemInFiles":"\u4E0A\u4E00\u4E2A\u95EE\u9898","menu-bar.file.pref":"\u8BBE\u7F6E","menu-bar.mode.compact":"\u7D27\u51D1\u6A21\u5F0F",editor:"\u7F16\u8F91\u5668","editor.undo":"\u64A4\u9500","editor.redo":"\u91CD\u505A","editor.saveCurrent":"\u4FDD\u5B58\u5F53\u524D\u6587\u4EF6","editor.title.context.close":"\u5173\u95ED","editor.closeTab.title":"\u5173\u95ED ({0})","editor.closeCurrent":"\u5173\u95ED\u5F53\u524D\u7F16\u8F91\u7A97\u53E3","editor.openExternal":"\u4F7F\u7528\u5916\u90E8\u8F6F\u4EF6\u6253\u5F00","editor.cannotOpenBinary":"\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u5C55\u793A\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","editor.splitToLeft":"\u5411\u5DE6\u62C6\u5206","editor.splitToRight":"\u5411\u53F3\u62C6\u5206","editor.splitToTop":"\u5411\u4E0A\u62C6\u5206","editor.splitToBottom":"\u5411\u4E0B\u62C6\u5206","editor.closeAllInGroup":"\u5173\u95ED\u5168\u90E8","editor.closeSaved":"\u5173\u95ED\u5DF2\u4FDD\u5B58","editor.closeOtherEditors":"\u5173\u95ED\u5176\u4ED6","editor.closeToRight":"\u5173\u95ED\u5230\u53F3\u4FA7","editor.cannotSaveWithoutDirectory":"\u8BF7\u9009\u62E9\u8981\u4FDD\u5B58\u7684\u8DEF\u5F84","editor.failToOpen":"\u6253\u5F00\u6587\u4EF6 {0} \u5931\u8D25, \u8BF7\u786E\u8BA4\u6587\u4EF6\u662F\u5426\u5B58\u5728\u3002\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F: {1}","editor.lineHeight":"\u884C\u9AD8","editor.lineHeight.description":`\u63A7\u5236\u884C\u9AD8\u3002
28566
+ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.message.not.processed.yet":"AI has processed conflicts at {0}, but conflicts at {1} have not yet been processed (still marked as yellow) and require manual processing.","aiNative.operate.discard.title":"Discard","aiNative.operate.afresh.title":"Afresh","aiNative.operate.stop.title":"Stop","aiNative.operate.close.title":"Close","aiNative.operate.clear.title":"Clear","aiNative.chat.welcome.loading.text":"Initializing...","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"Interface Quick Navigation","preference.ai.native.interface.quick.navigation":"Click the icon on the left side of the editor to quickly jump to the interface implementation.","preference.ai.native.interface.quick.navigation.hover":"Go to implementation","preference.ai.native.inlineChat.auto.visible":"Does Inline Chat automatically appear when code are selected?","preference.ai.native.inlineChat.codeAction.enabled":"Does Inline Chat related code actions automatically appear when code are selected?","preference.ai.native.chat.visible.type":"Control how the chat panel is displayed by default","preference.ai.native.inlineDiff.preview.mode":"Inline Diff preview mode","preference.ai.native.inlineDiff.preview.mode.sideBySide":"Displayed in the editor as left and right diff panels","preference.ai.native.inlineDiff.preview.mode.inlineLive":"Displayed in the editor through streaming rendering","preference.ai.native.intelligentCompletions.title":"Intelligent Completions","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"Whether to enable prompt engineering, some LLM models may not perform well on prompt engineering.","preference.ai.native.intelligentCompletions.debounceTime":"Debounce time for intelligent completions","preference.ai.native.intelligentCompletions.cache.enabled":"Whether to enable cache for intelligent completions","preference.ai.native.intelligentCompletions.alwaysVisible":"Whether to always show intelligent completions","preference.ai.native.codeEdits.title":"Code Edits","preference.ai.native.codeEdits.lintErrors":"Whether to trigger intelligent rewriting when Lint Error occurs","preference.ai.native.codeEdits.lineChange":"Whether to trigger intelligent rewriting when the cursor line number changes","preference.ai.native.codeEdits.typing":"Whether to trigger intelligent rewriting when the content changes","workbench.quickOpen.preserveInput":"Controls whether the last typed input to Quick Open(include Command Palette) should be preserved.","webview.webviewTagUnavailable":"webview is unsupported on non-electron env, please use iframe instead","notebook.kernel.panel.empty":"No content found.","notebook.kernel.panel.title":"Running Terminals and Kernels","notebook.kernel.panel.opened.pages":"Opened Pages","notebook.kernel.panel.running.kernels":"Running Kernels","notebook.kernel.close.all.confirmation":"Are you sure you want to close all?","notebook.variable.panel.title":"Variable Inspector","notebook.variable.panel.unsupported":"The file format is not supported for variable inspection","notebook.variable.panel.refresh.success":"Variable refresh successful","notebook.variable.panel.refresh.error":"Variable refresh failed","notebook.variable.panel.search.placeholder":"Please enter the variable name to search","notebook.variable.panel.show.detail":"View details",...r.browserViews,...o.editorLocalizations,...l.enUS}}},32581:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(43718),r=e(20741),o=e(61647);(0,n.registerLocalizationBundle)(o.localizationBundle),(0,n.registerLocalizationBundle)(r.localizationBundle)},36942:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enUS=void 0,t.enUS={"merge-conflicts.merge.type.auto":"auto merged","merge-conflicts.merge.type.manual":"merged","merge-conflicts.conflicts.summary":"Total {0} conflicts ({1})","merge-conflicts.conflicts.all-resolved":"All resolved","merge-conflicts.conflicts.partial-resolved":"{0} conflicts resolved, {1} remaining","merge-conflicts.non-conflicts.summary":"Non-conflict changes {0} in total","merge-conflicts.non-conflicts.progress":"{0} non-conflict changes have been {1}","merge-conflicts.non-conflicts.from.left":"target branch: {0} places","merge-conflicts.non-conflicts.from.right":"source branch: {0} places","merge-conflicts.non-conflicts.from.base":"base branch: {0} places","merge-conflicts.merge.conflict.remain":"Unresolved conflicts {0} remaining"}},40028:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zhCN=void 0,t.zhCN={"merge-conflicts.merge.type.auto":"\u81EA\u52A8\u5408\u5E76","merge-conflicts.merge.type.manual":"\u5408\u5E76","merge-conflicts.conflicts.summary":"\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904 ({1})","merge-conflicts.conflicts.all-resolved":"\u5DF2\u5168\u90E8\u89E3\u51B3","merge-conflicts.conflicts.partial-resolved":"\u5DF2\u89E3\u51B3 {0} \u5904, \u5269\u4F59 {1} \u5904","merge-conflicts.non-conflicts.summary":"\u975E\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904","merge-conflicts.non-conflicts.progress":"{0} \u5904\u975E\u51B2\u7A81\u53D8\u66F4\u5DF2{1}","merge-conflicts.non-conflicts.from.left":"\u76EE\u6807\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.right":"\u6765\u6E90\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.base":"\u4E24\u8005: {0} \u5904","merge-conflicts.merge.conflict.remain":"\u5269\u4F59\u672A\u89E3\u51B3\u51B2\u7A81 {0} \u5904"}},61647:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(21714),o=e(12651),l=e(40028);t.localizationBundle={languageId:n.LOCALE_TYPES.ZH_CN,languageName:"Chinese",localizedLanguageName:"\u4E2D\u6587(\u4E2D\u56FD)",contents:{ButtonAllow:"\u5141\u8BB8",ButtonOK:"\u786E\u5B9A",ButtonCancel:"\u53D6\u6D88","common.yes":"\u662F","common.no":"\u5426",extension:"\u63D2\u4EF6",editTtile:"\u7F16\u8F91","common.loading":"\u52A0\u8F7D\u4E2D...","tree.filter.placeholder":"\u8F93\u5165\u5173\u952E\u5B57\u6216\u8DEF\u5F84\u7B5B\u9009","file.new":"\u65B0\u5EFA\u6587\u4EF6","file.folder.new":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.locate":"\u6587\u4EF6\u5B9A\u4F4D","file.save":"\u4FDD\u5B58\u6587\u4EF6","file.saveAll":"\u4FDD\u5B58\u5168\u90E8","file.autoSave":"\u81EA\u52A8\u4FDD\u5B58","file.open":"\u6253\u5F00\u6587\u4EF6","file.open.side":"\u4FA7\u8FB9\u680F\u6253\u5F00","file.open.type":"\u6253\u5F00\u65B9\u5F0F...","file.open.type.placeholder":'\u4E3A "{0}" \u9009\u62E9\u6253\u5F00\u65B9\u5F0F',"file.open.type.detail.active":"\u5F53\u524D","file.open.type.detail.and":"\u548C","file.open.type.detail.default":"\u9ED8\u8BA4","file.open.type.preference.default":'\u4E3A "{0}" \u914D\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668...',"file.delete":"\u5220\u9664","file.rename":"\u91CD\u547D\u540D","file.compare":"\u4E0E\u7F16\u8F91\u5668\u4E2D\u7684\u6587\u4EF6\u6BD4\u8F83","file.close":"\u5173\u95ED\u6587\u4EF6","file.copy.path":"\u590D\u5236\u8DEF\u5F84","file.copy.relativepath":"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84","file.paste.file":"\u7C98\u8D34","file.copy.file":"\u590D\u5236","file.cut.file":"\u526A\u5207","file.move.existMessage":"\u8981\u7C98\u8D34\u7684\u6587\u4EF6\u540C\u65F6\u88AB\u5220\u9664\u6216\u79FB\u52A8\u3002\u65E0\u6CD5\u79FB\u52A8/\u590D\u5236\u3002\u6587\u4EF6\u5DF2\u5B58\u5728\u4E8E\u76EE\u6807\u4F4D\u7F6E\u3002","file.action.new.file":"\u65B0\u5EFA\u6587\u4EF6","file.action.new.folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.action.refresh":"\u5237\u65B0\u6587\u4EF6","file.action.collapse":"\u5168\u90E8\u6298\u53E0","file.location":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","file.open.folder":"\u6253\u5F00\u6587\u4EF6\u5939","file.open.workspace":"\u4ECE\u6587\u4EF6\u6253\u5F00\u5DE5\u4F5C\u533A","file.confirm.delete":`###\u786E\u5B9A\u4ECE\u5DE5\u4F5C\u533A\u5220\u9664\u4E0B\u9762\u7684 {0} \u4E2A\u6587\u4EF6?
28567
+ {1}`,"file.confirm.deleteTips":"\u4F60\u53EF\u4EE5\u4ECE\u56DE\u6536\u7AD9\u8FD8\u539F\u6587\u4EF6","file.confirm.moveToTrash.ok":"\u79FB\u5165\u56DE\u6536\u7AD9","file.confirm.delete.ok":"\u5220\u9664","file.confirm.delete.cancel":"\u53D6\u6D88","file.confirm.move":"\u786E\u5B9A\u79FB\u52A8\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.move.ok":"\u79FB\u52A8","file.confirm.move.cancel":"\u53D6\u6D88","file.confirm.paste":"\u786E\u5B9A\u62F7\u8D1D\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.paste.ok":"\u62F7\u8D1D","file.confirm.paste.cancel":"\u53D6\u6D88","file.confirm.replace":"\u786E\u5B9A\u66FF\u6362{0}\u6587\u4EF6?","file.confirm.replace.ok":"\u66FF\u6362","file.confirm.replace.cancel":"\u53D6\u6D88","file.empty.defaultTitle":"\u65E0\u6253\u5F00\u7684\u6587\u4EF6\u5939","file.empty.defaultMessage":"\u5C1A\u672A\u6253\u5F00\u6587\u4EF6\u5939","file.workspace.defaultTip":"\u65E0\u6807\u9898\uFF08\u5DE5\u4F5C\u533A\uFF09","file.workspace.defaultWorkspaceTip":"{0}\uFF08\u5DE5\u4F5C\u533A\uFF09","file.empty.openFolder":"\u6253\u5F00\u6587\u4EF6\u5939","file.collapse":"\u5168\u90E8\u6298\u53E0","file.refresh":"\u5237\u65B0","file.search.folder":"\u5728\u6587\u4EF6\u5939\u4E2D\u67E5\u627E","file.focus.files":"\u5728\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u805A\u7126\u6587\u4EF6","file.filetree.filter":"\u57FA\u4E8E\u5F53\u524D\u6587\u4EF6\u6811\u7B5B\u9009\u6587\u4EF6","file.filetree.openTerminalWithPath":"\u5728\u7EC8\u7AEF\u4E2D\u6253\u5F00","file.tooltip.symbolicLink":"\u7B26\u53F7\u94FE\u63A5","file.resource-deleted":"\uFF08\u5DF2\u5220\u9664\uFF09","file.revealInExplorer":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","menu-bar.title.file":"\u6587\u4EF6","menu-bar.title.edit":"\u7F16\u8F91","menu-bar.title.selection":"\u9009\u62E9","menu-bar.title.view":"\u89C6\u56FE","menu-bar.title.go":"\u524D\u5F80","menu-bar.title.debug":"\u8C03\u8BD5","menu-bar.title.terminal":"\u7EC8\u7AEF","menu-bar.title.window":"\u7A97\u53E3","menu-bar.title.help":"\u5E2E\u52A9","menu-bar.file.open":"\u6253\u5F00\u6587\u4EF6","menu-bar.file.save-as":"\u53E6\u5B58\u4E3A","menu-bar.file.save-all":"\u5168\u90E8\u4FDD\u5B58","menu-bar.view.quick.command":"\u547D\u4EE4\u9762\u677F","menu-bar.go.jumpToBracket":"\u8DF3\u8F6C\u5230\u62EC\u53F7","menu-bar.go.nextProblemInFiles":"\u4E0B\u4E00\u4E2A\u95EE\u9898","menu-bar.go.prevProblemInFiles":"\u4E0A\u4E00\u4E2A\u95EE\u9898","menu-bar.file.pref":"\u8BBE\u7F6E","menu-bar.mode.compact":"\u7D27\u51D1\u6A21\u5F0F",editor:"\u7F16\u8F91\u5668","editor.undo":"\u64A4\u9500","editor.redo":"\u91CD\u505A","editor.saveCurrent":"\u4FDD\u5B58\u5F53\u524D\u6587\u4EF6","editor.title.context.close":"\u5173\u95ED","editor.closeTab.title":"\u5173\u95ED ({0})","editor.closeCurrent":"\u5173\u95ED\u5F53\u524D\u7F16\u8F91\u7A97\u53E3","editor.openExternal":"\u4F7F\u7528\u5916\u90E8\u8F6F\u4EF6\u6253\u5F00","editor.cannotOpenBinary":"\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u5C55\u793A\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","editor.splitToLeft":"\u5411\u5DE6\u62C6\u5206","editor.splitToRight":"\u5411\u53F3\u62C6\u5206","editor.splitToTop":"\u5411\u4E0A\u62C6\u5206","editor.splitToBottom":"\u5411\u4E0B\u62C6\u5206","editor.closeAllInGroup":"\u5173\u95ED\u5168\u90E8","editor.closeSaved":"\u5173\u95ED\u5DF2\u4FDD\u5B58","editor.closeOtherEditors":"\u5173\u95ED\u5176\u4ED6","editor.closeToRight":"\u5173\u95ED\u5230\u53F3\u4FA7","editor.cannotSaveWithoutDirectory":"\u8BF7\u9009\u62E9\u8981\u4FDD\u5B58\u7684\u8DEF\u5F84","editor.failToOpen":"\u6253\u5F00\u6587\u4EF6 {0} \u5931\u8D25, \u8BF7\u786E\u8BA4\u6587\u4EF6\u662F\u5426\u5B58\u5728\u3002\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F: {1}","editor.lineHeight":"\u884C\u9AD8","editor.lineHeight.description":`\u63A7\u5236\u884C\u9AD8\u3002
28548
28568
 
28549
28569
  - \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002
28550
28570
 
@@ -28807,7 +28827,7 @@ ${(0,o.formatLocalize)("terminal.integrated.exitedWithCode",h)}`),!((u=this.pres
28807
28827
  `)}warn(d){this._validationStatus.state=2,this._outputChannel.append(d+`
28808
28828
  `)}error(d){this._validationStatus.state=3,this._outputChannel.append(d+`
28809
28829
  `)}fatal(d){this._validationStatus.state=4,this._outputChannel.append(d+`
28810
- `)}get status(){return this._validationStatus}}let h=class extends o.Disposable{constructor(){super(),this._onDidStateChange=new l.Emitter,this.onDidStateChange=this._onDidStateChange.event,this._onDidRegisterTaskProvider=new l.Emitter,this.onDidRegisterTaskProvider=this._onDidRegisterTaskProvider.event,this.providerHandler=0,this.runningTasks=new Map,this.toQuickOpenItem=d=>{var v;return new o.QuickOpenItem({label:d._label||"",detail:d instanceof _.ContributedTask?`${d.command.name||""} ${d.command.args?(v=d.command.args)===null||v===void 0?void 0:v.join(" "):""}`:void 0,run:f=>f===o.Mode.OPEN?(this.runTask(d),!0):!1})},this.providers=new Map,this.providerTypes=new Map,this.addDispose([this.taskSystem.onDidStateChange(d=>this._onDidStateChange.fire(d)),this.taskSystem.onDidBackgroundTaskBegin(d=>this._onDidStateChange.fire(d)),this.taskSystem.onDidBackgroundTaskEnded(d=>this._onDidStateChange.fire(d)),this.taskSystem.onDidProblemMatched(d=>this._onDidStateChange.fire(d))])}get outputChannel(){return this._outputChannel||(this._outputChannel=this.outputService.getChannel((0,o.localize)("task.outputchannel.name"))),this._outputChannel}get workspaceFolders(){return this._workspaceFolders||this.tryGetWorkspaceFolders(),this._workspaceFolders}tryGetWorkspaceFolders(){this._workspaceFolders=this.workspaceService.tryGetRoots().map(d=>o.Uri.parse(d.uri))}async runTaskCommand(){const d=await this.getGroupedTasks(),v=await this.getWorkspaceTasks(d),[f,a]=this.combineQuickItems(d,v);this.quickOpenService.open({onType:(b,y)=>y([...f,...a])},{placeholder:(0,o.formatLocalize)("TaskService.pickRunTask")})}run(d){return this.runTask(d)}async attach(d,v){if(this.runningTasks.has(d))return;const[,,,f]=d.split(",");if(f)if(this.providerTypes.has(f)){const a=await this.getTask(this.workspaceFolders[0],d);a&&(this.taskSystem.attach(a,v),this.runningTasks.set(d,a))}else{const a=this._onDidRegisterTaskProvider.event(async b=>{if(b===f){const y=await this.getTask(this.workspaceFolders[0],d);y&&(this.taskSystem.attach(y,v),this.runningTasks.set(d,y),a.dispose())}})}}async terminateTask(d){const v=this.taskSystem.getActiveTasks();for(const f of v)f._id===d&&await this.taskSystem.terminate(f)}getTask(d,v,f=!1){const a=(0,o.isString)(v)?v:this.taskDefinitionRegistry.createTaskIdentifier(v,console);return a===void 0?Promise.resolve(void 0):this.getWorkspaceGroupedTasks(d).then(b=>{if(!b)return Promise.resolve(void 0);const y=b.get(d.toString());if(!y)return Promise.resolve(void 0);for(const S of y)if(S.matches(a,f)||S._id===v||S._label===v)return S})}async runTask(d){const v=await this.taskSystem.run(d);return v.promise.then(f=>{this.runningTasks.has(d._id)&&this.runningTasks.delete(d._id),this.outputChannel.appendLine(`Task ${d._label} done, exit code ${f.exitCode}`)}),this.runningTasks.set(d._id,d),Promise.resolve(v.promise)}async tasks(d){var v;const f=await this.getWorkspaceGroupedTasks(),a=[];for(const b of f.values())for(const y of b)d&&d.type&&((v=y.getDefinition())===null||v===void 0?void 0:v.type)===d.type&&a.push(y);return a}async getWorkspaceGroupedTasks(d=this.workspaceFolders[0]){const v=await this.getGroupedTasks(),f=await this.getWorkspaceTasks(v),a=[];for(const S of v)S.tasks&&S.tasks.length>0&&a.push(...S.tasks);const b=f?.get(d.toString());b&&b.set&&a.push(...b.set.tasks);const y=new Map;return y.set(d.toString(),a),y}async getGroupedTasks(){const d={};for(const f of this.taskDefinitionRegistry.all())d[f.taskType]=!0;d.shell=!0,d.process=!0;const v=[];for(const[,f]of this.providers){const a=await f.provideTasks(d);v.push(a)}return v}toQuickOpenGroupItem(d,v,f){return new o.QuickOpenItem({groupLabel:d?(0,o.formatLocalize)("task.contribute"):void 0,run:v,showBorder:d,label:f,value:{type:f,grouped:!0},iconClass:(0,o.getIcon)("folder")})}combineQuickItems(d,v){var f,a;const b=[],y=[];let S=!0;for(const A of d){const T=D=>D===o.Mode.OPEN?(this.quickOpenService.open({onType:(I,O)=>A.tasks.length===0?O([new o.QuickOpenItem({value:"none",label:(0,o.formatLocalize)("task.cannotFindTask",A.type),run:P=>P===o.Mode.OPEN})]):O(A.tasks.map(this.toQuickOpenItem))}),!1):!0,w=this.toQuickOpenGroupItem(S,T,A.type);b.push(w),S=!1}if(v){for(const A of v.values())if(!((f=A.configurations)===null||f===void 0)&&f.byIdentifier&&Object.keys((a=A.configurations)===null||a===void 0?void 0:a.byIdentifier).forEach(T=>{var w;const D=(w=A.configurations)===null||w===void 0?void 0:w.byIdentifier[T];y.push(this.toQuickOpenItem(D))}),A.set&&A.set.tasks.length>0)for(const T of A.set.tasks)y.push(this.toQuickOpenItem(T))}return[y,b]}async getWorkspaceTasks(d){return this.updateWorkspaceTasks(d)}updateWorkspaceTasks(d){return this.workspaceFolders.length===0?Promise.resolve(new Map):this.workspaceFolders.length===1?this.computeWorkspaceFolderTasks(this.workspaceFolders[0],d).then(v=>{const f=new Map;return f.set(this.workspaceFolders[0].toString(),v),f}):Promise.resolve(void 0)}computeWorkspaceFolderTasks(d,v){return new Promise(async f=>{const a=this.preferences.get("tasks"),b=new Map;for(const y of v)for(const S of y.tasks)_.ContributedTask.is(S)&&b.set(S.defines._key,S);if(a&&a.tasks){let y;const S=[];let A=!1;const T=new c(this.outputChannel),w=(0,g.parse)({uri:d,name:d.path,index:0},l.platform,a,T,this.taskDefinitionRegistry,this.problemMatcher,this.problemPattern);if(w.validationStatus.isOK()||(A=!0,this.showOutput()),w.configured&&w.configured.length>0){y={byIdentifier:Object.create(null)};for(const D of w.configured)y.byIdentifier[D.configures._key]=D}S.push(...w.custom),y&&y.byIdentifier&&Object.keys(y.byIdentifier).forEach(D=>{if(b.has(D)){const I=(0,g.createCustomTask)(b.get(D),y.byIdentifier[D]);y.byIdentifier[D]=I}}),f({workspaceFolder:{uri:d,name:d.path,index:0},set:{tasks:S},configurations:y,hasErrors:A})}else f({workspaceFolder:{uri:d,name:d.path,index:0},set:{tasks:[]},configurations:{byIdentifier:{}},hasErrors:!1})})}showOutput(){this.outputChannel.appendLine("There are task errors. See the output for details.")}rerunLastTask(){return this.taskSystem.rerun()}registerTaskProvider(d,v){const f=this.providerHandler+=1;return this.providers.set(f,d),this.providerTypes.set(v,f),this._onDidRegisterTaskProvider.fire(v),{dispose:()=>{this.providers.delete(f),this.providerTypes.delete(v)}}}};t.TaskService=h,n.__decorate([(0,r.Autowired)(m.OutputService),n.__metadata("design:type",m.OutputService)],h.prototype,"outputService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],h.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],h.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],h.prototype,"preferences",void 0),n.__decorate([(0,r.Autowired)(p.ITaskSystem),n.__metadata("design:type",Object)],h.prototype,"taskSystem",void 0),n.__decorate([(0,r.Autowired)(l.ITaskDefinitionRegistry),n.__metadata("design:type",Object)],h.prototype,"taskDefinitionRegistry",void 0),n.__decorate([(0,r.Autowired)(l.IProblemMatcherRegistry),n.__metadata("design:type",Object)],h.prototype,"problemMatcher",void 0),n.__decorate([(0,r.Autowired)(l.IProblemPatternRegistry),n.__metadata("design:type",Object)],h.prototype,"problemPattern",void 0),t.TaskService=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},66893:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalTaskSystem=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(80907),m=e(1041),E=e(12968),p=e(95268),{deepClone:_}=o.objects,{Path:s}=o.path;let g=class extends o.Disposable{constructor(){super(...arguments),this.executorId=0,this.activeTaskExecutors=new Map,this._onDidStateChange=new o.Emitter,this._onDidBackgroundTaskBegin=new o.Emitter,this._onDidBackgroundTaskEnded=new o.Emitter,this._onDidProblemMatched=new o.Emitter,this.taskExecutors=[],this.onDidStateChange=this._onDidStateChange.event,this.onDidBackgroundTaskBegin=this._onDidBackgroundTaskBegin.event,this.onDidBackgroundTaskEnded=this._onDidBackgroundTaskEnded.event,this.onDidProblemMatched=this._onDidProblemMatched.event}run(h){return this.currentTask=h,this.executeTask(h)}attach(h,u){return this.currentTask=h,this.attachTask(h,u)}async buildShellConfig(h){let u="";const d=h.name,v=h.args,f=[],a=[];if(d&&(typeof d=="string"?u=d:u=d.value),f.push(u),v)for(const b of v)typeof b=="string"?f.push(b):f.push(b.value);for(const b of f)b.indexOf(s.separator)>-1?a.push(await this.resolveVariables(b.split(s.separator))):a.push(await this.resolveVariable(b));return{args:["-c",`${a.join(" ")}`]}}findAvailableExecutor(){return this.taskExecutors.find(h=>h.taskStatus===p.TaskStatus.PROCESS_EXITED)}async createTaskExecutor(h,u){const d=await this.resolveMatchers(h.configurationProperties.problemMatchers),v=new E.ProblemCollector(d),f=this.injector.get(p.TerminalTaskExecutor,[h,u,v,this.executorId]);return this.executorId+=1,this.taskExecutors.push(f),this.addDispose(f.onDidTerminalWidgetRemove(()=>{this.taskExecutors=this.taskExecutors.filter(a=>a.executorId!==f.executorId)})),f}async attachTask(h,u){const v=(await this.createTaskExecutor(h,u.launchConfig)).attach(u);return this.lastTask=h,{task:h,kind:1,promise:v}}async executeTask(h){var u,d,v;const f=h.command&&h.command.runtime===m.RuntimeType.CustomExecution,a=await this.resolveMatchers(h.configurationProperties.problemMatchers),b=new E.ProblemCollector(a),{args:y}=await this.buildShellConfig(h.command),S={name:this.createTerminalName(h),args:y,isExtensionOwnedTerminal:f,env:((u=h.command.options)===null||u===void 0?void 0:u.env)||{},cwd:!((d=h.command.options)===null||d===void 0)&&d.cwd?await this.resolveVariable((v=h.command.options)===null||v===void 0?void 0:v.cwd):await this.resolveVariable("${workspaceFolder}"),disablePreserveHistory:!0};let A=this.findAvailableExecutor(),T=!1;A?(T=!0,A.updateProblemCollector(b),A.updateLaunchConfig(S),A.reset()):A=await this.createTaskExecutor(h,S),T?this._onDidStateChange.fire(m.TaskEvent.create("start",h,A.terminalId)):this.addDispose(A.onDidTerminalCreated(I=>{this._onDidStateChange.fire(m.TaskEvent.create("start",h,I))})),T||(this.addDispose(A.onDidTaskProcessExit(I=>{this._onDidStateChange.fire(m.TaskEvent.create("processEnded",h,I)),this._onDidStateChange.fire(m.TaskEvent.create("end",h))})),this.addDispose(A.onDidBackgroundTaskBegin(()=>this._onDidBackgroundTaskBegin.fire(m.TaskEvent.create("backgroundTaskBegin",h)))),this.addDispose(A.onDidBackgroundTaskEnd(()=>this._onDidBackgroundTaskEnded.fire(m.TaskEvent.create("backgroundTaskEnded",h)))),this.addDispose(A.onDidProblemMatched(I=>this._onDidProblemMatched.fire(m.TaskEvent.create("problemMatched",h,I)))));const w=A.execute(h,T),D=h.getMapKey();return this.activeTaskExecutors.set(D,{promise:Promise.resolve(w),task:h,executor:A}),this._onDidStateChange.fire(m.TaskEvent.create("active",h)),await A.processReady.promise,this._onDidStateChange.fire(m.TaskEvent.create("processStarted",h,A.processId)),this.lastTask=h,{task:h,kind:1,promise:w}}createTerminalName(h){return(0,o.formatLocalize)("TerminalTaskSystem.terminalName",h.getQualifiedLabel()||h.configurationProperties.name)}async resolveVariables(h){const u=[];for(const d of h)u.push(await this.resolveVariable(d));return u.join(s.separator)}async resolveVariable(h){if((0,o.isString)(h))return await this.variableResolver.resolve(h);if(h!==void 0)return{value:await this.variableResolver.resolve(h.value),quoting:h.quoting};throw new Error("Should never try to resolve undefined.")}async resolveMatchers(h){if(h==null||h.length===0)return[];const u=[];for(const d of h){let v;if((0,o.isString)(d)?d[0].startsWith("$")?v=this.problemMatcher.get(d.substring(1)):v=this.problemMatcher.get(d):v=d,!v)continue;const f=v.filePrefix!==void 0;if(!f)u.push(v);else{const a=_(v);f&&(a.filePrefix=await this.resolveVariable(a.filePrefix)),u.push(a)}}return u}getActiveTasks(){return Array.from(this.activeTaskExecutors.values()).map(h=>h.task)}async terminate(h){const u=h.getMapKey(),d=this.activeTaskExecutors.get(u);if(!d)return Promise.resolve({task:void 0,success:!0});const{success:v}=await d.executor.terminate();return this.activeTaskExecutors.delete(u),{task:h,success:v}}async rerun(){return this.lastTask&&await this.executeTask(this.lastTask)}isActive(){throw new Error("Method not implemented.")}isActiveSync(){throw new Error("Method not implemented.")}getBusyTasks(){throw new Error("Method not implemented.")}canAutoTerminate(){throw new Error("Method not implemented.")}terminateAll(){throw new Error("Method not implemented.")}revealTask(h){throw new Error("Method not implemented.")}customExecutionComplete(h,u){throw new Error("Method not implemented.")}};t.TerminalTaskSystem=g,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.IProblemMatcherRegistry),n.__metadata("design:type",Object)],g.prototype,"problemMatcher",void 0),n.__decorate([(0,r.Autowired)(l.IVariableResolverService),n.__metadata("design:type",Object)],g.prototype,"variableResolver",void 0),t.TerminalTaskSystem=g=n.__decorate([(0,r.Injectable)()],g)},93950:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITaskSystem=t.ITaskExecutor=t.ITaskService=void 0,t.ITaskService=Symbol("ITaskService"),t.ITaskExecutor=Symbol("ITaskExecutor"),t.ITaskSystem=Symbol("ITaskSystem")},1041:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEvent=t.TaskSorter=t.ExecutionEngine=t.InMemoryTask=t.ContributedTask=t.ConfiguringTask=t.CustomTask=t.CommonTask=t.RunOptions=t.RunOnOptions=t.TaskSourceKind=t.TaskGroup=t.CommandString=t.RuntimeType=t.PresentationOptions=t.PanelKind=t.RevealProblemKind=t.RevealKind=t.CommandOptions=t.CUSTOMIZED_TASK_TYPE=t.ShellQuoting=t.TASK_RUNNING_STATE=void 0;const n=e(40191),r=e(43718),{basename:o}=r.path;t.TASK_RUNNING_STATE=new n.RawContextKey("taskRunning",!1);var l;(function(D){D[D.Escape=1]="Escape",D[D.Strong=2]="Strong",D[D.Weak=3]="Weak"})(l||(t.ShellQuoting=l={})),t.CUSTOMIZED_TASK_TYPE="$customized",function(D){function I(O){if(!O)return D.Strong;switch(O.toLowerCase()){case"escape":return D.Escape;case"strong":return D.Strong;case"weak":return D.Weak;default:return D.Strong}}D.from=I}(l||(t.ShellQuoting=l={}));var m;(function(D){D.defaults={cwd:"${workspaceFolder}"}})(m||(t.CommandOptions=m={}));var E;(function(D){D[D.Always=1]="Always",D[D.Silent=2]="Silent",D[D.Never=3]="Never"})(E||(t.RevealKind=E={})),function(D){function I(O){switch(O.toLowerCase()){case"always":return D.Always;case"silent":return D.Silent;case"never":return D.Never;default:return D.Always}}D.fromString=I}(E||(t.RevealKind=E={}));var p;(function(D){D[D.Never=1]="Never",D[D.OnProblem=2]="OnProblem",D[D.Always=3]="Always"})(p||(t.RevealProblemKind=p={})),function(D){function I(O){switch(O.toLowerCase()){case"always":return D.Always;case"never":return D.Never;case"onproblem":return D.OnProblem;default:return D.OnProblem}}D.fromString=I}(p||(t.RevealProblemKind=p={}));var _;(function(D){D[D.Shared=1]="Shared",D[D.Dedicated=2]="Dedicated",D[D.New=3]="New"})(_||(t.PanelKind=_={})),function(D){function I(O){switch(O.toLowerCase()){case"shared":return D.Shared;case"dedicated":return D.Dedicated;case"new":return D.New;default:return D.Shared}}D.fromString=I}(_||(t.PanelKind=_={}));var s;(function(D){D.defaults={echo:!0,reveal:E.Always,revealProblems:p.Never,focus:!1,panel:_.Shared,showReuseMessage:!0,clear:!1}})(s||(t.PresentationOptions=s={}));var g;(function(D){D[D.Shell=1]="Shell",D[D.Process=2]="Process",D[D.CustomExecution=3]="CustomExecution",D[D.CustomExecution2=4]="CustomExecution2"})(g||(t.RuntimeType=g={})),function(D){function I(O){switch(O.toLowerCase()){case"shell":return D.Shell;case"process":return D.Process;case"customExecution":return D.CustomExecution;default:return D.Process}}D.fromString=I}(g||(t.RuntimeType=g={}));var c;(function(D){function I(O){return(0,r.isString)(O)?O:O.value}D.value=I})(c||(t.CommandString=c={}));var h;(function(D){D.Clean={_id:"clean",isDefault:!1},D.Build={_id:"build",isDefault:!1},D.Rebuild={_id:"rebuild",isDefault:!1},D.Test={_id:"test",isDefault:!1};function I(P){return P===D.Clean._id||P===D.Build._id||P===D.Rebuild._id||P===D.Test._id}D.is=I;function O(P){if(P!==void 0)return(0,r.isString)(P)?I(P)?{_id:P,isDefault:!1}:void 0:P}D.from=O})(h||(t.TaskGroup=h={}));var u;(function(D){D.Workspace="workspace",D.Extension="extension",D.InMemory="inMemory",D.WorkspaceFile="workspaceFile",D.User="user"})(u||(t.TaskSourceKind=u={}));var d;(function(D){D[D.default=1]="default",D[D.folderOpen=2]="folderOpen"})(d||(t.RunOnOptions=d={}));var v;(function(D){D.defaults={reevaluateOnRerun:!0,runOn:d.default}})(v||(t.RunOptions=v={}));class f{constructor(I,O,P,R,M,k){this._label="",this._id=I,O&&(this._label=O),P&&(this.type=P),this.runOptions=R,this.configurationProperties=M,this._source=k}getDefinition(I){}getMapKey(){return this._id}getRecentlyUsedKey(){}clone(){return this.fromObject(Object.assign({},this))}getWorkspaceFolder(){}getWorkspaceFileName(){}getTelemetryKind(){return"unknown"}matches(I,O=!1){if(I===void 0)return!1;if((0,r.isString)(I))return I===this._label||I===this.configurationProperties.identifier||O&&I===this._id;const P=this.getDefinition(!0);return P!==void 0&&P._key===I._key}getQualifiedLabel(){const I=this.getWorkspaceFolder();return I?`${this._label} (${I.name})`:this._label}getTaskExecution(){return{id:this._id,task:this}}addTaskLoadMessages(I){this._taskLoadMessages===void 0&&(this._taskLoadMessages=[]),I&&(this._taskLoadMessages=this._taskLoadMessages.concat(I))}get taskLoadMessages(){return this._taskLoadMessages}}t.CommonTask=f;class a extends f{constructor(I,O,P,R,M,k,B,x){super(I,P,void 0,B,x,O),this.command={},this._source=O,this.hasDefinedMatchers=k,M&&(this.command=M)}customizes(){if(this._source&&this._source.customizes)return this._source.customizes}getDefinition(I=!1){if(I&&this._source.customizes!==void 0)return this._source.customizes;{let O;switch(this.command?this.command.runtime:void 0){case g.Shell:O="shell";break;case g.Process:O="process";break;case g.CustomExecution:O="customExecution";break;case void 0:O="$composite";break;default:throw new Error("Unexpected task runtime")}return{type:O,_key:this._id,id:this._id}}}static is(I){return I instanceof a}getMapKey(){const I=this._source.config.workspaceFolder;return I?`${I.uri.toString()}|${this._id}`:this._id}getRecentlyUsedKey(){const I=this._source.config.workspaceFolder;if(!I)return;let O=this.configurationProperties.identifier;this._source.kind!==u.Workspace&&(O+=this._source.kind);const P={type:t.CUSTOMIZED_TASK_TYPE,folder:I.uri.toString(),id:O};return JSON.stringify(P)}getWorkspaceFolder(){return this._source.config.workspaceFolder}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?o(this._source.config.workspace.configuration.toString()):void 0}getTelemetryKind(){return this._source.customizes?"workspace>extension":"workspace"}fromObject(I){return new a(I._id,I._source,I._label,I.type,I.command,I.hasDefinedMatchers,I.runOptions,I.configurationProperties)}}t.CustomTask=a;class b extends f{constructor(I,O,P,R,M,k,B){super(I,P,R,k,B,O),this._source=O,this.configures=M}static is(I){return I instanceof b}fromObject(I){return I}getDefinition(){return this.configures}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?o(this._source.config.workspace.configuration.toString()):void 0}}t.ConfiguringTask=b;class y extends f{constructor(I,O,P,R,M,k,B,x,N){super(I,P,R,x,N,O),this.defines=M,this.hasDefinedMatchers=B,this.command=k}getDefinition(){return this.defines}static is(I){return I instanceof y}getMapKey(){const I=this._source.workspaceFolder;return I?`${this._source.scope.toString()}|${I.uri.toString()}|${this._id}`:`${this._source.scope.toString()}|${this._id}`}getRecentlyUsedKey(){const I={type:"contributed",scope:this._source.scope,id:this._id};return this._source.scope===3&&this._source.workspaceFolder&&(I.folder=this._source.workspaceFolder.uri.toString()),JSON.stringify(I)}getWorkspaceFolder(){return this._source.workspaceFolder}getTelemetryKind(){return"extension"}fromObject(I){return new y(I._id,I._source,I._label,I.type,I.defines,I.command,I.hasDefinedMatchers,I.runOptions,I.configurationProperties)}}t.ContributedTask=y;class S extends f{constructor(I,O,P,R,M,k){super(I,P,R,M,k,O),this._source=O}static is(I){return I instanceof S}getTelemetryKind(){return"composite"}fromObject(I){return new S(I._id,I._source,I._label,I.type,I.runOptions,I.configurationProperties)}}t.InMemoryTask=S;var A;(function(D){D[D.Process=1]="Process",D[D.Terminal=2]="Terminal"})(A||(t.ExecutionEngine=A={})),function(D){D._default=D.Terminal}(A||(t.ExecutionEngine=A={}));class T{constructor(I){this._order=new Map;for(let O=0;O<I.length;O++)this._order.set(I[O].uri.toString(),O)}compare(I,O){const P=I.getWorkspaceFolder(),R=O.getWorkspaceFolder();if(P&&R){let M=this._order.get(P.uri.toString());M=M===void 0?0:M+1;let k=this._order.get(R.uri.toString());return k=k===void 0?0:k+1,M===k?I._label.localeCompare(O._label):M-k}else return!P&&R?-1:P&&!R?1:0}}t.TaskSorter=T;var w;(function(D){function I(O,P,R){if(P){const M={kind:O,taskId:P._id,taskName:P.configurationProperties.name,runType:P.configurationProperties.isBackground?"background":"singleRun",group:P.configurationProperties.group,processId:void 0,exitCode:void 0,terminalId:void 0,__task:P};return O==="start"?M.terminalId=R:O==="processStarted"?M.processId=R:O==="processEnded"?M.exitCode=R:O==="problemMatched"&&(M.problems=R),Object.freeze(M)}else return Object.freeze({kind:"changed"})}D.create=I})(w||(t.TaskEvent=w={}))},90305:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(75655));let l=0,m=null;t.default=E=>{const{start:p,stop:_,self:s,left:g,right:c,wholeWidth:h,last:u}=E,d=a=>{l=a.clientX,m=s,p()},v=a=>{if(!l)return!1;const b=a.clientX,y=(b-l)/h*100;l=b,y<0?(s&&s.increase(y),c&&c.increase(-y)):m&&m===g&&(s&&s.increase(-y),g&&g.increase(y))},f=a=>{l=0,m=null,s.resize(),g&&g.resize(),c&&c.resize(),_()};return r.default.createElement("div",{className:o.default.resizeDelegetContainer,onMouseUp:f,onMouseMove:v},!u&&r.default.createElement("div",{className:o.default.resizeDelegateBar,onMouseDown:d,onMouseUp:f}))}},92699:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeDirection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),m=e(7473),E=n.__importDefault(e(90305)),p=n.__importDefault(e(75655));var _;(function(c){c[c.vertical=0]="vertical",c[c.horizontal=1]="horizontal"})(_||(t.ResizeDirection=_={}));const s=({index:c,widget:h,wholeWidth:u,setEvent:d,self:v,left:f,right:a,last:b})=>{const y=(0,l.useAutorun)(h.shadowDynamic);return o.default.createElement("div",{key:`resize-item-${c}`,style:{width:`${y}%`},className:p.default.resizeHandler},o.default.createElement(E.default,{wholeWidth:u,start:()=>d(!0),stop:()=>d(!1),self:v,left:f,right:a,last:b}))},g=({widget:c,dynamic:h,draw:u,handleRemoveWidget:d,widgetsLength:v})=>{const f=(0,l.useAutorun)(h);return o.default.createElement("div",{key:c.id,style:{width:`${f}%`},className:p.default.resizeItem},u(c),v>1&&o.default.createElement("div",{className:(0,r.default)(p.default.closeBtn,(0,l.getIcon)("close")),onClick:()=>{d(c.id)}}))};t.default=c=>{const{group:h,shadow:u}=c,d=(0,l.useAutorun)(h.widgets),[v,f]=o.default.useState(!1),[a,b]=o.default.useState(1/0),y=(0,l.useInjectable)(m.ITerminalGroupViewService),S=o.default.useRef(null);o.default.useEffect(()=>{S.current&&S.current.clientHeight!==a&&b(S.current.clientWidth)});const A=o.default.useCallback(T=>{y.removeWidget(T)},[]);return o.default.createElement("div",{className:p.default.resizeWrapper,ref:S},o.default.createElement("div",{style:{pointerEvents:v?"all":"none"},className:p.default.resizeDelegate},d&&d.map((T,w)=>{const D=w-1>-1?d[w-1]:null,I=d[w],O=w+1<d.length?d[w+1]:null;return o.default.createElement(s,{key:w,index:w,widget:T,wholeWidth:a,setEvent:f,self:I,left:D,right:O,last:w===d.length-1})})),o.default.createElement("div",{style:{pointerEvents:v?"none":"all"},className:p.default.resizePanel},d&&d.map(T=>o.default.createElement(g,{key:T.id,widget:T,dynamic:u?T.dynamic:T.shadowDynamic,draw:c.draw,handleRemoveWidget:A,widgetsLength:d.length}))))}},65586:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderAddItem=t.renderInfoItem=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(12784)),l=n.__importStar(e(14041)),m=e(80564),E=e(41869),p=e(89897),_=e(1149),s=e(7443),g=e(26405),c=n.__importDefault(e(99886)),h=d=>{var v,f,a,b;const y=(0,E.useInjectable)(s.IconService),S=(0,o.default)(()=>d.onClick&&d.onClick(),20),A=(0,o.default)(()=>d.onClose&&d.onClose(),20),T=(0,E.useDesignStyles)(c.default.item_container,"item_container"),w=(0,E.useDesignStyles)(c.default.tab_item_selected,"tab_item_selected"),D=(0,E.useDesignStyles)(c.default.item_info_name,"item_info_name"),I=(0,E.useDesignStyles)(c.default.tab_close_icon,"tab_close_icon"),O=(0,E.useInjectable)(_.LayoutViewSizeConfig),P=(0,l.useRef)(null),{group:R}=d;if(!R)return null;const{options:M,id:k}=R,B=(0,E.useAutorun)(R.editable),x=(0,E.useAutorun)(R.snapshot),N=(0,l.useCallback)(G=>{G.key==="Enter"&&d.onInputEnter&&k&&d.onInputEnter(k,G.target.value)},[k,d.onInputEnter]);(0,l.useEffect)(()=>{var G;d.selected&&((G=P.current)===null||G===void 0||G.scrollIntoView())},[P,d.selected]);let j;M?.icon&&(!((v=M.icon)===null||v===void 0)&&v.id?j=y.fromString(`$(${(f=M.icon)===null||f===void 0?void 0:f.id})`):M.icon instanceof E.URI?j=y.fromIcon(M?.icon.toString()):(!((a=M.icon)===null||a===void 0)&&a.light||!((b=M?.icon)===null||b===void 0)&&b.dark)&&(j=d.theme==="light"?y.fromIcon(M.icon.light.toString()):y.fromIcon(M.icon.dark.toString())));const K=(0,l.useCallback)(G=>{var Q;(Q=d.onDragStart)===null||Q===void 0||Q.call(d,G)},[d.onDragStart]),U=(0,l.useCallback)(G=>{G.preventDefault(),P.current&&P.current.classList.add("on-drag-over")},[P]),Y=(0,l.useCallback)(()=>{P.current&&P.current.classList.remove("on-drag-over")},[P]),z=(0,l.useCallback)(G=>{var Q;P.current&&P.current.classList.remove("on-drag-over"),(Q=d.onDrop)===null||Q===void 0||Q.call(d,G)},[P,d.onDrop]);return l.default.createElement("div",{draggable:d.draggable,onDragStart:K,onDragOver:U,onDragLeave:Y,onDrop:z,ref:P,className:(0,r.default)({[T]:!0,[w]:!!d.selected}),style:{height:O.panelTitleBarHeight},onClick:()=>S(),onContextMenu:G=>d.onContextMenu&&d.onContextMenu(G)},B?l.default.createElement("input",{autoFocus:!0,ref:G=>G&&G.select(),className:c.default.item_info_input,defaultValue:x,onClick:G=>G.stopPropagation(),onBlur:()=>d.onInputBlur&&R.id&&d.onInputBlur(R.id),onKeyDown:G=>N(G)}):l.default.createElement("div",{id:R.id,className:D,title:x},x!==""?l.default.createElement(l.default.Fragment,null,l.default.createElement(m.Icon,{iconClass:j||(0,E.getIcon)(x?.toLowerCase()||"terminal")||(0,E.getIcon)("terminal"),style:{marginRight:4,color:"inherit",fontSize:14}}),l.default.createElement("span",{className:c.default.item_title},x)):l.default.createElement(p.Loading,null)),B?l.default.createElement("div",null):l.default.createElement("div",{className:(0,r.default)([(0,E.getIcon)("close"),I]),onClick:G=>{G.stopPropagation(),A()}}))};t.renderInfoItem=h;const u=d=>{const v=(0,o.default)(()=>d.onClick&&d.onClick(),20),f=d.getKeybinding&&d.getKeybinding(E.TERMINAL_COMMANDS.ADD.id),a=f?`${(0,E.localize)("terminal.new")}(${f})`:(0,E.localize)("terminal.new"),b=(0,E.useDesignStyles)(c.default.tab_item_wrapper,"tab_item_wrapper");return l.default.createElement("div",{className:b},l.default.createElement("div",{title:a,className:(0,r.default)({[(0,E.getIcon)("plus")]:!0,[c.default.item_add]:!0}),onClick:()=>v()}),l.default.createElement("div",{title:(0,E.localize)("terminal.new.type"),className:(0,r.default)({[(0,E.getIcon)("down")]:!0,[c.default.item_more]:!0}),onClick:d.onDropdown}))};t.renderAddItem=u,t.default=d=>{switch(d.type||g.ItemType.info){case g.ItemType.info:return(0,l.createElement)(d.provider.infoItemRender,d);case g.ItemType.add:return(0,l.createElement)(d.provider.addItemRender,d);default:return null}}},17632:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),m=e(52416),E=e(26405),p=e(88023),_=n.__importDefault(e(65586)),s=n.__importDefault(e(99886));t.default=()=>{const g=(0,l.useInjectable)(E.ITerminalGroupViewService),c=(0,l.useInjectable)(E.ITerminalRenderProvider),h=(0,l.useInjectable)(p.TerminalContextMenuService),u=(0,l.useInjectable)(m.IThemeService),d=(0,l.useInjectable)(l.KeybindingRegistry),v=(0,r.useRef)(),[f,a]=(0,r.useState)("dark"),b=(0,l.useDesignStyles)(s.default.tab_contents,"tab_contents"),y=(0,l.useAutorun)(g.groups),S=(0,l.useAutorun)(g.currentGroup),A=(0,r.useCallback)(()=>(u.getCurrentTheme().then(T=>{a(T.type)}),u.onThemeChange(T=>{a(T.type)})),[f,u]);return(0,r.useEffect)(()=>{const T=A();return()=>{T.dispose()}},[]),r.default.createElement("div",{className:s.default.view_container},r.default.createElement("div",{className:s.default.tabs},r.default.createElement(o.Scrollbars,{forwardedRef:T=>T?v.current=T.ref:null},r.default.createElement("div",{className:b},y.filter(Boolean).map((T,w)=>r.default.createElement(_.default,{draggable:!0,onDragStart:D=>{D.dataTransfer.setData("groupIndex",String(w))},onDrop:D=>{if(D.preventDefault(),D.dataTransfer.getData("groupIndex")){const I=D.dataTransfer.getData("groupIndex");g.swapGroup(Number(I),w),g.selectGroup(w)}},key:T.id,group:T,selected:S&&S.id===T.id,onInputBlur:()=>T.unedit(),onInputEnter:(D,I)=>T.rename(I),onClick:()=>g.selectGroup(w),onClose:()=>g.removeGroup(w),onContextMenu:D=>h.onTabContextMenu(D,w),provider:c,theme:f})),r.default.createElement("div",{className:s.default.button},r.default.createElement(_.default,{type:E.ItemType.add,onClick:()=>{const T=g.createGroup(),w=g.getGroup(T);g.createWidget(w),g.selectGroup(T)},getKeybinding:T=>{const w=d.getKeybindingsForCommand(T);return Array.isArray(w)&&w[0]&&d.acceleratorFor(w[0],"")[0]||""},onDropdown:T=>h.onDropDownContextMenu(T),provider:c,theme:f}))))))}},7066:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalVariable=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(43718),l=e(94620),m=n.__importDefault(e(74599));function E(_,s){_.forEach((g,c)=>{g.forEach(h=>{s.add((0,l.mutatorTypeLabel)(h.type,h.value,c))})})}const p=({diff:_})=>{const s=r.default.useMemo(()=>{const c=new Set;return _?.added&&_?.added.size>0&&E(_.added,c),_?.changed&&_.changed.size>0&&E(_.changed,c),Array.from(c.values())},[_]),g=r.default.useMemo(()=>{if(!_?.removed||_?.removed.size===0)return[];const c=new Set;return E(_.removed,c),Array.from(c.values())},[_]);return r.default.createElement("div",{className:m.default.variable_container},s.length>0&&r.default.createElement(r.default.Fragment,null,r.default.createElement("h3",null,(0,o.localize)("terminal.environment.changes")),s.map((c,h)=>r.default.createElement("p",{key:c+h,className:m.default.variable_change},c))),g.length>0&&r.default.createElement(r.default.Fragment,null,r.default.createElement("h3",null,(0,o.localize)("terminal.environment.removal")),g.map((c,h)=>r.default.createElement("p",{key:c+h,className:m.default.variable_change},c))))};t.TerminalVariable=p},48139:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(12784)),l=n.__importDefault(e(14041)),m=e(41869),E=e(26405),p=n.__importStar(e(92699)),_=n.__importDefault(e(73567)),s=n.__importDefault(e(76970));e(86650),t.default=()=>{const g=(0,m.useInjectable)(E.ITerminalController),c=(0,m.useInjectable)(E.ITerminalSearchService),h=(0,m.useInjectable)(E.ITerminalErrorService),u=(0,m.useInjectable)(E.ITerminalNetwork),d=l.default.useRef(null),v=l.default.useRef(null),f=(0,m.useInjectable)(E.ITerminalGroupViewService),a=(0,m.useAutorun)(f.currentGroupId),b=(0,m.useAutorun)(f.currentGroupIndex),y=(0,m.useAutorun)(f.groups);l.default.useEffect(()=>{const x=c.onVisibleChange(N=>{N&&d.current&&(d.current.focus(),d.current.value.length>0&&d.current.setSelectionRange(0,d.current.value.length))});return()=>x.dispose()},[c,d.current]);const[S,A]=l.default.useState(g.themeBackground);(0,m.useEventEffect)(g.onThemeBackgroundChange,x=>{A(x)});const[T,w]=l.default.useState(h.errors),D=(0,o.default)(()=>{w(h.errors)},m.FRAME_THREE);(0,m.useEventEffect)(h.onErrorsChange,D);const I=l.default.useCallback((x,N)=>{const j=g.findClientFromWidgetId(x.id);let K;return j?K=u.shouldReconnect(j.id)?void 0:T.get(j.id):K=T.get(x.id),l.default.createElement(s.default,{show:b===N,error:K,widget:x})},[b,g,T,u,f]),[O,P]=l.default.useState(c.isVisible);(0,m.useEventEffect)(c.onVisibleChange,x=>{P(x)});const[R,M]=l.default.useState(""),k=l.default.useCallback(x=>{c.text=x.target.value,c.search(),M(x.target.value)},[c]),B=l.default.useCallback(x=>{x.key==="Enter"&&c.search(),x.key==="Escape"&&(c.close(),c.clear())},[c]);return l.default.useEffect(()=>{v.current&&(g.initContextKey(v.current),g.viewReady.resolve())},[v.current]),l.default.createElement("div",{ref:v,className:_.default.terminalWrapper,style:{backgroundColor:S},"data-group-current":a},O&&l.default.createElement("div",{className:_.default.terminalSearch},l.default.createElement("div",{className:"kt-input-box"},l.default.createElement("input",{autoFocus:!0,ref:d,placeholder:(0,m.localize)("common.find"),value:R,onChange:k,onKeyDown:B})),l.default.createElement("div",{className:(0,r.default)(_.default.closeBtn,(0,m.getIcon)("close")),onClick:()=>c.close()})),y.map((x,N)=>{if(x.activated.get())return l.default.createElement("div",{"data-group-rendered":x.activated.get(),key:`terminal-${x.id}`,style:{display:b===N?"block":"none"},className:_.default.group,onFocus:g.focus.bind(g),onBlur:g.blur.bind(g),onContextMenu:g.onContextMenu.bind(g)},l.default.createElement(p.default,{shadow:!1,useFlex:!1,direction:p.ResizeDirection.horizontal,group:x,draw:j=>I(j,N)}))}))}},76970:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(26405),m=n.__importDefault(e(73567));function E(p,_,s){const g=()=>{s.removeWidget(p.id)},c=()=>{_.fix(p.id)};return p?.type===l.ETerminalErrorType.CREATE_FAIL?r.default.createElement("div",{className:m.default.terminalCover},r.default.createElement("div",null,(0,o.localize)("terminal.can.not.create"),": ",p.message),r.default.createElement("div",null,r.default.createElement("a",{onClick:g},(0,o.localize)("terminal.stop")),(0,o.localize)("terminal.or"),r.default.createElement("a",{onClick:c},(0,o.localize)("terminal.try.recreate")))):p.stopped?r.default.createElement("div",{className:m.default.terminalCover},r.default.createElement("div",null,(0,o.localize)("terminal.disconnected")),r.default.createElement("div",null,(0,o.localize)("terminal.can.not.reconnect"),r.default.createElement("a",{onClick:c},(0,o.localize)("terminal.try.reconnect")))):r.default.createElement("div",{className:m.default.terminalCover},r.default.createElement("div",null,(0,o.localize)("terminal.disconnected")),r.default.createElement("div",null,r.default.createElement("a",{onClick:g},(0,o.localize)("terminal.stop")),(0,o.localize)("terminal.or"),r.default.createElement("a",{onClick:c},(0,o.localize)("terminal.try.reconnect"))))}t.default=({widget:p,error:_,show:s})=>{const g=r.default.useRef(null),c=(0,o.useInjectable)(l.ITerminalErrorService),h=(0,o.useInjectable)(l.ITerminalGroupViewService);r.default.useEffect(()=>{g.current&&(p.element=g.current)},[]),r.default.useEffect(()=>{p.show=s},[s]),r.default.useEffect(()=>{p.error=!!_},[_]);const u=()=>{h.selectWidget(p.id)};return r.default.createElement("div",{className:m.default.terminalContainer},_?E(_,c,h):null,r.default.createElement("div",{"data-term-id":p.id,style:{display:_?"none":"block"},className:m.default.terminalContent,onFocus:u,ref:g}))}},21623:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(71852),t),n.__exportStar(e(43397),t),n.__exportStar(e(7082),t),n.__exportStar(e(11476),t),n.__exportStar(e(63341),t),n.__exportStar(e(96051),t),n.__exportStar(e(79404),t)},71852:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalCommandContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(63067),m=e(26405),E=e(48520),p=e(35628),_=e(94620);let s=class{onReconnect(){this.terminalController.reconnect()}onDisposeSideEffects(){}setDefaultTerminalType(c){this.preference.update("terminal.type",c)}registerCommands(c){c.registerCommand({...o.TERMINAL_COMMANDS.OPEN_SEARCH,iconClass:(0,o.getIcon)("search")},{execute:()=>{if(this.search.isVisible){this.search.close();return}this.search.open()}}),c.registerCommand({...o.TERMINAL_COMMANDS.SPLIT,iconClass:(0,o.getIcon)("embed")},{execute:()=>{const h=this.view.currentGroup.get();if(!h)return;const u=this.view.createWidget(h);this.view.selectWidget(u.id)}}),c.registerCommand(o.TERMINAL_COMMANDS.CLEAR,{execute:()=>{this.view.clear()}}),c.registerCommand(o.TERMINAL_COMMANDS.ADD,{execute:async()=>{await this.terminalController.createTerminalWithWidget({}),this.terminalController.showTerminalPanel()}}),c.registerCommand(o.TERMINAL_COMMANDS.TOGGLE_TERMINAL,{execute:()=>{this.terminalController.toggleTerminalPanel()}}),c.registerCommand(o.TERMINAL_COMMANDS.SEARCH_NEXT,{execute:()=>{this.search.isVisible?this.search.search():this.search.open()}}),c.registerCommand({...o.TERMINAL_COMMANDS.REMOVE,iconClass:(0,o.getIcon)("delete")},{execute:async()=>{const h=this.view.currentWidgetId.get();h&&this.view.removeWidget(h)}}),c.registerCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH,{execute:async h=>{h&&(await this.terminalApi.createTerminal({cwd:h.codeUri.fsPath})).show()}}),c.registerCommand(o.TERMINAL_COMMANDS.TAB_RENAME,{execute:async(h,u)=>{const d=this.view.getGroup(u);d&&d.edit()}}),c.registerCommand({...o.TERMINAL_COMMANDS.SELECT_ALL_CONTENT},{execute:()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.selectAll()}}),c.registerCommand({...o.TERMINAL_COMMANDS.CLEAR_CONTENT,iconClass:(0,o.getIcon)("clear")},{execute:()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.clear()}}),c.registerCommand({...o.TERMINAL_COMMANDS.CLEAR_ALL_CONTENT},{execute:()=>{this.terminalController.clearAllGroups()}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_ZSH,{execute:async()=>{this.setDefaultTerminalType("zsh")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_BASH,{execute:async()=>{this.setDefaultTerminalType("bash")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_SH,{execute:async()=>{this.setDefaultTerminalType("sh")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_POWERSHELL,{execute:async()=>{this.setDefaultTerminalType("powershell")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_CMD,{execute:async()=>{this.setDefaultTerminalType("cmd")}}),c.registerCommand(o.TERMINAL_COMMANDS.MORE_SETTINGS,{execute:async()=>{this.commands.executeCommand(o.COMMON_COMMANDS.OPEN_PREFERENCES.id,"terminal")}}),c.registerCommand(o.TERMINAL_COMMANDS.COPY,{execute:async()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&await this.clipboardService.writeText(u.getSelection())}}),c.registerCommand(o.TERMINAL_COMMANDS.PASTE,{execute:async()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.paste(await this.clipboardService.readText())}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_ALL,{execute:()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.selectAll()}}),c.registerCommand(o.TERMINAL_COMMANDS.RE_LAUNCH,{execute:()=>{const h=this.view.groups.get();for(const u of h)u.widgets.get().forEach(v=>{const f=this.terminalController.findClientFromWidgetId(v.id);f&&f.reset()})}}),c.registerCommand(o.COMMON_COMMANDS.ENVIRONMENT_VARIABLE,{execute:async()=>await this.terminalEnvironmentService.getProcessEnv()}),c.registerCommand(o.TERMINAL_COMMANDS.FOCUS_NEXT_TERMINAL,{execute:()=>{const h=this.view.currentGroup.get();if(h&&h.widgets.get().length<=1)return;const u=this.getNextOrPrevTerminalClient("next");u?.focus()}}),c.registerCommand(o.TERMINAL_COMMANDS.FOCUS_PREVIOUS_TERMINAL,{execute:()=>{const h=this.view.currentGroup.get();if(h&&h.widgets.get().length<=1)return;const u=this.getNextOrPrevTerminalClient("prev");u?.focus()}}),c.registerCommand(o.TERMINAL_COMMANDS.KILL_PROCESS,{execute:async()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);if(u){const d=u.getSelection();d&&d.length>0?await this.clipboardService.writeText(u.getSelection()):await this.terminalApi.sendText(h,"")}}})}getNextOrPrevTerminalClient(c){const h=this.view.currentGroup.get();if(!h)return;const u=h.widgets.get(),d=u.findIndex(a=>a.id===this.view.currentWidgetId.get());let v;c==="next"?v=d===u.length-1?0:d+1:v=d===0?u.length-1:d-1;const f=u[v];return this.terminalController.findClientFromWidgetId(f.id)}};t.TerminalCommandContribution=s,n.__decorate([(0,r.Autowired)(m.ITerminalController),n.__metadata("design:type",Object)],s.prototype,"terminalController",void 0),n.__decorate([(0,r.Autowired)(_.EnvironmentVariableServiceToken),n.__metadata("design:type",E.TerminalEnvironmentService)],s.prototype,"terminalEnvironmentService",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalGroupViewService),n.__metadata("design:type",Object)],s.prototype,"view",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalSearchService),n.__metadata("design:type",Object)],s.prototype,"search",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalRestore),n.__metadata("design:type",Object)],s.prototype,"store",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalApiService),n.__metadata("design:type",Object)],s.prototype,"terminalApi",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],s.prototype,"preference",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],s.prototype,"settingService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],s.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(l.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"mainlayoutService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],s.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.TerminalKeyBoardInputService)],s.prototype,"terminalInput",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],s.prototype,"clipboardService",void 0),t.TerminalCommandContribution=s=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ClientAppContribution)],s)},63341:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalKeybindingContribution=void 0;const n=e(85608),r=e(41869),o=e(66e3),l=e(40191),m=e(43718);let E=class{registerKeybindings(_){_.registerKeybinding({command:r.TERMINAL_COMMANDS.OPEN_SEARCH.id,keybinding:"ctrlcmd+f",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.CLEAR_CONTENT.id,keybinding:"ctrlcmd+k",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.SEARCH_NEXT.id,keybinding:"ctrlcmd+g",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.COPY.id,keybinding:m.isWindows?"ctrlcmd+shift+c":"ctrlcmd+c",when:l.RawContextKey.and(o.IsTerminalFocused.raw,"locationProtocol != http")}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.KILL_PROCESS.id,keybinding:"ctrlcmd+c",when:l.RawContextKey.and(o.IsTerminalFocused.raw,"locationProtocol != http","isWindows")}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.PASTE.id,keybinding:m.isWindows?"ctrlcmd+shift+v":"ctrlcmd+v",when:l.RawContextKey.and(o.IsTerminalFocused.raw,"locationProtocol != http")}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.SPLIT.id,keybinding:"ctrlcmd+\\",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.ADD.id,keybinding:"ctrl+shift+`"}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_NEXT_TERMINAL.id,keybinding:"ctrlcmd+alt+right",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_NEXT_TERMINAL.id,keybinding:"ctrlcmd+alt+down",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_PREVIOUS_TERMINAL.id,keybinding:"ctrlcmd+alt+left",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_PREVIOUS_TERMINAL.id,keybinding:"ctrlcmd+alt+up",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.TOGGLE_TERMINAL.id,keybinding:"ctrl+`"})}};t.TerminalKeybindingContribution=E,t.TerminalKeybindingContribution=E=n.__decorate([(0,m.Domain)(r.KeybindingContribution)],E)},43397:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLifeCycleContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(63067),m=e(26405),E=e(94620),p=e(43395),_=e(35628);let s=class{initialize(){(0,p.registerTerminalColors)()}onStart(){this.terminalInput.listen(),this.environmentService.initEnvironmentVariableCollections()}onDidRender(){this.store.restore().then(()=>{this.terminalController.firstInitialize()})}onStop(){this.terminalController.disposeTerminalClients({isTaskExecutor:!0}),this.store.save()}};t.TerminalLifeCycleContribution=s,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.TerminalKeyBoardInputService)],s.prototype,"terminalInput",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalController),n.__metadata("design:type",Object)],s.prototype,"terminalController",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalRestore),n.__metadata("design:type",Object)],s.prototype,"store",void 0),n.__decorate([(0,r.Autowired)(E.EnvironmentVariableServiceToken),n.__metadata("design:type",Object)],s.prototype,"environmentService",void 0),t.TerminalLifeCycleContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,l.MainLayoutContribution)],s)},7082:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalMenuContribution=t.more2=t.more1Sub=t.more1=t.group=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(30144),m=e(93899),E=e(43718),p=e(26405);t.group="panel_menu",t.more1="more_1",t.more1Sub="more_1_sub",t.more2="more_2";let _=class{registerMenus(g){g.registerMenuItem(m.MenuId.TerminalTabContext,{command:{id:o.TERMINAL_COMMANDS.TAB_RENAME.id,label:(0,o.localize)("terminal.menu.rename")},order:1,group:t.group}),g.registerMenuItem(m.MenuId.TerminalTabContext,{command:{id:o.TERMINAL_COMMANDS.SPLIT.id,label:(0,o.localize)("terminal.menu.split")},order:2,group:t.group}),g.registerMenuItem(m.MenuId.TerminalTabContext,{command:{id:o.TERMINAL_COMMANDS.REMOVE.id,label:(0,o.localize)("terminal.menu.stopGroup")},order:3,group:t.group}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.COPY,group:"1_modify"}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.PASTE,group:"1_modify"}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.SELECT_ALL,group:"1_modify"}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.CLEAR_CONTENT,group:"1_modify"});const c=(0,o.getSlotLocation)("@opensumi/ide-terminal-next",this.config.layoutConfig),h=(0,o.getTabbarCtxKey)(c),u=(0,m.getTabbarCommonMenuId)(c),d=`${h} == ${l.TERMINAL_CONTAINER_ID}`;g.registerMenuItem(u,{command:o.TERMINAL_COMMANDS.CLEAR,order:1,group:t.more1,when:d}),g.registerMenuItem(u,{command:o.TERMINAL_COMMANDS.CLEAR_ALL_CONTENT,order:1,group:t.more1,when:d}),g.registerMenuItem(u,{label:(0,o.localize)("terminal.menu.selectType"),submenu:m.MenuId.TerminalDefaultTypeMenu,order:1,group:t.more2,when:d}),E.isWindows?g.registerMenuItems(m.MenuId.TerminalDefaultTypeMenu,[{command:o.TERMINAL_COMMANDS.SELECT_CMD,order:1,group:t.more1Sub,toggledWhen:"config.terminal.type == cmd",when:d},{command:o.TERMINAL_COMMANDS.SELECT_POWERSHELL,order:2,group:t.more1Sub,toggledWhen:"config.terminal.type == powershell",when:d}]):g.registerMenuItems(m.MenuId.TerminalDefaultTypeMenu,[{command:o.TERMINAL_COMMANDS.SELECT_ZSH,order:1,group:t.more1Sub,toggledWhen:"config.terminal.type == zsh",when:d},{command:o.TERMINAL_COMMANDS.SELECT_BASH,order:2,group:t.more1Sub,toggledWhen:"config.terminal.type == bash",when:d},{command:o.TERMINAL_COMMANDS.SELECT_SH,order:3,group:t.more1Sub,toggledWhen:"config.terminal.type == sh",when:d}]),g.registerMenuItem(u,{command:o.TERMINAL_COMMANDS.MORE_SETTINGS,order:1,group:t.more2,when:d})}};t.TerminalMenuContribution=_,n.__decorate([(0,r.Autowired)(p.ITerminalController),n.__metadata("design:type",Object)],_.prototype,"terminalController",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalGroupViewService),n.__metadata("design:type",Object)],_.prototype,"view",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalSearchService),n.__metadata("design:type",Object)],_.prototype,"search",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],_.prototype,"settingService",void 0),n.__decorate([(0,r.Autowired)(E.CommandService),n.__metadata("design:type",Object)],_.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preference",void 0),t.TerminalMenuContribution=_=n.__decorate([(0,E.Domain)(m.MenuContribution)],_)},96051:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNetworkContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(26405);let E=class extends l.WithEventBus{onStart(){this.network.bindErrors()}handleBrowserConnectionOpen(_){this.network.setStatus(m.TerminalNetworkStatus.CONNECTED)}handleBrowserConnectionClose(_){this.network.setStatus(m.TerminalNetworkStatus.DISCONNECTED)}};t.TerminalNetworkContribution=E,n.__decorate([(0,r.Autowired)(m.ITerminalNetwork),n.__metadata("design:type",Object)],E.prototype,"network",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalInternalService),n.__metadata("design:type",Object)],E.prototype,"service",void 0),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.BrowserConnectionOpenEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"handleBrowserConnectionOpen",null),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.BrowserConnectionCloseEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"handleBrowserConnectionClose",null),t.TerminalNetworkContribution=E=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],E)},79404:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalPreferenceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(26405),E=e(3276),p=e(91815);let _=class{constructor(){this.schema=E.terminalPreferenceSchema;const g=["git-bash","powershell","cmd","default"],{properties:{["terminal.type"]:c}}={...E.terminalPreferenceSchema};this.ptyTerminal.getOS().then(h=>{h===l.OperatingSystem.Windows&&this.preferenceSchemaProvider.setSchema({properties:{"terminal.type":{...c,enum:g}}},!0)})}};t.TerminalPreferenceContribution=_,n.__decorate([(0,r.Autowired)(m.ITerminalService),n.__metadata("design:type",p.NodePtyTerminalService)],_.prototype,"ptyTerminal",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],_.prototype,"preferenceSchemaProvider",void 0),t.TerminalPreferenceContribution=_=n.__decorate([(0,l.Domain)(o.PreferenceContribution),n.__metadata("design:paramtypes",[])],_)},11476:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalRenderContribution=void 0;const r=e(85608),o=e(41869),l=e(30144),m=r.__importDefault(e(17632)),E=r.__importDefault(e(48139));let p=n=class{registerToolbarItems(s){s.registerItem({id:o.TERMINAL_COMMANDS.OPEN_SEARCH.id,command:o.TERMINAL_COMMANDS.OPEN_SEARCH.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.search")}),s.registerItem({id:o.TERMINAL_COMMANDS.CLEAR_CONTENT.id,command:o.TERMINAL_COMMANDS.CLEAR_CONTENT.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.menu.clearCurrentContent")}),s.registerItem({id:o.TERMINAL_COMMANDS.SPLIT.id,command:o.TERMINAL_COMMANDS.SPLIT.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.split")}),s.registerItem({id:o.TERMINAL_COMMANDS.REMOVE.id,command:o.TERMINAL_COMMANDS.REMOVE.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.remove")})}registerComponent(s){s.register("@opensumi/ide-terminal-next",{component:E.default,id:n.viewId},{title:(0,o.localize)("terminal.name"),priority:1,activateKeyBinding:"ctrl+`",containerId:n.viewId,titleComponent:m.default})}};t.TerminalRenderContribution=p,p.viewId=l.TERMINAL_CONTAINER_ID,t.TerminalRenderContribution=p=n=r.__decorate([(0,o.Domain)(o.ComponentContribution,o.TabBarToolbarContribution)],p)},17236:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNextModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26405),m=e(94620),E=e(3276),p=e(21623),_=e(98944),s=e(69061),g=e(7734),c=e(48520),h=e(102),u=e(53891),d=e(82022),v=e(12642),f=e(13663),a=e(89570),b=e(94486),y=e(46666),S=e(70406),A=e(12894),T=e(91815),w=e(29041),D=e(68611);let I=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.TerminalLifeCycleContribution,p.TerminalRenderContribution,p.TerminalCommandContribution,p.TerminalMenuContribution,p.TerminalKeybindingContribution,p.TerminalNetworkContribution,p.TerminalPreferenceContribution,{token:l.ITerminalApiService,useClass:_.TerminalApiService},{token:l.ITerminalController,useClass:g.TerminalController},{token:l.ITerminalTheme,useClass:w.TerminalTheme},{token:l.ITerminalSearchService,useClass:A.TerminalSearchService},{token:l.ITerminalHoverManagerService,useClass:u.TerminalHoverManagerService},{token:l.ITerminalGroupViewService,useClass:D.TerminalGroupViewService},{token:l.ITerminalErrorService,useClass:h.TerminalErrorService},{token:l.ITerminalService,useClass:T.NodePtyTerminalService},{token:l.ITerminalInternalService,useClass:d.TerminalInternalService},{token:l.ITerminalRestore,useClass:S.TerminalRestore},{token:E.ITerminalPreference,useClass:f.TerminalPreference},{token:l.ITerminalRenderProvider,useClass:y.TerminalRenderProvider},{token:l.ITerminalClientFactory2,useFactory:s.createTerminalClientFactory2},{token:l.ITerminalNetwork,useClass:v.TerminalNetworkService},{token:m.EnvironmentVariableServiceToken,useClass:c.TerminalEnvironmentService},{token:l.ITerminalProfileService,useClass:a.TerminalProfileService},{token:l.ITerminalProfileInternalService,useClass:b.TerminalProfileInternalService}],this.backServices=[{servicePath:l.ITerminalServicePath,clientToken:l.ITerminalService},{servicePath:l.ITerminalProcessPath,clientToken:m.EnvironmentVariableServiceToken}]}};t.TerminalNextModule=I,t.TerminalNextModule=I=n.__decorate([(0,r.Injectable)()],I)},67245:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalBaseLinkProvider=void 0;class e{async provideLinks(r,o){var l;(l=this._activeLinks)===null||l===void 0||l.forEach(m=>m.dispose),this._activeLinks=await this._provideLinks(r),o(this._activeLinks)}}t.TerminalBaseLinkProvider=e},52826:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalExternalLinkProviderAdapter=void 0;const n=e(85608),r=e(76003),o=e(67245),l=e(28247),m=e(97144);let E=class extends o.TerminalBaseLinkProvider{constructor(_,s,g,c,h){super(),this._xterm=_,this._instance=s,this._externalLinkProvider=g,this._wrapLinkHandler=c,this._tooltipCallback=h}async _provideLinks(_){var s,g;let c=_-1,h=c;const u=[this._xterm.buffer.active.getLine(c)];for(;c>=0&&(!((s=this._xterm.buffer.active.getLine(c))===null||s===void 0)&&s.isWrapped);)u.unshift(this._xterm.buffer.active.getLine(c-1)),c--;for(;h<this._xterm.buffer.active.length&&(!((g=this._xterm.buffer.active.getLine(h+1))===null||g===void 0)&&g.isWrapped);)u.push(this._xterm.buffer.active.getLine(h+1)),h++;const d=(0,l.getXtermLineContent)(this._xterm.buffer.active,c,h,this._xterm.cols);if(d.trim().length===0)return[];const v=await this._externalLinkProvider.provideLinks(this._instance,d);return v?v.map(f=>{const a=(0,l.convertLinkRangeToBuffer)(u,this._xterm.cols,{startColumn:f.startIndex+1,startLineNumber:1,endColumn:f.startIndex+f.length+1,endLineNumber:1},c),b=d.substr(f.startIndex,f.length)||"",y=this._wrapLinkHandler((S,A)=>f.activate(A));return this.injector.get(m.TerminalLink,[this._xterm,a,b,this._xterm.buffer.active.viewportY,y,this._tooltipCallback,!0,f.label])}):[]}};t.TerminalExternalLinkProviderAdapter=E,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],E.prototype,"injector",void 0),t.TerminalExternalLinkProviderAdapter=E=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Object,Object,Function,Function])],E)},28247:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertLinkRangeToBuffer=e,t.convertBufferRangeToViewport=n,t.getXtermLineContent=r,t.positionIsInRange=o;function e(l,m,E,p){const _={start:{x:E.startColumn,y:E.startLineNumber+p},end:{x:E.endColumn-1,y:E.endLineNumber+p}};let s=0;const g=Math.ceil(E.startColumn/m);for(let u=0;u<Math.min(g);u++){const d=Math.min(m,E.startColumn-u*m);let v=0;const f=l[u];if(!f)break;for(let a=0;a<Math.min(m,d+v);a++){const b=f.getCell(a);b.getWidth()===2&&v++;const S=b.getChars();S.length>1&&(v-=S.length-1)}s+=v}let c=0;const h=Math.ceil(E.endColumn/m);for(let u=Math.max(0,g-1);u<h;u++){const d=u===g-1?(E.startColumn+s)%m:0,v=Math.min(m,E.endColumn+s-u*m),f=u===g-1?s:0;let a=0;const b=l[u];if(!b)break;for(let y=d;y<Math.min(m,v+a+f);y++){const S=b.getCell(y);S.getWidth()===2&&a++,y===m-1&&S.getChars()===""&&a++}c+=a}for(_.start.x+=s,_.end.x+=s+c;_.start.x>m;)_.start.x-=m,_.start.y++;for(;_.end.x>m;)_.end.x-=m,_.end.y++;return _}function n(l,m){return{start:{x:l.start.x-1,y:l.start.y-m-1},end:{x:l.end.x-1,y:l.end.y-m-1}}}function r(l,m,E,p){let _="";for(let s=m;s<=E;s++){const g=l.getLine(s);g&&(_+=g.translateToString(!0,0,p))}return _}function o(l,m){return!(l.y<m.start.y||l.y>m.end.y||l.y===m.start.y&&l.x<m.start.x||l.y===m.end.y&&l.x>m.end.x)}},29970:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLinkManager=void 0;const n=e(85608),r=e(87083),o=e(76003),l=e(41869),m=e(43718),E=e(23418),p=e(14951),_=e(26405),s=e(69061),g=e(52826),c=e(11192),h=e(73481),{posix:u,win32:d}=m.path;let v=class extends m.Disposable{constructor(a,b){super(),this._xterm=a,this._client=b,this._standardLinkProviders=[],this._standardLinkProvidersDisposables=new m.DisposableCollection;const y=this._wrapLinkHandler((w,D)=>this._handleProtocolLink(D)),S=this.injector.get(c.TerminalProtocolLinkProvider,[this._xterm,y,this._tooltipCallback.bind(this)]);this._standardLinkProviders.push(S);const A=this._wrapLinkHandler((w,D)=>this._handleLocalLink(D)),T=this.injector.get(h.TerminalValidatedLocalLinkProvider,[this._xterm,this._client,A,this._wrapLinkHandler.bind(this),this._tooltipCallback.bind(this),async(w,D)=>D(await this._resolvePath(w))]);this._standardLinkProviders.push(T),this._registerStandardLinkProviders()}set processCwd(a){this._processCwd=a}async getTerminalCwd(){return await this.terminalService.getCwd(this._client.id)||this._processCwd}_registerStandardLinkProviders(){this._standardLinkProvidersDisposables.dispose(),this._standardLinkProvidersDisposables=new m.DisposableCollection;for(const a of this._standardLinkProviders)this._standardLinkProvidersDisposables.push(this._xterm.registerLinkProvider(a))}_tooltipCallback(a,b,y,S){const A=this._xterm._core,T={width:A._renderService.dimensions.actualCellWidth,height:A._renderService.dimensions.actualCellHeight},w={width:this._xterm.cols,height:this._xterm.rows},D=A.element.getBoundingClientRect();return this._showHover({viewportRange:b,cellDimensions:T,terminalDimensions:w,boundingClientRect:D,modifierDownCallback:y,modifierUpCallback:S},this._getLinkHoverString(a.text,a.label),I=>a.activate(void 0,I),a)}_showHover(a,b,y,S){const A=this._hoverManager.showHover(a,b,y);return S?.onInvalidated(()=>A.dispose()),m.Disposable.create(()=>A.dispose())}registerExternalLinkProvider(a,b){const y=this.injector.get(g.TerminalExternalLinkProviderAdapter,[this._xterm,a,b,this._wrapLinkHandler.bind(this),this._tooltipCallback.bind(this)]),S=this._xterm.registerLinkProvider(y);return this._registerStandardLinkProviders(),S}_wrapLinkHandler(a){return async(b,y)=>{b?.preventDefault(),!(b&&!this._isLinkActivationModifierDown(b))&&a(b,y)}}get _localLinkRegex(){const a=this._client.os===m.OperatingSystem.Windows?h.winLocalLinkClause:h.unixLocalLinkClause;return new RegExp(`${a}(${h.lineAndColumnClause})`)}async _handleLocalLink(a){const b=await this._resolvePath(a);if(!b)return;const y=this.extractLineColumnInfo(a),S={startLineNumber:y.lineNumber,endLineNumber:y.lineNumber,startColumn:y.columnNumber,endColumn:y.columnNumber};await this._editorService.open(b.uri,{range:S})}_handleHypertextLink(a){this._openerService.open(a)}async _handleProtocolLink(a){const b=m.URI.parse(a);if(b.scheme===m.Schemes.file){const y=m.FileUri.fsPath(b);this._handleLocalLink(this._client.os!==m.OperatingSystem.Windows&&m.isWindows?y.replace(/\\/g,u.sep):y);return}this._handleHypertextLink(a)}_isLinkActivationModifierDown(a){return m.isOSX?a.metaKey:a.ctrlKey}get osPath(){return this._client.os===m.OperatingSystem.Windows?d:u}_getLinkHoverString(a,b){const y=this.preferenceService.get("editor.multiCursorModifier");let S="";y==="ctrlCmd"?m.isMacintosh?S=(0,m.localize)("terminalLinkHandler.followLinkAlt.mac","option + click"):S=(0,m.localize)("terminalLinkHandler.followLinkAlt","alt + click"):m.isMacintosh?S=(0,m.localize)("terminalLinkHandler.followLinkCmd","cmd + click"):S=(0,m.localize)("terminalLinkHandler.followLinkCtrl","ctrl + click");const A=(0,m.localize)("followLink","Follow link");return b=b||A,`${b} (${S})`}async _getUserHomeDir(){const a=await this._fileSystem.getCurrentUserHome();if(!a)throw new Error("Unable to get user home directory");return await this._fileSystem.getFsPath(a.uri)}_getUserHomeDirOnce(){return this._getHomeDirPromise||(this._getHomeDirPromise=this._getUserHomeDir()),this._getHomeDirPromise}async _preprocessPath(a){if(a.charAt(0)==="~"){const b=await this._getUserHomeDirOnce();if(!b)return null;a=this.osPath.join(b,a.substring(1))}else if(a.charAt(0)!=="/"&&a.charAt(0)!=="~"){const b=await this.getTerminalCwd();if(this._client.os===m.OperatingSystem.Windows)if(!a.match("^"+h.winDrivePrefix)&&!a.startsWith("\\\\?\\")){if(!b)return null;a=this.osPath.join(b,a)}else a=a.replace(/^\\\\\?\\/,"");else{if(!b)return null;a=this.osPath.join(b,a)}}return a=this.osPath.normalize(a),a}async _resolvePath(a){const b=await this._preprocessPath(a);if(b)try{const y=m.URI.file(b),S=await this._fileService.getFileStat(y.toString());if(S)return{uri:y,isDirectory:S.isDirectory}}catch{return}}extractLineColumnInfo(a){const b=this._localLinkRegex.exec(a),y={lineNumber:1,columnNumber:1};if(!b)return y;const S=this._client.os===m.OperatingSystem.Windows?h.winLineAndColumnMatchIndex:h.unixLineAndColumnMatchIndex;for(let A=0;A<h.lineAndColumnClause.length;A++){const T=S+h.lineAndColumnClauseGroupCount*A,w=b[T];if(w){y.lineNumber=parseInt(w,10);const D=b[T+2];D&&(y.columnNumber=parseInt(D,10));break}}return y}extractLinkUrl(a){const b=this._localLinkRegex.exec(a);return b?b[1]:null}};t.TerminalLinkManager=v,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],v.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(_.ITerminalService),n.__metadata("design:type",Object)],v.prototype,"terminalService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",E.WorkbenchEditorService)],v.prototype,"_editorService",void 0),n.__decorate([(0,o.Autowired)(l.IOpenerService),n.__metadata("design:type",Object)],v.prototype,"_openerService",void 0),n.__decorate([(0,o.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"_fileService",void 0),n.__decorate([(0,o.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"_fileSystem",void 0),n.__decorate([(0,o.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(_.ITerminalHoverManagerService),n.__metadata("design:type",Object)],v.prototype,"_hoverManager",void 0),t.TerminalLinkManager=v=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[r.Terminal,s.TerminalClient])],v)},97144:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLink=t.FOLDER_NOT_IN_WORKSPACE_LABEL=t.FOLDER_IN_WORKSPACE_LABEL=t.OPEN_FILE_LABEL=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(28247),E=500;t.OPEN_FILE_LABEL=(0,l.localize)("terminal.openFile","Open file in editor"),t.FOLDER_IN_WORKSPACE_LABEL=(0,l.localize)("terminal.focusFolder","Focus folder in explorer"),t.FOLDER_NOT_IN_WORKSPACE_LABEL=(0,l.localize)("terminal.openFolder","Open folder in new window");let p=class extends l.Disposable{get onInvalidated(){return this._onInvalidated.event}constructor(s,g,c,h,u,d,v,f){super(),this._xterm=s,this.range=g,this.text=c,this._viewportY=h,this._activateCallback=u,this._tooltipCallback=d,this._isHighConfidenceLink=v,this.label=f,this._onInvalidated=new l.Emitter,this.decorations={pointerCursor:!1,underline:this._isHighConfidenceLink}}dispose(){var s,g,c;super.dispose(),(s=this._hoverListeners)===null||s===void 0||s.dispose(),this._hoverListeners=void 0,(g=this._tooltipScheduler)===null||g===void 0||g.dispose(),this._tooltipScheduler=void 0,(c=this._tooltipDisposable)===null||c===void 0||c.dispose(),this._tooltipDisposable=void 0}activate(s,g){this._activateCallback(s,g)}hover(s,g){this._hoverListeners=new l.DisposableCollection,this._hoverListeners.push((0,o.addDisposableListener)(document,"keydown",h=>{!h.repeat&&this._isModifierDown(h)&&this._enableDecorations()})),this._hoverListeners.push((0,o.addDisposableListener)(document,"keyup",h=>{!h.repeat&&!this._isModifierDown(h)&&this._disableDecorations()})),this._hoverListeners.push(this._xterm.onRender(h=>{const u=this.range.start.y-this._viewportY;u>=h.start&&u<=h.end&&this._onInvalidated.fire()})),this._isHighConfidenceLink&&(this._tooltipScheduler=new l.RunOnceScheduler(()=>{var h;this._tooltipDisposable=this._tooltipCallback(this,(0,m.convertBufferRangeToViewport)(this.range,this._viewportY),this._isHighConfidenceLink?()=>this._enableDecorations():void 0,this._isHighConfidenceLink?()=>this._disableDecorations():void 0),(h=this._tooltipScheduler)===null||h===void 0||h.dispose(),this._tooltipScheduler=void 0},this.preferenceService.get("editor.hover.delay")||E),this._tooltipScheduler.schedule());const c={x:s.pageX,y:s.pageY};this._hoverListeners.push((0,o.addDisposableListener)(document,"mousemove",h=>{var u;this._isModifierDown(h)?this._enableDecorations():this._disableDecorations(),(Math.abs(h.pageX-c.x)>window.devicePixelRatio*2||Math.abs(h.pageY-c.y)>window.devicePixelRatio*2)&&(c.x=h.pageX,c.y=h.pageY,(u=this._tooltipScheduler)===null||u===void 0||u.schedule())}))}leave(){var s,g,c;(s=this._hoverListeners)===null||s===void 0||s.dispose(),this._hoverListeners=void 0,(g=this._tooltipScheduler)===null||g===void 0||g.dispose(),this._tooltipScheduler=void 0,(c=this._tooltipDisposable)===null||c===void 0||c.dispose(),this._tooltipDisposable=void 0}_enableDecorations(){this.decorations.pointerCursor||(this.decorations.pointerCursor=!0),this.decorations.underline||(this.decorations.underline=!0)}_disableDecorations(){this.decorations.pointerCursor&&(this.decorations.pointerCursor=!1),this.decorations.underline!==this._isHighConfidenceLink&&(this.decorations.underline=this._isHighConfidenceLink)}_isModifierDown(s){return l.isOSX?s.metaKey:s.ctrlKey}};t.TerminalLink=p,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),t.TerminalLink=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Object,String,Number,Function,Function,Boolean,Object])],p)},11192:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProtocolLinkProvider=void 0;const n=e(85608),r=e(76003),o=e(26405),l=e(67245),m=e(28247),E=e(97144);let p=class extends l.TerminalBaseLinkProvider{constructor(g,c,h){super(),this._xterm=g,this._activateCallback=c,this._tooltipCallback=h}_provideLinks(g){var c,h;let u=g-1,d=u;const v=[this._xterm.buffer.active.getLine(u)];for(;u>=0&&(!((c=this._xterm.buffer.active.getLine(u))===null||c===void 0)&&c.isWrapped);)v.unshift(this._xterm.buffer.active.getLine(u-1)),u--;for(;d<this._xterm.buffer.active.length&&(!((h=this._xterm.buffer.active.getLine(d+1))===null||h===void 0)&&h.isWrapped);)v.push(this._xterm.buffer.active.getLine(d+1)),d++;return this._linkComputerTarget=new _(this._xterm,u,d),o.LinkComputer.computeLinks(this._linkComputerTarget).map(a=>{var b;const y=(0,m.convertLinkRangeToBuffer)(v,this._xterm.cols,a.range,u);return this.injector.get(E.TerminalLink,[this._xterm,y,((b=a.url)===null||b===void 0?void 0:b.toString())||"",this._xterm.buffer.active.viewportY,this._activateCallback,this._tooltipCallback,!0,void 0])})}};t.TerminalProtocolLinkProvider=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.TerminalProtocolLinkProvider=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Function,Function])],p);class _{constructor(g,c,h){this._xterm=g,this._lineStart=c,this._lineEnd=h}getLineCount(){return 1}getLineContent(){return(0,m.getXtermLineContent)(this._xterm.buffer.active,this._lineStart,this._lineEnd,this._xterm.cols)}}},73481:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalValidatedLocalLinkProvider=t.lineAndColumnClauseGroupCount=t.unixLineAndColumnMatchIndex=t.winLineAndColumnMatchIndex=t.lineAndColumnClause=t.winLocalLinkClause=t.winDrivePrefix=t.unixLocalLinkClause=void 0;const n=e(85608),r=e(76003),o=e(11050),l=e(66894),m=e(43718),E=e(97408),p=e(67245),_=e(28247),s=e(97144),g="(\\.\\.?|\\~)",c="\\/",h="[^\\0\\s!`&*()\\[\\]'\":;\\\\]";t.unixLocalLinkClause="(("+g+"|("+h+")+)?("+c+"("+h+")+)+)",t.winDrivePrefix="(?:\\\\\\\\\\?\\\\)?[a-zA-Z]:";const u="("+t.winDrivePrefix+"|\\.\\.?|\\~)",d="(\\\\|\\/)",v="[^\\0<>\\?\\|\\/\\s!`&*()\\[\\]'\":;]";t.winLocalLinkClause="(("+u+"|("+v+")+)?("+d+"("+v+")+)+)",t.lineAndColumnClause=[`((\\S*)['"], line ((\\d+)( column (\\d+))?))`,`((\\S*)['"],((\\d+)(:(\\d+))?))`,"((\\S*) on line ((\\d+)(, column (\\d+))?))","((\\S*):line ((\\d+)(, column (\\d+))?))","(([^\\s\\(\\)]*)(\\s?[\\(\\[](\\d+)(,\\s?(\\d+))?)[\\)\\]])",`(([^:\\s\\(\\)<>'"\\[\\]]*)(:(\\d+))?(:(\\d+))?)`].join("|").replace(/ /g,"[\xA0 ]"),t.winLineAndColumnMatchIndex=12,t.unixLineAndColumnMatchIndex=11,t.lineAndColumnClauseGroupCount=6;const f=2e3;let a=class extends p.TerminalBaseLinkProvider{constructor(y,S,A,T,w,D){super(),this._xterm=y,this._client=S,this._activateFileCallback=A,this._wrapLinkHandler=T,this._tooltipCallback=w,this._validationCallback=D}async _provideLinks(y){var S,A;const T=[];let w=y-1,D=w;const I=[this._xterm.buffer.active.getLine(w)];for(;w>=0&&(!((S=this._xterm.buffer.active.getLine(w))===null||S===void 0)&&S.isWrapped);)I.unshift(this._xterm.buffer.active.getLine(w-1)),w--;for(;D<this._xterm.buffer.active.length&&(!((A=this._xterm.buffer.active.getLine(D+1))===null||A===void 0)&&A.isWrapped);)I.push(this._xterm.buffer.active.getLine(D+1)),D++;const O=(0,_.getXtermLineContent)(this._xterm.buffer.active,w,D,this._xterm.cols);if(O.length>f)return[];const P=new RegExp(this._localLinkRegex,"g");let R,M=-1;for(;(R=P.exec(O))!==null;){let k=R[0];if(!k||(M=O.indexOf(k,M+1),P.lastIndex=M+k.length,M<0))break;((O.startsWith("--- a/")||O.startsWith("+++ b/"))&&M===4||O.startsWith("diff --git")&&(k.startsWith("a/")||k.startsWith("b/")))&&(k=k.substring(2),M+=2);const B=await this.detectLocalLink(k,I,w,M,1);B.length>0&&T.push(...B)}if(T.length===0){const k=await this.detectLocalLink(O,I,w,M,2);k.length>0&&T.push(...k)}return T}async detectLocalLink(y,S,A,T,w){const D=[],I=await new Promise(O=>{this._validationCallback(y,async P=>{if(P){const R=P.isDirectory?await this._isDirectoryInsideWorkspace(P.uri)?s.FOLDER_IN_WORKSPACE_LABEL:s.FOLDER_NOT_IN_WORKSPACE_LABEL:s.OPEN_FILE_LABEL,M=this._wrapLinkHandler((B,x)=>{P.isDirectory?this._handleLocalFolderLink(P.uri):this._activateFileCallback(B,x)}),k=(0,_.convertLinkRangeToBuffer)(S,this._xterm.cols,{startColumn:T+1,startLineNumber:1,endColumn:T+y.length+w,endLineNumber:1},A);O(this.injector.get(s.TerminalLink,[this._xterm,k,y,this._xterm.buffer.active.viewportY,M,this._tooltipCallback,!0,R]))}else O(void 0)})});return I&&D.push(I),D}get _localLinkRegex(){const y=this._client.os===m.OperatingSystem.Windows?t.winLocalLinkClause:t.unixLocalLinkClause;return new RegExp(`${y}(${t.lineAndColumnClause})`)}async _handleLocalFolderLink(y){if(await this._isDirectoryInsideWorkspace(y)){await this.commandService.executeCommand("revealInExplorer",y);return}this.appConfig.isElectronRenderer&&this.windowService.openWorkspace(y,{newWindow:!0})}async _isDirectoryInsideWorkspace(y){const S=await this.workspaceService.roots;for(const A of S)if(m.URI.parse(A.uri).isEqualOrParent(y))return!0;return!1}};t.TerminalValidatedLocalLinkProvider=a,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],a.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(l.IWindowService),n.__metadata("design:type",Object)],a.prototype,"windowService",void 0),n.__decorate([(0,r.Autowired)(m.CommandService),n.__metadata("design:type",Object)],a.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],a.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],a.prototype,"appConfig",void 0),t.TerminalValidatedLocalLinkProvider=a=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Function,Function,Function,Function,Function])],a)},62810:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_COL=t.DEFAULT_ROW=t.AttachAddon=void 0;const n=e(43718);class r extends n.Disposable{constructor(){super(...arguments),this._onData=new n.Emitter,this.onData=this._onData.event,this._onExit=new n.Emitter,this.onExit=this._onExit.event,this._onTime=new n.Emitter,this.onTime=this._onTime.event,this._lastInputTime=0,this._onBeforeProcessData=new n.Emitter,this.onBeforeProcessData=this._onBeforeProcessData.event}setConnection(l){this._disposeConnection&&(this._disposeConnection.dispose(),this._disposeConnection=null),this.connection=l,l&&(this._disposeConnection=new n.Disposable(l.onData(m=>{let E=m;if(typeof m=="string"){const p={data:m};this._onBeforeProcessData.fire(p),p.data!==void 0&&(E=p.data)}if(this._onData.fire(E),this._terminal.write(typeof E=="string"?E:new Uint8Array(E,0,E.byteLength)),this._lastInputTime){const p=Date.now()-this._lastInputTime;this._lastInputTime=0,this._onTime.fire(p)}})),l.onExit&&this._disposeConnection.addDispose(l.onExit(m=>{this._onExit.fire(m)})))}async activate(l){this._terminal=l,this.addDispose(n.Disposable.create(()=>{var m;return(m=this._disposeConnection)===null||m===void 0?void 0:m.dispose()})),this.addDispose(l.onData(m=>this._sendData(m))),this.addDispose(l.onBinary(m=>this._sendBinary(m)))}_sendData(l){!this.connection||this.connection.readonly||(this._timeResponse(),this.connection.sendData(l))}_sendBinary(l){if(!this.connection||this.connection.readonly)return;const m=new Uint8Array(l.length);for(let E=0;E<l.length;++E)m[E]=l.charCodeAt(E)&255;this._timeResponse(),this.connection.sendData(m)}_timeResponse(){this._lastInputTime=Date.now()}}t.AttachAddon=r,t.DEFAULT_ROW=80,t.DEFAULT_COL=24},98944:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalApiService=void 0;const n=e(85608),r=n.__importDefault(e(56005)),o=e(76003),l=e(43718),m=e(28423),E=e(26405);let p=class{constructor(){this._onDidOpenTerminal=new l.Emitter,this._onDidCloseTerminal=new l.Emitter,this._onDidTerminalTitleChange=new l.Emitter,this._onDidChangeActiveTerminal=new l.Emitter,this.onDidOpenTerminal=this._onDidOpenTerminal.event,this.onDidCloseTerminal=this._onDidCloseTerminal.event,this.onDidTerminalTitleChange=this._onDidTerminalTitleChange.event,this.onDidChangeActiveTerminal=this._onDidChangeActiveTerminal.event,this.controller.onDidOpenTerminal(s=>{this._onDidOpenTerminal.fire(s)}),this.controller.onDidCloseTerminal(s=>{this._onDidCloseTerminal.fire(s)}),this.controller.onDidTerminalTitleChange(s=>{this._onDidTerminalTitleChange.fire(s)}),this.controller.onDidChangeActiveTerminal(s=>{this._onDidChangeActiveTerminal.fire(s)})}get terminals(){return Array.from(this.controller.clients.values()).map(s=>({id:s.id,name:s.name,isActive:this.view.currentWidgetId.get()===s.id}))}async createTerminal(s,g){const c=await this.controller.createTerminalWithWidgetByTerminalOptions({terminalOptions:s,id:g}),h={get id(){return c.id},get name(){return c.name},get processId(){return c.pid},show:(u=!0)=>{const d=c.widget;this.view.selectWidget(d.id),this.controller.showTerminalPanel(),u||setTimeout(()=>c.focus())},hide:()=>{this.controller.hideTerminalPanel()},dispose:()=>{this.view.removeWidget(c.widget.id),this.controller.clients.delete(c.id)}};return await c.attached.promise,h.show(),h}async getProcessId(s){const g=this.controller.clients.get(s);if(g)return g.pid}async getDefaultShellPath(){const s=await this.terminalProfileInternalService.resolveDefaultProfile();return s?.path||"/bin/bash"}sendText(s,g,c=!0){this.service.sendText(s,`${g}${c?"\r":""}`)}showTerm(s,g=!0){const c=this.controller.clients.get(s);if(!c)return;const h=c.widget;this.view.selectWidget(h.id),this.controller.showTerminalPanel(),g||setTimeout(()=>c.focus())}hideTerm(s){this.controller.clients.get(s)&&this.controller.hideTerminalPanel()}removeTerm(s){const g=this.controller.clients.get(s);g&&(this.view.removeWidget(g.widget.id),this.controller.clients.delete(s))}createWidget(s,g){const c=s,h=this.view.createGroup(),u=this.view.getGroup(h),d=this.view.createWidget(u,c,!1,!0);return(0,m.transaction)(v=>{d.name.set((0,r.default)(s),v)}),this.view.selectWidget(c),d.onRender(()=>{g(d.element)}),d}scheduleReconnection(){return this.network.scheduleReconnection()}};t.TerminalApiService=p,n.__decorate([(0,o.Autowired)(E.ITerminalController),n.__metadata("design:type",Object)],p.prototype,"controller",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalGroupViewService),n.__metadata("design:type",Object)],p.prototype,"view",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalInternalService),n.__metadata("design:type",Object)],p.prototype,"service",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalNetwork),n.__metadata("design:type",Object)],p.prototype,"network",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalProfileInternalService),n.__metadata("design:type",Object)],p.prototype,"terminalProfileInternalService",void 0),t.TerminalApiService=p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p)},69061:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.createTerminalClientFactory2=t.TerminalClientFactory=t.TerminalClient=void 0;const r=e(85608),o=e(76003),l=e(41869),m=e(67889),E=e(43718),p=e(23418),_=e(42933),s=e(28423),g=e(72665),c=e(88913),h=e(10560),u=e(26405),d=e(94620),v=e(3276),f=e(29970),a=e(62810),b=e(90853),y=e(35628),S=e(70845),A=e(41685);let T=n=class extends E.Disposable{constructor(){super(),this.isTaskExecutor=!1,this._ready=!1,this._hasOutput=!1,this._areLinksReady=!1,this._onInput=new E.Emitter,this.onInput=this._onInput.event,this._onOutput=new E.Emitter,this.onOutput=this._onOutput.event,this._onExit=new E.Emitter,this.onExit=this._onExit.event,this._onTitleChange=new E.Emitter,this.onTitleChange=this._onTitleChange.event,this._onLinksReady=new E.Emitter,this.onLinksReady=this._onLinksReady.event,this._onResponseTime=new E.Emitter,this.onResponseTime=this._onResponseTime.event,this._onNameChangeEmitter=new E.Emitter,this.onNameChange=this._onNameChangeEmitter.event,this._name="",this.init()}async init(){this.xterm=this.injector.get(A.XTerm,[{xtermOptions:{theme:this.theme.terminalTheme,...this.internalService.getOptions(),...this.terminalPreference.toJSON()}}]),this.addDispose(this.xterm),this.addDispose(this.internalService.onError(O=>{var P;this.messageService.error(O.message),!((P=O.launchConfig)===null||P===void 0)&&P.executable?this.updateTerminalName({name:"error: "+O.launchConfig.executable}):this.updateTerminalName({name:"error"})})),this.addDispose(this.internalService.onProcessChange(O=>{O.sessionId===this.id&&(0,s.transaction)(P=>{this.widget.processName.set(O.processName,P)})}))}onWidgetShow(){this._show&&(this._show.resolve(),this._show=null),this._layout()}async setupWidget(O){this._widget=O,this._prepare(),this.addDispose(E.Disposable.create(()=>{n.WORKSPACE_PATH_CACHED.delete(O.group.id)})),this.addDispose(this.terminalPreference.onChange(async({name:P,value:R})=>{!O.show&&!this._show&&(this._show=new E.Deferred),this._show&&await this._show.promise,this._setOption(P,R),this.xterm.updatePreferences({[P]:R})})),O.show?this.onWidgetShow():this.addDispose(O.onShow(P=>{P&&this.onWidgetShow()})),this.addDispose(O.onError(P=>{var R;P||((R=this._error)===null||R===void 0||R.resolve(),this._layout())})),this.addDispose(O.onResize(async()=>{this._debounceResize()}))}async init2(O,P){var R,M,k,B;if(this._uid=P?.id||O.id,this.setupWidget(O),!P||Object.keys(P).length===0){const j=await this.terminalProfileInternalService.resolveDefaultProfile();P={id:this._uid,config:j}}if(!P.cwd){const K=O.group.widgets.get();if(K.length>1&&K[0]){const U=await this.internalService.getCwd(K[0].id);U&&(P.cwd=U)}}await this._checkWorkspace();const x=(k=(R=P.cwd)!==null&&R!==void 0?R:(M=P?.config)===null||M===void 0?void 0:M.cwd)!==null&&k!==void 0?k:this._workspacePath,N=this.controller.convertProfileToLaunchConfig(P.config,x);this._launchConfig=N,this._launchConfig.__fromTerminalOptions&&(this._terminalOptions=this._launchConfig.__fromTerminalOptions),this.name=N.name||"",N.initialText&&this.xterm.raw.writeln(N.initialText),N.env||(N.env={}),(B=this.environmentService.mergedCollection)===null||B===void 0||B.applyToProcessEnvironment(N.env,this.applicationService.backendOS,this.variableResolver.resolve.bind(this.variableResolver)),this.addDispose(this.environmentService.onDidChangeCollections(j=>{j.applyToProcessEnvironment(N.env,this.applicationService.backendOS,this.variableResolver.resolve.bind(this.variableResolver))})),this._attachXterm(),this._attachAfterRender()}get name(){return this._name}set name(O){this._name!==O&&(this._name=O,this._onNameChangeEmitter.fire(O))}get term(){return this.xterm.raw}get pid(){return this.internalService.getProcessId(this.id)}get launchConfig(){return this._launchConfig}get createOptions(){}get container(){return this.xterm.container}get id(){return this._uid}get widget(){return this._widget}get ready(){return this._ready}get attached(){return this._attached}get firstOutput(){return this._firstStdout}get show(){return this._show}get areLinksReady(){return this._areLinksReady}get os(){return this._os}_prepareAddons(){this._attachAddon=new a.AttachAddon;const O=this._attachAddon.onBeforeProcessData;if(this.preferenceService.get("terminal.integrated.localEchoEnabled")){const P=this.preferenceService.get("terminal.integrated.localEchoExcludePrograms",S.DEFAULT_LOCAL_ECHO_EXCLUDE),R=new S.TypeAheadAddon(O,{localEchoExcludePrograms:Array.isArray(P)?P:S.DEFAULT_LOCAL_ECHO_EXCLUDE,localEchoLatencyThreshold:this.preferenceService.get("terminal.integrated.localEchoLatencyThreshold",30),localEchoStyle:this.preferenceService.get("terminal.integrated.localEchoStyle","dim")},this.preferenceService.onPreferenceChanged);this.addDispose(R),this.xterm.raw.loadAddon(R)}this.addDispose([this._attachAddon,this._attachAddon.onData(P=>{this._onOutput.fire({id:this.id,data:P})}),this._attachAddon.onExit(P=>{var R,M;this.logger.warn(`${this.id} ${this.name} exit with ${P}`),P!==0&&this.messageService.error(`terminal ${this.name}(${(M=(R=this._attachAddon.connection)===null||R===void 0?void 0:R.ptyInstance)===null||M===void 0?void 0:M.shellPath}) exited with non-zero code ${P}`),this._onExit.fire({id:this.id,code:P})}),this._attachAddon.onTime(P=>{this._onResponseTime.fire(P),this.reporter.performance(E.REPORT_NAME.TERMINAL_MEASURE,{duration:P,msg:"terminal.response"})})]),this.xterm.raw.loadAddon(this._attachAddon)}_xtermEvents(){this.addDispose(this.xterm.raw.onResize(O=>{this._hasOutput&&this._doResize()}))}_attachXterm(){this._prepareAddons(),this._xtermEvents(),this._linkManager=this.injector.get(f.TerminalLinkManager,[this.xterm.raw,this]),this._linkManager.processCwd=this._workspacePath,this.addDispose(this._linkManager),this._areLinksReady=!0,this._onLinksReady.fire(this)}_doResize(){this.internalService.resize(this.id,this.xterm.raw.cols,this.xterm.raw.rows)}_prepare(){var O,P,R,M,k;(O=this._attached)===null||O===void 0||O.reject("TerminalClient is Re-initialization"),(P=this._firstStdout)===null||P===void 0||P.reject("TerminalClient is Re-initialization"),(R=this._error)===null||R===void 0||R.reject("TerminalClient is Re-initialization"),(M=this._show)===null||M===void 0||M.reject("TerminalClient is Re-initialization"),this._ready=!1,this._hasOutput=!1,this._attached=new E.Deferred,this._show=new E.Deferred,this._error=new E.Deferred,this._firstStdout=new E.Deferred,(k=this._attachAddon)===null||k===void 0||k.setConnection(void 0),this.internalService.getOS().then(x=>{this._os=x});const{dispose:B}=this.onOutput(()=>{B(),this._hasOutput=!0,this._firstStdout.resolve()})}_attachAfterRender(){queueMicrotask(()=>{var O;this._layout(),this.attach(),this.focus(),this.widget.show||(O=this._show)===null||O===void 0||O.promise.then(async()=>{this._show=new E.Deferred})})}async _pickWorkspace(){var O;if(this.workspace.isMultiRootWorkspaceOpened&&!this._widget.recovery){const P=this.workspace.tryGetRoots();return await this.quickPick.show(P.map(M=>new E.URI(M.uri).codeUri.fsPath),{placeholder:(0,l.localize)("terminal.selectCWDForNewTerminal")})}else return this.workspace.workspace?new E.URI((O=this.workspace.workspace)===null||O===void 0?void 0:O.uri).codeUri.fsPath:void 0}async _checkWorkspace(){const O=this._widget;if(n.WORKSPACE_PATH_CACHED.has(O.group.id))this._workspacePath=n.WORKSPACE_PATH_CACHED.get(O.group.id);else{const P=await this._pickWorkspace();P&&(this._workspacePath=P,n.WORKSPACE_PATH_CACHED.set(O.group.id,this._workspacePath))}}async checkHealthy(){return await this.internalService.check([this.id])}displayUnHealthyMessage(){const O=this.term,P=O.options.theme,R=(k,B,x)=>{const N=" ",j=k.split(`
28830
+ `)}get status(){return this._validationStatus}}let h=class extends o.Disposable{constructor(){super(),this._onDidStateChange=new l.Emitter,this.onDidStateChange=this._onDidStateChange.event,this._onDidRegisterTaskProvider=new l.Emitter,this.onDidRegisterTaskProvider=this._onDidRegisterTaskProvider.event,this.providerHandler=0,this.runningTasks=new Map,this.toQuickOpenItem=d=>{var v;return new o.QuickOpenItem({label:d._label||"",detail:d instanceof _.ContributedTask?`${d.command.name||""} ${d.command.args?(v=d.command.args)===null||v===void 0?void 0:v.join(" "):""}`:void 0,run:f=>f===o.Mode.OPEN?(this.runTask(d),!0):!1})},this.providers=new Map,this.providerTypes=new Map,this.addDispose([this.taskSystem.onDidStateChange(d=>this._onDidStateChange.fire(d)),this.taskSystem.onDidBackgroundTaskBegin(d=>this._onDidStateChange.fire(d)),this.taskSystem.onDidBackgroundTaskEnded(d=>this._onDidStateChange.fire(d)),this.taskSystem.onDidProblemMatched(d=>this._onDidStateChange.fire(d))])}get outputChannel(){return this._outputChannel||(this._outputChannel=this.outputService.getChannel((0,o.localize)("task.outputchannel.name"))),this._outputChannel}get workspaceFolders(){return this._workspaceFolders||this.tryGetWorkspaceFolders(),this._workspaceFolders}tryGetWorkspaceFolders(){this._workspaceFolders=this.workspaceService.tryGetRoots().map(d=>o.Uri.parse(d.uri))}async runTaskCommand(){const d=await this.getGroupedTasks(),v=await this.getWorkspaceTasks(d),[f,a]=this.combineQuickItems(d,v);this.quickOpenService.open({onType:(b,y)=>y([...f,...a])},{placeholder:(0,o.formatLocalize)("TaskService.pickRunTask")})}run(d){return this.runTask(d)}async attach(d,v){if(this.runningTasks.has(d))return;const[,,,f]=d.split(",");if(f)if(this.providerTypes.has(f)){const a=await this.getTask(this.workspaceFolders[0],d);a&&(this.taskSystem.attach(a,v),this.runningTasks.set(d,a))}else{const a=this._onDidRegisterTaskProvider.event(async b=>{if(b===f){const y=await this.getTask(this.workspaceFolders[0],d);y&&(this.taskSystem.attach(y,v),this.runningTasks.set(d,y),a.dispose())}})}}async terminateTask(d){const v=this.taskSystem.getActiveTasks();for(const f of v)f._id===d&&await this.taskSystem.terminate(f)}getTask(d,v,f=!1){const a=(0,o.isString)(v)?v:this.taskDefinitionRegistry.createTaskIdentifier(v,console);return a===void 0?Promise.resolve(void 0):this.getWorkspaceGroupedTasks(d).then(b=>{if(!b)return Promise.resolve(void 0);const y=b.get(d.toString());if(!y)return Promise.resolve(void 0);for(const S of y)if(S.matches(a,f)||S._id===v||S._label===v)return S})}async runTask(d){const v=await this.taskSystem.run(d);return v.promise.then(f=>{this.runningTasks.has(d._id)&&this.runningTasks.delete(d._id),this.outputChannel.appendLine(`Task ${d._label} done, exit code ${f.exitCode}`)}),this.runningTasks.set(d._id,d),Promise.resolve(v.promise)}async tasks(d){var v;const f=await this.getWorkspaceGroupedTasks(),a=[];for(const b of f.values())for(const y of b)d&&d.type&&((v=y.getDefinition())===null||v===void 0?void 0:v.type)===d.type&&a.push(y);return a}async getWorkspaceGroupedTasks(d=this.workspaceFolders[0]){const v=await this.getGroupedTasks(),f=await this.getWorkspaceTasks(v),a=[];for(const S of v)S.tasks&&S.tasks.length>0&&a.push(...S.tasks);const b=f?.get(d.toString());b&&b.set&&a.push(...b.set.tasks);const y=new Map;return y.set(d.toString(),a),y}async getGroupedTasks(){const d={};for(const f of this.taskDefinitionRegistry.all())d[f.taskType]=!0;d.shell=!0,d.process=!0;const v=[];for(const[,f]of this.providers){const a=await f.provideTasks(d);v.push(a)}return v}toQuickOpenGroupItem(d,v,f){return new o.QuickOpenItem({groupLabel:d?(0,o.formatLocalize)("task.contribute"):void 0,run:v,showBorder:d,label:f,value:{type:f,grouped:!0},iconClass:(0,o.getIcon)("folder")})}combineQuickItems(d,v){var f,a;const b=[],y=[];let S=!0;for(const A of d){const T=D=>D===o.Mode.OPEN?(this.quickOpenService.open({onType:(I,O)=>A.tasks.length===0?O([new o.QuickOpenItem({value:"none",label:(0,o.formatLocalize)("task.cannotFindTask",A.type),run:P=>P===o.Mode.OPEN})]):O(A.tasks.map(this.toQuickOpenItem))}),!1):!0,w=this.toQuickOpenGroupItem(S,T,A.type);b.push(w),S=!1}if(v){for(const A of v.values())if(!((f=A.configurations)===null||f===void 0)&&f.byIdentifier&&Object.keys((a=A.configurations)===null||a===void 0?void 0:a.byIdentifier).forEach(T=>{var w;const D=(w=A.configurations)===null||w===void 0?void 0:w.byIdentifier[T];y.push(this.toQuickOpenItem(D))}),A.set&&A.set.tasks.length>0)for(const T of A.set.tasks)y.push(this.toQuickOpenItem(T))}return[y,b]}async getWorkspaceTasks(d){return this.updateWorkspaceTasks(d)}updateWorkspaceTasks(d){return this.workspaceFolders.length===0?Promise.resolve(new Map):this.workspaceFolders.length===1?this.computeWorkspaceFolderTasks(this.workspaceFolders[0],d).then(v=>{const f=new Map;return f.set(this.workspaceFolders[0].toString(),v),f}):Promise.resolve(void 0)}computeWorkspaceFolderTasks(d,v){return new Promise(async f=>{const a=this.preferences.get("tasks"),b=new Map;for(const y of v)for(const S of y.tasks)_.ContributedTask.is(S)&&b.set(S.defines._key,S);if(a&&a.tasks){let y;const S=[];let A=!1;const T=new c(this.outputChannel),w=(0,g.parse)({uri:d,name:d.path,index:0},l.platform,a,T,this.taskDefinitionRegistry,this.problemMatcher,this.problemPattern);if(w.validationStatus.isOK()||(A=!0,this.showOutput()),w.configured&&w.configured.length>0){y={byIdentifier:Object.create(null)};for(const D of w.configured)y.byIdentifier[D.configures._key]=D}S.push(...w.custom),y&&y.byIdentifier&&Object.keys(y.byIdentifier).forEach(D=>{if(b.has(D)){const I=(0,g.createCustomTask)(b.get(D),y.byIdentifier[D]);y.byIdentifier[D]=I}}),f({workspaceFolder:{uri:d,name:d.path,index:0},set:{tasks:S},configurations:y,hasErrors:A})}else f({workspaceFolder:{uri:d,name:d.path,index:0},set:{tasks:[]},configurations:{byIdentifier:{}},hasErrors:!1})})}showOutput(){this.outputChannel.appendLine("There are task errors. See the output for details.")}rerunLastTask(){return this.taskSystem.rerun()}registerTaskProvider(d,v){const f=this.providerHandler+=1;return this.providers.set(f,d),this.providerTypes.set(v,f),this._onDidRegisterTaskProvider.fire(v),{dispose:()=>{this.providers.delete(f),this.providerTypes.delete(v)}}}};t.TaskService=h,n.__decorate([(0,r.Autowired)(m.OutputService),n.__metadata("design:type",m.OutputService)],h.prototype,"outputService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],h.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],h.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],h.prototype,"preferences",void 0),n.__decorate([(0,r.Autowired)(p.ITaskSystem),n.__metadata("design:type",Object)],h.prototype,"taskSystem",void 0),n.__decorate([(0,r.Autowired)(l.ITaskDefinitionRegistry),n.__metadata("design:type",Object)],h.prototype,"taskDefinitionRegistry",void 0),n.__decorate([(0,r.Autowired)(l.IProblemMatcherRegistry),n.__metadata("design:type",Object)],h.prototype,"problemMatcher",void 0),n.__decorate([(0,r.Autowired)(l.IProblemPatternRegistry),n.__metadata("design:type",Object)],h.prototype,"problemPattern",void 0),t.TaskService=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},66893:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalTaskSystem=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(80907),m=e(1041),E=e(12968),p=e(95268),{deepClone:_}=o.objects,{Path:s}=o.path;let g=class extends o.Disposable{constructor(){super(...arguments),this.executorId=0,this.activeTaskExecutors=new Map,this._onDidStateChange=new o.Emitter,this._onDidBackgroundTaskBegin=new o.Emitter,this._onDidBackgroundTaskEnded=new o.Emitter,this._onDidProblemMatched=new o.Emitter,this.taskExecutors=[],this.onDidStateChange=this._onDidStateChange.event,this.onDidBackgroundTaskBegin=this._onDidBackgroundTaskBegin.event,this.onDidBackgroundTaskEnded=this._onDidBackgroundTaskEnded.event,this.onDidProblemMatched=this._onDidProblemMatched.event}run(h){return this.currentTask=h,this.executeTask(h)}attach(h,u){return this.currentTask=h,this.attachTask(h,u)}async buildShellConfig(h){let u="";const d=h.name,v=h.args,f=[],a=[];if(d&&(typeof d=="string"?u=d:u=d.value),f.push(u),v)for(const b of v)typeof b=="string"?f.push(b):f.push(b.value);for(const b of f)b.indexOf(s.separator)>-1?a.push(await this.resolveVariables(b.split(s.separator))):a.push(await this.resolveVariable(b));return{args:["-c",`${a.join(" ")}`]}}findAvailableExecutor(){return this.taskExecutors.find(h=>h.taskStatus===p.TaskStatus.PROCESS_EXITED)}async createTaskExecutor(h,u){const d=await this.resolveMatchers(h.configurationProperties.problemMatchers),v=new E.ProblemCollector(d),f=this.injector.get(p.TerminalTaskExecutor,[h,u,v,this.executorId]);return this.executorId+=1,this.taskExecutors.push(f),this.addDispose(f.onDidTerminalWidgetRemove(()=>{this.taskExecutors=this.taskExecutors.filter(a=>a.executorId!==f.executorId)})),f}async attachTask(h,u){const v=(await this.createTaskExecutor(h,u.launchConfig)).attach(u);return this.lastTask=h,{task:h,kind:1,promise:v}}async executeTask(h){var u,d,v;const f=h.command&&h.command.runtime===m.RuntimeType.CustomExecution,a=await this.resolveMatchers(h.configurationProperties.problemMatchers),b=new E.ProblemCollector(a),{args:y}=await this.buildShellConfig(h.command),S={name:this.createTerminalName(h),args:y,isExtensionOwnedTerminal:f,env:((u=h.command.options)===null||u===void 0?void 0:u.env)||{},cwd:!((d=h.command.options)===null||d===void 0)&&d.cwd?await this.resolveVariable((v=h.command.options)===null||v===void 0?void 0:v.cwd):await this.resolveVariable("${workspaceFolder}"),disablePreserveHistory:!0};let A=this.findAvailableExecutor(),T=!1;A?(T=!0,A.updateProblemCollector(b),A.updateLaunchConfig(S),A.reset()):A=await this.createTaskExecutor(h,S),T?this._onDidStateChange.fire(m.TaskEvent.create("start",h,A.terminalId)):this.addDispose(A.onDidTerminalCreated(I=>{this._onDidStateChange.fire(m.TaskEvent.create("start",h,I))})),T||(this.addDispose(A.onDidTaskProcessExit(I=>{this._onDidStateChange.fire(m.TaskEvent.create("processEnded",h,I)),this._onDidStateChange.fire(m.TaskEvent.create("end",h))})),this.addDispose(A.onDidBackgroundTaskBegin(()=>this._onDidBackgroundTaskBegin.fire(m.TaskEvent.create("backgroundTaskBegin",h)))),this.addDispose(A.onDidBackgroundTaskEnd(()=>this._onDidBackgroundTaskEnded.fire(m.TaskEvent.create("backgroundTaskEnded",h)))),this.addDispose(A.onDidProblemMatched(I=>this._onDidProblemMatched.fire(m.TaskEvent.create("problemMatched",h,I)))));const w=A.execute(h,T),D=h.getMapKey();return this.activeTaskExecutors.set(D,{promise:Promise.resolve(w),task:h,executor:A}),this._onDidStateChange.fire(m.TaskEvent.create("active",h)),await A.processReady.promise,this._onDidStateChange.fire(m.TaskEvent.create("processStarted",h,A.processId)),this.lastTask=h,{task:h,kind:1,promise:w}}createTerminalName(h){return(0,o.formatLocalize)("TerminalTaskSystem.terminalName",h.getQualifiedLabel()||h.configurationProperties.name)}async resolveVariables(h){const u=[];for(const d of h)u.push(await this.resolveVariable(d));return u.join(s.separator)}async resolveVariable(h){if((0,o.isString)(h))return await this.variableResolver.resolve(h);if(h!==void 0)return{value:await this.variableResolver.resolve(h.value),quoting:h.quoting};throw new Error("Should never try to resolve undefined.")}async resolveMatchers(h){if(h==null||h.length===0)return[];const u=[];for(const d of h){let v;if((0,o.isString)(d)?d[0].startsWith("$")?v=this.problemMatcher.get(d.substring(1)):v=this.problemMatcher.get(d):v=d,!v)continue;const f=v.filePrefix!==void 0;if(!f)u.push(v);else{const a=_(v);f&&(a.filePrefix=await this.resolveVariable(a.filePrefix)),u.push(a)}}return u}getActiveTasks(){return Array.from(this.activeTaskExecutors.values()).map(h=>h.task)}async terminate(h){const u=h.getMapKey(),d=this.activeTaskExecutors.get(u);if(!d)return Promise.resolve({task:void 0,success:!0});const{success:v}=await d.executor.terminate();return this.activeTaskExecutors.delete(u),{task:h,success:v}}async rerun(){return this.lastTask&&await this.executeTask(this.lastTask)}isActive(){throw new Error("Method not implemented.")}isActiveSync(){throw new Error("Method not implemented.")}getBusyTasks(){throw new Error("Method not implemented.")}canAutoTerminate(){throw new Error("Method not implemented.")}terminateAll(){throw new Error("Method not implemented.")}revealTask(h){throw new Error("Method not implemented.")}customExecutionComplete(h,u){throw new Error("Method not implemented.")}};t.TerminalTaskSystem=g,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.IProblemMatcherRegistry),n.__metadata("design:type",Object)],g.prototype,"problemMatcher",void 0),n.__decorate([(0,r.Autowired)(l.IVariableResolverService),n.__metadata("design:type",Object)],g.prototype,"variableResolver",void 0),t.TerminalTaskSystem=g=n.__decorate([(0,r.Injectable)()],g)},93950:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITaskSystem=t.ITaskExecutor=t.ITaskService=void 0,t.ITaskService=Symbol("ITaskService"),t.ITaskExecutor=Symbol("ITaskExecutor"),t.ITaskSystem=Symbol("ITaskSystem")},1041:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskEvent=t.TaskSorter=t.ExecutionEngine=t.InMemoryTask=t.ContributedTask=t.ConfiguringTask=t.CustomTask=t.CommonTask=t.RunOptions=t.RunOnOptions=t.TaskSourceKind=t.TaskGroup=t.CommandString=t.RuntimeType=t.PresentationOptions=t.PanelKind=t.RevealProblemKind=t.RevealKind=t.CommandOptions=t.CUSTOMIZED_TASK_TYPE=t.ShellQuoting=t.TASK_RUNNING_STATE=void 0;const n=e(40191),r=e(43718),{basename:o}=r.path;t.TASK_RUNNING_STATE=new n.RawContextKey("taskRunning",!1);var l;(function(D){D[D.Escape=1]="Escape",D[D.Strong=2]="Strong",D[D.Weak=3]="Weak"})(l||(t.ShellQuoting=l={})),t.CUSTOMIZED_TASK_TYPE="$customized",function(D){function I(O){if(!O)return D.Strong;switch(O.toLowerCase()){case"escape":return D.Escape;case"strong":return D.Strong;case"weak":return D.Weak;default:return D.Strong}}D.from=I}(l||(t.ShellQuoting=l={}));var m;(function(D){D.defaults={cwd:"${workspaceFolder}"}})(m||(t.CommandOptions=m={}));var E;(function(D){D[D.Always=1]="Always",D[D.Silent=2]="Silent",D[D.Never=3]="Never"})(E||(t.RevealKind=E={})),function(D){function I(O){switch(O.toLowerCase()){case"always":return D.Always;case"silent":return D.Silent;case"never":return D.Never;default:return D.Always}}D.fromString=I}(E||(t.RevealKind=E={}));var p;(function(D){D[D.Never=1]="Never",D[D.OnProblem=2]="OnProblem",D[D.Always=3]="Always"})(p||(t.RevealProblemKind=p={})),function(D){function I(O){switch(O.toLowerCase()){case"always":return D.Always;case"never":return D.Never;case"onproblem":return D.OnProblem;default:return D.OnProblem}}D.fromString=I}(p||(t.RevealProblemKind=p={}));var _;(function(D){D[D.Shared=1]="Shared",D[D.Dedicated=2]="Dedicated",D[D.New=3]="New"})(_||(t.PanelKind=_={})),function(D){function I(O){switch(O.toLowerCase()){case"shared":return D.Shared;case"dedicated":return D.Dedicated;case"new":return D.New;default:return D.Shared}}D.fromString=I}(_||(t.PanelKind=_={}));var s;(function(D){D.defaults={echo:!0,reveal:E.Always,revealProblems:p.Never,focus:!1,panel:_.Shared,showReuseMessage:!0,clear:!1}})(s||(t.PresentationOptions=s={}));var g;(function(D){D[D.Shell=1]="Shell",D[D.Process=2]="Process",D[D.CustomExecution=3]="CustomExecution",D[D.CustomExecution2=4]="CustomExecution2"})(g||(t.RuntimeType=g={})),function(D){function I(O){switch(O.toLowerCase()){case"shell":return D.Shell;case"process":return D.Process;case"customExecution":return D.CustomExecution;default:return D.Process}}D.fromString=I}(g||(t.RuntimeType=g={}));var c;(function(D){function I(O){return(0,r.isString)(O)?O:O.value}D.value=I})(c||(t.CommandString=c={}));var h;(function(D){D.Clean={_id:"clean",isDefault:!1},D.Build={_id:"build",isDefault:!1},D.Rebuild={_id:"rebuild",isDefault:!1},D.Test={_id:"test",isDefault:!1};function I(P){return P===D.Clean._id||P===D.Build._id||P===D.Rebuild._id||P===D.Test._id}D.is=I;function O(P){if(P!==void 0)return(0,r.isString)(P)?I(P)?{_id:P,isDefault:!1}:void 0:P}D.from=O})(h||(t.TaskGroup=h={}));var u;(function(D){D.Workspace="workspace",D.Extension="extension",D.InMemory="inMemory",D.WorkspaceFile="workspaceFile",D.User="user"})(u||(t.TaskSourceKind=u={}));var d;(function(D){D[D.default=1]="default",D[D.folderOpen=2]="folderOpen"})(d||(t.RunOnOptions=d={}));var v;(function(D){D.defaults={reevaluateOnRerun:!0,runOn:d.default}})(v||(t.RunOptions=v={}));class f{constructor(I,O,P,R,M,k){this._label="",this._id=I,O&&(this._label=O),P&&(this.type=P),this.runOptions=R,this.configurationProperties=M,this._source=k}getDefinition(I){}getMapKey(){return this._id}getRecentlyUsedKey(){}clone(){return this.fromObject(Object.assign({},this))}getWorkspaceFolder(){}getWorkspaceFileName(){}getTelemetryKind(){return"unknown"}matches(I,O=!1){if(I===void 0)return!1;if((0,r.isString)(I))return I===this._label||I===this.configurationProperties.identifier||O&&I===this._id;const P=this.getDefinition(!0);return P!==void 0&&P._key===I._key}getQualifiedLabel(){const I=this.getWorkspaceFolder();return I?`${this._label} (${I.name})`:this._label}getTaskExecution(){return{id:this._id,task:this}}addTaskLoadMessages(I){this._taskLoadMessages===void 0&&(this._taskLoadMessages=[]),I&&(this._taskLoadMessages=this._taskLoadMessages.concat(I))}get taskLoadMessages(){return this._taskLoadMessages}}t.CommonTask=f;class a extends f{constructor(I,O,P,R,M,k,B,x){super(I,P,void 0,B,x,O),this.command={},this._source=O,this.hasDefinedMatchers=k,M&&(this.command=M)}customizes(){if(this._source&&this._source.customizes)return this._source.customizes}getDefinition(I=!1){if(I&&this._source.customizes!==void 0)return this._source.customizes;{let O;switch(this.command?this.command.runtime:void 0){case g.Shell:O="shell";break;case g.Process:O="process";break;case g.CustomExecution:O="customExecution";break;case void 0:O="$composite";break;default:throw new Error("Unexpected task runtime")}return{type:O,_key:this._id,id:this._id}}}static is(I){return I instanceof a}getMapKey(){const I=this._source.config.workspaceFolder;return I?`${I.uri.toString()}|${this._id}`:this._id}getRecentlyUsedKey(){const I=this._source.config.workspaceFolder;if(!I)return;let O=this.configurationProperties.identifier;this._source.kind!==u.Workspace&&(O+=this._source.kind);const P={type:t.CUSTOMIZED_TASK_TYPE,folder:I.uri.toString(),id:O};return JSON.stringify(P)}getWorkspaceFolder(){return this._source.config.workspaceFolder}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?o(this._source.config.workspace.configuration.toString()):void 0}getTelemetryKind(){return this._source.customizes?"workspace>extension":"workspace"}fromObject(I){return new a(I._id,I._source,I._label,I.type,I.command,I.hasDefinedMatchers,I.runOptions,I.configurationProperties)}}t.CustomTask=a;class b extends f{constructor(I,O,P,R,M,k,B){super(I,P,R,k,B,O),this._source=O,this.configures=M}static is(I){return I instanceof b}fromObject(I){return I}getDefinition(){return this.configures}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?o(this._source.config.workspace.configuration.toString()):void 0}}t.ConfiguringTask=b;class y extends f{constructor(I,O,P,R,M,k,B,x,N){super(I,P,R,x,N,O),this.defines=M,this.hasDefinedMatchers=B,this.command=k}getDefinition(){return this.defines}static is(I){return I instanceof y}getMapKey(){const I=this._source.workspaceFolder;return I?`${this._source.scope.toString()}|${I.uri.toString()}|${this._id}`:`${this._source.scope.toString()}|${this._id}`}getRecentlyUsedKey(){const I={type:"contributed",scope:this._source.scope,id:this._id};return this._source.scope===3&&this._source.workspaceFolder&&(I.folder=this._source.workspaceFolder.uri.toString()),JSON.stringify(I)}getWorkspaceFolder(){return this._source.workspaceFolder}getTelemetryKind(){return"extension"}fromObject(I){return new y(I._id,I._source,I._label,I.type,I.defines,I.command,I.hasDefinedMatchers,I.runOptions,I.configurationProperties)}}t.ContributedTask=y;class S extends f{constructor(I,O,P,R,M,k){super(I,P,R,M,k,O),this._source=O}static is(I){return I instanceof S}getTelemetryKind(){return"composite"}fromObject(I){return new S(I._id,I._source,I._label,I.type,I.runOptions,I.configurationProperties)}}t.InMemoryTask=S;var A;(function(D){D[D.Process=1]="Process",D[D.Terminal=2]="Terminal"})(A||(t.ExecutionEngine=A={})),function(D){D._default=D.Terminal}(A||(t.ExecutionEngine=A={}));class T{constructor(I){this._order=new Map;for(let O=0;O<I.length;O++)this._order.set(I[O].uri.toString(),O)}compare(I,O){const P=I.getWorkspaceFolder(),R=O.getWorkspaceFolder();if(P&&R){let M=this._order.get(P.uri.toString());M=M===void 0?0:M+1;let k=this._order.get(R.uri.toString());return k=k===void 0?0:k+1,M===k?I._label.localeCompare(O._label):M-k}else return!P&&R?-1:P&&!R?1:0}}t.TaskSorter=T;var w;(function(D){function I(O,P,R){if(P){const M={kind:O,taskId:P._id,taskName:P.configurationProperties.name,runType:P.configurationProperties.isBackground?"background":"singleRun",group:P.configurationProperties.group,processId:void 0,exitCode:void 0,terminalId:void 0,__task:P};return O==="start"?M.terminalId=R:O==="processStarted"?M.processId=R:O==="processEnded"?M.exitCode=R:O==="problemMatched"&&(M.problems=R),Object.freeze(M)}else return Object.freeze({kind:"changed"})}D.create=I})(w||(t.TaskEvent=w={}))},90305:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(75655));let l=0,m=null;t.default=E=>{const{start:p,stop:_,self:s,left:g,right:c,wholeWidth:h,last:u}=E,d=a=>{l=a.clientX,m=s,p()},v=a=>{if(!l)return!1;const b=a.clientX,y=(b-l)/h*100;l=b,y<0?(s&&s.increase(y),c&&c.increase(-y)):m&&m===g&&(s&&s.increase(-y),g&&g.increase(y))},f=a=>{l=0,m=null,s.resize(),g&&g.resize(),c&&c.resize(),_()};return r.default.createElement("div",{className:o.default.resizeDelegetContainer,onMouseUp:f,onMouseMove:v},!u&&r.default.createElement("div",{className:o.default.resizeDelegateBar,onMouseDown:d,onMouseUp:f}))}},92699:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResizeDirection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),l=e(41869),m=e(7473),E=n.__importDefault(e(90305)),p=n.__importDefault(e(75655));var _;(function(c){c[c.vertical=0]="vertical",c[c.horizontal=1]="horizontal"})(_||(t.ResizeDirection=_={}));const s=({index:c,widget:h,wholeWidth:u,setEvent:d,self:v,left:f,right:a,last:b})=>{const y=(0,l.useAutorun)(h.shadowDynamic);return o.default.createElement("div",{key:`resize-item-${c}`,style:{width:`${y}%`},className:p.default.resizeHandler},o.default.createElement(E.default,{wholeWidth:u,start:()=>d(!0),stop:()=>d(!1),self:v,left:f,right:a,last:b}))},g=({widget:c,dynamic:h,draw:u,handleRemoveWidget:d,widgetsLength:v})=>{const f=(0,l.useAutorun)(h);return o.default.createElement("div",{key:c.id,style:{width:`${f}%`},className:p.default.resizeItem},u(c),v>1&&o.default.createElement("div",{className:(0,r.default)(p.default.closeBtn,(0,l.getIcon)("close")),onClick:()=>{d(c.id)}}))};t.default=c=>{const{group:h,shadow:u}=c,d=(0,l.useAutorun)(h.widgets),[v,f]=o.default.useState(!1),[a,b]=o.default.useState(1/0),y=(0,l.useInjectable)(m.ITerminalGroupViewService),S=o.default.useRef(null);o.default.useEffect(()=>{S.current&&S.current.clientHeight!==a&&b(S.current.clientWidth)});const A=o.default.useCallback(T=>{y.removeWidget(T)},[]);return o.default.createElement("div",{className:p.default.resizeWrapper,ref:S},o.default.createElement("div",{style:{pointerEvents:v?"all":"none"},className:p.default.resizeDelegate},d&&d.map((T,w)=>{const D=w-1>-1?d[w-1]:null,I=d[w],O=w+1<d.length?d[w+1]:null;return o.default.createElement(s,{key:w,index:w,widget:T,wholeWidth:a,setEvent:f,self:I,left:D,right:O,last:w===d.length-1})})),o.default.createElement("div",{style:{pointerEvents:v?"none":"all"},className:p.default.resizePanel},d&&d.map(T=>o.default.createElement(g,{key:T.id,widget:T,dynamic:u?T.dynamic:T.shadowDynamic,draw:c.draw,handleRemoveWidget:A,widgetsLength:d.length}))))}},65586:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderAddItem=t.renderInfoItem=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(12784)),l=n.__importStar(e(14041)),m=e(80564),E=e(41869),p=e(89897),_=e(1149),s=e(7443),g=e(26405),c=n.__importDefault(e(99886)),h=d=>{var v,f,a,b;const y=(0,E.useInjectable)(s.IconService),S=(0,o.default)(()=>d.onClick&&d.onClick(),20),A=(0,o.default)(()=>d.onClose&&d.onClose(),20),T=(0,E.useDesignStyles)(c.default.item_container,"item_container"),w=(0,E.useDesignStyles)(c.default.tab_item_selected,"tab_item_selected"),D=(0,E.useDesignStyles)(c.default.item_info_name,"item_info_name"),I=(0,E.useDesignStyles)(c.default.tab_close_icon,"tab_close_icon"),O=(0,E.useInjectable)(_.LayoutViewSizeConfig),P=(0,l.useRef)(null),{group:R}=d;if(!R)return null;const{options:M,id:k}=R,B=(0,E.useAutorun)(R.editable),x=(0,E.useAutorun)(R.snapshot),N=(0,l.useCallback)(G=>{G.key==="Enter"&&d.onInputEnter&&k&&d.onInputEnter(k,G.target.value)},[k,d.onInputEnter]);(0,l.useEffect)(()=>{var G;d.selected&&((G=P.current)===null||G===void 0||G.scrollIntoView())},[P,d.selected]);let j;M?.icon&&(!((v=M.icon)===null||v===void 0)&&v.id?j=y.fromString(`$(${(f=M.icon)===null||f===void 0?void 0:f.id})`):M.icon instanceof E.URI?j=y.fromIcon(M?.icon.toString()):(!((a=M.icon)===null||a===void 0)&&a.light||!((b=M?.icon)===null||b===void 0)&&b.dark)&&(j=d.theme==="light"?y.fromIcon(M.icon.light.toString()):y.fromIcon(M.icon.dark.toString())));const K=(0,l.useCallback)(G=>{var Q;(Q=d.onDragStart)===null||Q===void 0||Q.call(d,G)},[d.onDragStart]),U=(0,l.useCallback)(G=>{G.preventDefault(),P.current&&P.current.classList.add("on-drag-over")},[P]),Y=(0,l.useCallback)(()=>{P.current&&P.current.classList.remove("on-drag-over")},[P]),z=(0,l.useCallback)(G=>{var Q;P.current&&P.current.classList.remove("on-drag-over"),(Q=d.onDrop)===null||Q===void 0||Q.call(d,G)},[P,d.onDrop]);return l.default.createElement("div",{draggable:d.draggable,onDragStart:K,onDragOver:U,onDragLeave:Y,onDrop:z,ref:P,className:(0,r.default)({[T]:!0,[w]:!!d.selected}),style:{height:O.panelTitleBarHeight},onClick:()=>S(),onContextMenu:G=>d.onContextMenu&&d.onContextMenu(G)},B?l.default.createElement("input",{autoFocus:!0,ref:G=>G&&G.select(),className:c.default.item_info_input,defaultValue:x,onClick:G=>G.stopPropagation(),onBlur:()=>d.onInputBlur&&R.id&&d.onInputBlur(R.id),onKeyDown:G=>N(G)}):l.default.createElement("div",{id:R.id,className:D,title:x},x!==""?l.default.createElement(l.default.Fragment,null,l.default.createElement(m.Icon,{iconClass:j||(0,E.getIcon)(x?.toLowerCase()||"terminal")||(0,E.getIcon)("terminal"),style:{marginRight:4,color:"inherit",fontSize:14}}),l.default.createElement("span",{className:c.default.item_title},x)):l.default.createElement(p.Loading,null)),B?l.default.createElement("div",null):l.default.createElement("div",{className:(0,r.default)([(0,E.getIcon)("close"),I]),onClick:G=>{G.stopPropagation(),A()}}))};t.renderInfoItem=h;const u=d=>{const v=(0,o.default)(()=>d.onClick&&d.onClick(),20),f=d.getKeybinding&&d.getKeybinding(E.TERMINAL_COMMANDS.ADD.id),a=f?`${(0,E.localize)("terminal.new")}(${f})`:(0,E.localize)("terminal.new"),b=(0,E.useDesignStyles)(c.default.tab_item_wrapper,"tab_item_wrapper");return l.default.createElement("div",{className:b},l.default.createElement("div",{title:a,className:(0,r.default)({[(0,E.getIcon)("plus")]:!0,[c.default.item_add]:!0}),onClick:()=>v()}),l.default.createElement("div",{title:(0,E.localize)("terminal.new.type"),className:(0,r.default)({[(0,E.getIcon)("down")]:!0,[c.default.item_more]:!0}),onClick:d.onDropdown}))};t.renderAddItem=u,t.default=d=>{switch(d.type||g.ItemType.info){case g.ItemType.info:return(0,l.createElement)(d.provider.infoItemRender,d);case g.ItemType.add:return(0,l.createElement)(d.provider.addItemRender,d);default:return null}}},17632:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),l=e(41869),m=e(52416),E=e(26405),p=e(88023),_=n.__importDefault(e(65586)),s=n.__importDefault(e(99886));t.default=()=>{const g=(0,l.useInjectable)(E.ITerminalGroupViewService),c=(0,l.useInjectable)(E.ITerminalRenderProvider),h=(0,l.useInjectable)(p.TerminalContextMenuService),u=(0,l.useInjectable)(m.IThemeService),d=(0,l.useInjectable)(l.KeybindingRegistry),v=(0,r.useRef)(),[f,a]=(0,r.useState)("dark"),b=(0,l.useDesignStyles)(s.default.tab_contents,"tab_contents"),y=(0,l.useAutorun)(g.groups),S=(0,l.useAutorun)(g.currentGroup),A=(0,r.useCallback)(()=>(u.getCurrentTheme().then(T=>{a(T.type)}),u.onThemeChange(T=>{a(T.type)})),[f,u]);return(0,r.useEffect)(()=>{const T=A();return()=>{T.dispose()}},[]),r.default.createElement("div",{className:s.default.view_container},r.default.createElement("div",{className:s.default.tabs},r.default.createElement(o.Scrollbars,{forwardedRef:T=>T?v.current=T.ref:null},r.default.createElement("div",{className:b},y.filter(Boolean).map((T,w)=>r.default.createElement(_.default,{draggable:!0,onDragStart:D=>{D.dataTransfer.setData("groupIndex",String(w))},onDrop:D=>{if(D.preventDefault(),D.dataTransfer.getData("groupIndex")){const I=D.dataTransfer.getData("groupIndex");g.swapGroup(Number(I),w),g.selectGroup(w)}},key:T.id,group:T,selected:S&&S.id===T.id,onInputBlur:()=>T.unedit(),onInputEnter:(D,I)=>T.rename(I),onClick:()=>g.selectGroup(w),onClose:()=>g.removeGroup(w),onContextMenu:D=>h.onTabContextMenu(D,w),provider:c,theme:f})),r.default.createElement("div",{className:s.default.button},r.default.createElement(_.default,{type:E.ItemType.add,onClick:()=>{const T=g.createGroup(),w=g.getGroup(T);g.createWidget(w),g.selectGroup(T)},getKeybinding:T=>{const w=d.getKeybindingsForCommand(T);return Array.isArray(w)&&w[0]&&d.acceleratorFor(w[0],"")[0]||""},onDropdown:T=>h.onDropDownContextMenu(T),provider:c,theme:f}))))))}},7066:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalVariable=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(43718),l=e(94620),m=n.__importDefault(e(74599));function E(_,s){_.forEach((g,c)=>{g.forEach(h=>{s.add((0,l.mutatorTypeLabel)(h.type,h.value,c))})})}const p=({diff:_})=>{const s=r.default.useMemo(()=>{const c=new Set;return _?.added&&_?.added.size>0&&E(_.added,c),_?.changed&&_.changed.size>0&&E(_.changed,c),Array.from(c.values())},[_]),g=r.default.useMemo(()=>{if(!_?.removed||_?.removed.size===0)return[];const c=new Set;return E(_.removed,c),Array.from(c.values())},[_]);return r.default.createElement("div",{className:m.default.variable_container},s.length>0&&r.default.createElement(r.default.Fragment,null,r.default.createElement("h3",null,(0,o.localize)("terminal.environment.changes")),s.map((c,h)=>r.default.createElement("p",{key:c+h,className:m.default.variable_change},c))),g.length>0&&r.default.createElement(r.default.Fragment,null,r.default.createElement("h3",null,(0,o.localize)("terminal.environment.removal")),g.map((c,h)=>r.default.createElement("p",{key:c+h,className:m.default.variable_change},c))))};t.TerminalVariable=p},48139:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(12784)),l=n.__importDefault(e(14041)),m=e(41869),E=e(26405),p=n.__importStar(e(92699)),_=n.__importDefault(e(73567)),s=n.__importDefault(e(76970));e(86650),t.default=()=>{const g=(0,m.useInjectable)(E.ITerminalController),c=(0,m.useInjectable)(E.ITerminalSearchService),h=(0,m.useInjectable)(E.ITerminalErrorService),u=(0,m.useInjectable)(E.ITerminalNetwork),d=l.default.useRef(null),v=l.default.useRef(null),f=(0,m.useInjectable)(E.ITerminalGroupViewService),a=(0,m.useAutorun)(f.currentGroupId),b=(0,m.useAutorun)(f.currentGroupIndex),y=(0,m.useAutorun)(f.groups);l.default.useEffect(()=>{const x=c.onVisibleChange(N=>{N&&d.current&&(d.current.focus(),d.current.value.length>0&&d.current.setSelectionRange(0,d.current.value.length))});return()=>x.dispose()},[c,d.current]);const[S,A]=l.default.useState(g.themeBackground);(0,m.useEventEffect)(g.onThemeBackgroundChange,x=>{A(x)});const[T,w]=l.default.useState(h.errors),D=(0,o.default)(()=>{w(h.errors)},m.FRAME_THREE);(0,m.useEventEffect)(h.onErrorsChange,D);const I=l.default.useCallback((x,N)=>{const j=g.findClientFromWidgetId(x.id);let K;return j?K=u.shouldReconnect(j.id)?void 0:T.get(j.id):K=T.get(x.id),l.default.createElement(s.default,{show:b===N,error:K,widget:x})},[b,g,T,u,f]),[O,P]=l.default.useState(c.isVisible);(0,m.useEventEffect)(c.onVisibleChange,x=>{P(x)});const[R,M]=l.default.useState(""),k=l.default.useCallback(x=>{c.text=x.target.value,c.search(),M(x.target.value)},[c]),B=l.default.useCallback(x=>{x.key==="Enter"&&c.search(),x.key==="Escape"&&(c.close(),c.clear())},[c]);return l.default.useEffect(()=>{v.current&&(g.initContextKey(v.current),g.viewReady.resolve())},[v.current]),l.default.createElement("div",{ref:v,className:_.default.terminalWrapper,style:{backgroundColor:S},"data-group-current":a},O&&l.default.createElement("div",{className:_.default.terminalSearch},l.default.createElement("div",{className:"kt-input-box"},l.default.createElement("input",{autoFocus:!0,ref:d,placeholder:(0,m.localize)("common.find"),value:R,onChange:k,onKeyDown:B})),l.default.createElement("div",{className:(0,r.default)(_.default.closeBtn,(0,m.getIcon)("close")),onClick:()=>c.close()})),y.map((x,N)=>{if(x.activated.get())return l.default.createElement("div",{"data-group-rendered":x.activated.get(),key:`terminal-${x.id}`,style:{display:b===N?"block":"none"},className:_.default.group,onFocus:g.focus.bind(g),onBlur:g.blur.bind(g),onContextMenu:g.onContextMenu.bind(g)},l.default.createElement(p.default,{shadow:!1,useFlex:!1,direction:p.ResizeDirection.horizontal,group:x,draw:j=>I(j,N)}))}))}},76970:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),l=e(26405),m=n.__importDefault(e(73567));function E(p,_,s){const g=()=>{s.removeWidget(p.id)},c=()=>{_.fix(p.id)};return p?.type===l.ETerminalErrorType.CREATE_FAIL?r.default.createElement("div",{className:m.default.terminalCover},r.default.createElement("div",null,(0,o.localize)("terminal.can.not.create"),": ",p.message),r.default.createElement("div",null,r.default.createElement("a",{onClick:g},(0,o.localize)("terminal.stop")),(0,o.localize)("terminal.or"),r.default.createElement("a",{onClick:c},(0,o.localize)("terminal.try.recreate")))):p.stopped?r.default.createElement("div",{className:m.default.terminalCover},r.default.createElement("div",null,(0,o.localize)("terminal.disconnected")),r.default.createElement("div",null,(0,o.localize)("terminal.can.not.reconnect"),r.default.createElement("a",{onClick:c},(0,o.localize)("terminal.try.reconnect")))):r.default.createElement("div",{className:m.default.terminalCover},r.default.createElement("div",null,(0,o.localize)("terminal.disconnected")),r.default.createElement("div",null,r.default.createElement("a",{onClick:g},(0,o.localize)("terminal.stop")),(0,o.localize)("terminal.or"),r.default.createElement("a",{onClick:c},(0,o.localize)("terminal.try.reconnect"))))}t.default=({widget:p,error:_,show:s})=>{const g=r.default.useRef(null),c=(0,o.useInjectable)(l.ITerminalErrorService),h=(0,o.useInjectable)(l.ITerminalGroupViewService);r.default.useEffect(()=>{g.current&&(p.element=g.current)},[]),r.default.useEffect(()=>{p.show=s},[s]),r.default.useEffect(()=>{p.error=!!_},[_]);const u=()=>{h.selectWidget(p.id)};return r.default.createElement("div",{className:m.default.terminalContainer},_?E(_,c,h):null,r.default.createElement("div",{"data-term-id":p.id,style:{display:_?"none":"block"},className:m.default.terminalContent,onFocus:u,ref:g}))}},21623:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(71852),t),n.__exportStar(e(43397),t),n.__exportStar(e(7082),t),n.__exportStar(e(11476),t),n.__exportStar(e(63341),t),n.__exportStar(e(96051),t),n.__exportStar(e(79404),t)},71852:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalCommandContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(63067),m=e(26405),E=e(48520),p=e(35628),_=e(94620);let s=class{onReconnect(){this.terminalController.reconnect()}onDisposeSideEffects(){}setDefaultTerminalType(c){this.preference.update("terminal.type",c)}registerCommands(c){c.registerCommand({...o.TERMINAL_COMMANDS.OPEN_SEARCH,iconClass:(0,o.getIcon)("search")},{execute:()=>{if(this.search.isVisible){this.search.close();return}this.search.open()}}),c.registerCommand({...o.TERMINAL_COMMANDS.SPLIT,iconClass:(0,o.getIcon)("embed")},{execute:()=>{const h=this.view.currentGroup.get();if(!h)return;const u=this.view.createWidget(h);this.view.selectWidget(u.id)}}),c.registerCommand(o.TERMINAL_COMMANDS.CLEAR,{execute:()=>{this.view.clear()}}),c.registerCommand(o.TERMINAL_COMMANDS.ADD,{execute:async()=>{await this.terminalController.createTerminalWithWidget({}),this.terminalController.showTerminalPanel()}}),c.registerCommand(o.TERMINAL_COMMANDS.TOGGLE_TERMINAL,{execute:()=>{this.terminalController.toggleTerminalPanel()}}),c.registerCommand(o.TERMINAL_COMMANDS.SEARCH_NEXT,{execute:()=>{this.search.isVisible?this.search.search():this.search.open()}}),c.registerCommand({...o.TERMINAL_COMMANDS.REMOVE,iconClass:(0,o.getIcon)("delete")},{execute:async()=>{const h=this.view.currentWidgetId.get();h&&this.view.removeWidget(h)}}),c.registerCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH,{execute:async h=>{h&&(await this.terminalApi.createTerminal({cwd:h.codeUri.fsPath})).show()}}),c.registerCommand(o.TERMINAL_COMMANDS.TAB_RENAME,{execute:async(h,u)=>{const d=this.view.getGroup(u);d&&d.edit()}}),c.registerCommand({...o.TERMINAL_COMMANDS.SELECT_ALL_CONTENT},{execute:()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.selectAll()}}),c.registerCommand({...o.TERMINAL_COMMANDS.CLEAR_CONTENT,iconClass:(0,o.getIcon)("clear")},{execute:()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.clear()}}),c.registerCommand({...o.TERMINAL_COMMANDS.CLEAR_ALL_CONTENT},{execute:()=>{this.terminalController.clearAllGroups()}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_ZSH,{execute:async()=>{this.setDefaultTerminalType("zsh")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_BASH,{execute:async()=>{this.setDefaultTerminalType("bash")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_SH,{execute:async()=>{this.setDefaultTerminalType("sh")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_POWERSHELL,{execute:async()=>{this.setDefaultTerminalType("powershell")}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_CMD,{execute:async()=>{this.setDefaultTerminalType("cmd")}}),c.registerCommand(o.TERMINAL_COMMANDS.MORE_SETTINGS,{execute:async()=>{this.commands.executeCommand(o.COMMON_COMMANDS.OPEN_PREFERENCES.id,"terminal")}}),c.registerCommand(o.TERMINAL_COMMANDS.COPY,{execute:async()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&await this.clipboardService.writeText(u.getSelection())}}),c.registerCommand(o.TERMINAL_COMMANDS.PASTE,{execute:async()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.paste(await this.clipboardService.readText())}}),c.registerCommand(o.TERMINAL_COMMANDS.SELECT_ALL,{execute:()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);u&&u.selectAll()}}),c.registerCommand(o.TERMINAL_COMMANDS.RE_LAUNCH,{execute:()=>{const h=this.view.groups.get();for(const u of h)u.widgets.get().forEach(v=>{const f=this.terminalController.findClientFromWidgetId(v.id);f&&f.reset()})}}),c.registerCommand(o.COMMON_COMMANDS.ENVIRONMENT_VARIABLE,{execute:async()=>await this.terminalEnvironmentService.getProcessEnv()}),c.registerCommand(o.TERMINAL_COMMANDS.FOCUS_NEXT_TERMINAL,{execute:()=>{const h=this.view.currentGroup.get();if(h&&h.widgets.get().length<=1)return;const u=this.getNextOrPrevTerminalClient("next");u?.focus()}}),c.registerCommand(o.TERMINAL_COMMANDS.FOCUS_PREVIOUS_TERMINAL,{execute:()=>{const h=this.view.currentGroup.get();if(h&&h.widgets.get().length<=1)return;const u=this.getNextOrPrevTerminalClient("prev");u?.focus()}}),c.registerCommand(o.TERMINAL_COMMANDS.KILL_PROCESS,{execute:async()=>{const h=this.view.currentWidgetId.get(),u=this.terminalController.findClientFromWidgetId(h);if(u){const d=u.getSelection();d&&d.length>0?await this.clipboardService.writeText(u.getSelection()):await this.terminalApi.sendText(h,"")}}})}getNextOrPrevTerminalClient(c){const h=this.view.currentGroup.get();if(!h)return;const u=h.widgets.get(),d=u.findIndex(a=>a.id===this.view.currentWidgetId.get());let v;c==="next"?v=d===u.length-1?0:d+1:v=d===0?u.length-1:d-1;const f=u[v];return this.terminalController.findClientFromWidgetId(f.id)}};t.TerminalCommandContribution=s,n.__decorate([(0,r.Autowired)(m.ITerminalController),n.__metadata("design:type",Object)],s.prototype,"terminalController",void 0),n.__decorate([(0,r.Autowired)(_.EnvironmentVariableServiceToken),n.__metadata("design:type",E.TerminalEnvironmentService)],s.prototype,"terminalEnvironmentService",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalGroupViewService),n.__metadata("design:type",Object)],s.prototype,"view",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalSearchService),n.__metadata("design:type",Object)],s.prototype,"search",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalRestore),n.__metadata("design:type",Object)],s.prototype,"store",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalApiService),n.__metadata("design:type",Object)],s.prototype,"terminalApi",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],s.prototype,"preference",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],s.prototype,"settingService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],s.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(l.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"mainlayoutService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],s.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.TerminalKeyBoardInputService)],s.prototype,"terminalInput",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],s.prototype,"clipboardService",void 0),t.TerminalCommandContribution=s=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ClientAppContribution)],s)},63341:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalKeybindingContribution=void 0;const n=e(85608),r=e(41869),o=e(66e3),l=e(40191),m=e(43718);let E=class{registerKeybindings(_){_.registerKeybinding({command:r.TERMINAL_COMMANDS.OPEN_SEARCH.id,keybinding:"ctrlcmd+f",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.CLEAR_CONTENT.id,keybinding:"ctrlcmd+k",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.SEARCH_NEXT.id,keybinding:"ctrlcmd+g",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.COPY.id,keybinding:m.isWindows?"ctrlcmd+shift+c":"ctrlcmd+c",when:l.RawContextKey.and(o.IsTerminalFocused.raw,"locationProtocol != http")}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.KILL_PROCESS.id,keybinding:"ctrlcmd+c",when:l.RawContextKey.and(o.IsTerminalFocused.raw,"locationProtocol != http","isWindows")}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.PASTE.id,keybinding:m.isWindows?"ctrlcmd+shift+v":"ctrlcmd+v",when:l.RawContextKey.and(o.IsTerminalFocused.raw,"locationProtocol != http")}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.SPLIT.id,keybinding:"ctrlcmd+\\",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.ADD.id,keybinding:"ctrl+shift+`"}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_NEXT_TERMINAL.id,keybinding:"ctrlcmd+alt+right",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_NEXT_TERMINAL.id,keybinding:"ctrlcmd+alt+down",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_PREVIOUS_TERMINAL.id,keybinding:"ctrlcmd+alt+left",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.FOCUS_PREVIOUS_TERMINAL.id,keybinding:"ctrlcmd+alt+up",when:o.IsTerminalFocused.raw}),_.registerKeybinding({command:r.TERMINAL_COMMANDS.TOGGLE_TERMINAL.id,keybinding:"ctrl+`"})}};t.TerminalKeybindingContribution=E,t.TerminalKeybindingContribution=E=n.__decorate([(0,m.Domain)(r.KeybindingContribution)],E)},43397:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLifeCycleContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(63067),m=e(26405),E=e(94620),p=e(43395),_=e(35628);let s=class{initialize(){(0,p.registerTerminalColors)()}onStart(){this.terminalInput.listen(),this.environmentService.initEnvironmentVariableCollections()}onDidRender(){this.store.restore().then(()=>{this.terminalController.firstInitialize()})}onStop(){this.terminalController.disposeTerminalClients({isTaskExecutor:!0}),this.store.save()}};t.TerminalLifeCycleContribution=s,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.TerminalKeyBoardInputService)],s.prototype,"terminalInput",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalController),n.__metadata("design:type",Object)],s.prototype,"terminalController",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalRestore),n.__metadata("design:type",Object)],s.prototype,"store",void 0),n.__decorate([(0,r.Autowired)(E.EnvironmentVariableServiceToken),n.__metadata("design:type",Object)],s.prototype,"environmentService",void 0),t.TerminalLifeCycleContribution=s=n.__decorate([(0,o.Domain)(o.ClientAppContribution,l.MainLayoutContribution)],s)},7082:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalMenuContribution=t.more2=t.more1Sub=t.more1=t.group=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(30144),m=e(93899),E=e(43718),p=e(26405);t.group="panel_menu",t.more1="more_1",t.more1Sub="more_1_sub",t.more2="more_2";let _=class{registerMenus(g){g.registerMenuItem(m.MenuId.TerminalTabContext,{command:{id:o.TERMINAL_COMMANDS.TAB_RENAME.id,label:(0,o.localize)("terminal.menu.rename")},order:1,group:t.group}),g.registerMenuItem(m.MenuId.TerminalTabContext,{command:{id:o.TERMINAL_COMMANDS.SPLIT.id,label:(0,o.localize)("terminal.menu.split")},order:2,group:t.group}),g.registerMenuItem(m.MenuId.TerminalTabContext,{command:{id:o.TERMINAL_COMMANDS.REMOVE.id,label:(0,o.localize)("terminal.menu.stopGroup")},order:3,group:t.group}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.COPY,group:"1_modify"}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.PASTE,group:"1_modify"}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.SELECT_ALL,group:"1_modify"}),g.registerMenuItem(m.MenuId.TerminalInstanceContext,{command:o.TERMINAL_COMMANDS.CLEAR_CONTENT,group:"1_modify"});const c=(0,o.getSlotLocation)("@opensumi/ide-terminal-next",this.config.layoutConfig),h=(0,o.getTabbarCtxKey)(c),u=(0,m.getTabbarCommonMenuId)(c),d=`${h} == ${l.TERMINAL_CONTAINER_ID}`;g.registerMenuItem(u,{command:o.TERMINAL_COMMANDS.CLEAR,order:1,group:t.more1,when:d}),g.registerMenuItem(u,{command:o.TERMINAL_COMMANDS.CLEAR_ALL_CONTENT,order:1,group:t.more1,when:d}),g.registerMenuItem(u,{label:(0,o.localize)("terminal.menu.selectType"),submenu:m.MenuId.TerminalDefaultTypeMenu,order:1,group:t.more2,when:d}),E.isWindows?g.registerMenuItems(m.MenuId.TerminalDefaultTypeMenu,[{command:o.TERMINAL_COMMANDS.SELECT_CMD,order:1,group:t.more1Sub,toggledWhen:"config.terminal.type == cmd",when:d},{command:o.TERMINAL_COMMANDS.SELECT_POWERSHELL,order:2,group:t.more1Sub,toggledWhen:"config.terminal.type == powershell",when:d}]):g.registerMenuItems(m.MenuId.TerminalDefaultTypeMenu,[{command:o.TERMINAL_COMMANDS.SELECT_ZSH,order:1,group:t.more1Sub,toggledWhen:"config.terminal.type == zsh",when:d},{command:o.TERMINAL_COMMANDS.SELECT_BASH,order:2,group:t.more1Sub,toggledWhen:"config.terminal.type == bash",when:d},{command:o.TERMINAL_COMMANDS.SELECT_SH,order:3,group:t.more1Sub,toggledWhen:"config.terminal.type == sh",when:d}]),g.registerMenuItem(u,{command:o.TERMINAL_COMMANDS.MORE_SETTINGS,order:1,group:t.more2,when:d})}};t.TerminalMenuContribution=_,n.__decorate([(0,r.Autowired)(p.ITerminalController),n.__metadata("design:type",Object)],_.prototype,"terminalController",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalGroupViewService),n.__metadata("design:type",Object)],_.prototype,"view",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalSearchService),n.__metadata("design:type",Object)],_.prototype,"search",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],_.prototype,"settingService",void 0),n.__decorate([(0,r.Autowired)(E.CommandService),n.__metadata("design:type",Object)],_.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],_.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preference",void 0),t.TerminalMenuContribution=_=n.__decorate([(0,E.Domain)(m.MenuContribution)],_)},96051:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNetworkContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(26405);let E=class extends l.WithEventBus{onStart(){this.network.bindErrors()}handleBrowserConnectionOpen(_){this.network.setStatus(m.TerminalNetworkStatus.CONNECTED)}handleBrowserConnectionClose(_){this.network.setStatus(m.TerminalNetworkStatus.DISCONNECTED)}};t.TerminalNetworkContribution=E,n.__decorate([(0,r.Autowired)(m.ITerminalNetwork),n.__metadata("design:type",Object)],E.prototype,"network",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalInternalService),n.__metadata("design:type",Object)],E.prototype,"service",void 0),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.BrowserConnectionOpenEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"handleBrowserConnectionOpen",null),n.__decorate([(0,l.OnEvent)(l.BrowserConnectionCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[l.BrowserConnectionCloseEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"handleBrowserConnectionClose",null),t.TerminalNetworkContribution=E=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],E)},79404:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalPreferenceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(26405),E=e(3276),p=e(91815);let _=class{constructor(){this.schema=E.terminalPreferenceSchema;const g=["git-bash","powershell","cmd","default"],{properties:{["terminal.type"]:c}}={...E.terminalPreferenceSchema};this.ptyTerminal.getOS().then(h=>{h===l.OperatingSystem.Windows&&this.preferenceSchemaProvider.setSchema({properties:{"terminal.type":{...c,enum:g}}},!0)})}};t.TerminalPreferenceContribution=_,n.__decorate([(0,r.Autowired)(m.ITerminalService),n.__metadata("design:type",p.NodePtyTerminalService)],_.prototype,"ptyTerminal",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],_.prototype,"preferenceSchemaProvider",void 0),t.TerminalPreferenceContribution=_=n.__decorate([(0,l.Domain)(o.PreferenceContribution),n.__metadata("design:paramtypes",[])],_)},11476:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalRenderContribution=void 0;const r=e(85608),o=e(41869),l=e(30144),m=r.__importDefault(e(17632)),E=r.__importDefault(e(48139));let p=n=class{registerToolbarItems(s){s.registerItem({id:o.TERMINAL_COMMANDS.OPEN_SEARCH.id,command:o.TERMINAL_COMMANDS.OPEN_SEARCH.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.search")}),s.registerItem({id:o.TERMINAL_COMMANDS.CLEAR_CONTENT.id,command:o.TERMINAL_COMMANDS.CLEAR_CONTENT.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.menu.clearCurrentContent")}),s.registerItem({id:o.TERMINAL_COMMANDS.SPLIT.id,command:o.TERMINAL_COMMANDS.SPLIT.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.split")}),s.registerItem({id:o.TERMINAL_COMMANDS.REMOVE.id,command:o.TERMINAL_COMMANDS.REMOVE.id,viewId:n.viewId,tooltip:(0,o.localize)("terminal.remove")})}registerComponent(s){s.register("@opensumi/ide-terminal-next",{component:E.default,id:n.viewId},{title:(0,o.localize)("terminal.name"),priority:1,activateKeyBinding:"ctrl+`",containerId:n.viewId,titleComponent:m.default})}};t.TerminalRenderContribution=p,p.viewId=l.TERMINAL_CONTAINER_ID,t.TerminalRenderContribution=p=n=r.__decorate([(0,o.Domain)(o.ComponentContribution,o.TabBarToolbarContribution)],p)},17236:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNextModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26405),m=e(94620),E=e(3276),p=e(21623),_=e(98944),s=e(69061),g=e(7734),c=e(48520),h=e(102),u=e(53891),d=e(82022),v=e(12642),f=e(13663),a=e(89570),b=e(94486),y=e(46666),S=e(70406),A=e(12894),T=e(91815),w=e(29041),D=e(68611);let I=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.TerminalLifeCycleContribution,p.TerminalRenderContribution,p.TerminalCommandContribution,p.TerminalMenuContribution,p.TerminalKeybindingContribution,p.TerminalNetworkContribution,p.TerminalPreferenceContribution,{token:l.ITerminalApiService,useClass:_.TerminalApiService},{token:l.ITerminalController,useClass:g.TerminalController},{token:l.ITerminalTheme,useClass:w.TerminalTheme},{token:l.ITerminalSearchService,useClass:A.TerminalSearchService},{token:l.ITerminalHoverManagerService,useClass:u.TerminalHoverManagerService},{token:l.ITerminalGroupViewService,useClass:D.TerminalGroupViewService},{token:l.ITerminalErrorService,useClass:h.TerminalErrorService},{token:l.ITerminalService,useClass:T.NodePtyTerminalService},{token:l.ITerminalInternalService,useClass:d.TerminalInternalService},{token:l.ITerminalRestore,useClass:S.TerminalRestore},{token:E.ITerminalPreference,useClass:f.TerminalPreference},{token:l.ITerminalRenderProvider,useClass:y.TerminalRenderProvider},{token:l.ITerminalClientFactory2,useFactory:s.createTerminalClientFactory2},{token:l.ITerminalNetwork,useClass:v.TerminalNetworkService},{token:m.EnvironmentVariableServiceToken,useClass:c.TerminalEnvironmentService},{token:l.ITerminalProfileService,useClass:a.TerminalProfileService},{token:l.ITerminalProfileInternalService,useClass:b.TerminalProfileInternalService}],this.backServices=[{servicePath:l.ITerminalServicePath,clientToken:l.ITerminalService},{servicePath:l.ITerminalProcessPath,clientToken:m.EnvironmentVariableServiceToken}]}};t.TerminalNextModule=I,t.TerminalNextModule=I=n.__decorate([(0,r.Injectable)()],I)},67245:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalBaseLinkProvider=void 0;class e{async provideLinks(r,o){var l;(l=this._activeLinks)===null||l===void 0||l.forEach(m=>m.dispose),this._activeLinks=await this._provideLinks(r),o(this._activeLinks)}}t.TerminalBaseLinkProvider=e},52826:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalExternalLinkProviderAdapter=void 0;const n=e(85608),r=e(76003),o=e(67245),l=e(28247),m=e(97144);let E=class extends o.TerminalBaseLinkProvider{constructor(_,s,g,c,h){super(),this._xterm=_,this._instance=s,this._externalLinkProvider=g,this._wrapLinkHandler=c,this._tooltipCallback=h}async _provideLinks(_){var s,g;let c=_-1,h=c;const u=[this._xterm.buffer.active.getLine(c)];for(;c>=0&&(!((s=this._xterm.buffer.active.getLine(c))===null||s===void 0)&&s.isWrapped);)u.unshift(this._xterm.buffer.active.getLine(c-1)),c--;for(;h<this._xterm.buffer.active.length&&(!((g=this._xterm.buffer.active.getLine(h+1))===null||g===void 0)&&g.isWrapped);)u.push(this._xterm.buffer.active.getLine(h+1)),h++;const d=(0,l.getXtermLineContent)(this._xterm.buffer.active,c,h,this._xterm.cols);if(d.trim().length===0)return[];const v=await this._externalLinkProvider.provideLinks(this._instance,d);return v?v.map(f=>{const a=(0,l.convertLinkRangeToBuffer)(u,this._xterm.cols,{startColumn:f.startIndex+1,startLineNumber:1,endColumn:f.startIndex+f.length+1,endLineNumber:1},c),b=d.substr(f.startIndex,f.length)||"",y=this._wrapLinkHandler((S,A)=>f.activate(A));return this.injector.get(m.TerminalLink,[this._xterm,a,b,this._xterm.buffer.active.viewportY,y,this._tooltipCallback,!0,f.label])}):[]}};t.TerminalExternalLinkProviderAdapter=E,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],E.prototype,"injector",void 0),t.TerminalExternalLinkProviderAdapter=E=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Object,Object,Function,Function])],E)},28247:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertLinkRangeToBuffer=e,t.convertBufferRangeToViewport=n,t.getXtermLineContent=r,t.positionIsInRange=o;function e(l,m,E,p){const _={start:{x:E.startColumn,y:E.startLineNumber+p},end:{x:E.endColumn-1,y:E.endLineNumber+p}};let s=0;const g=Math.ceil(E.startColumn/m);for(let u=0;u<Math.min(g);u++){const d=Math.min(m,E.startColumn-u*m);let v=0;const f=l[u];if(!f)break;for(let a=0;a<Math.min(m,d+v);a++){const b=f.getCell(a);b.getWidth()===2&&v++;const S=b.getChars();S.length>1&&(v-=S.length-1)}s+=v}let c=0;const h=Math.ceil(E.endColumn/m);for(let u=Math.max(0,g-1);u<h;u++){const d=u===g-1?(E.startColumn+s)%m:0,v=Math.min(m,E.endColumn+s-u*m),f=u===g-1?s:0;let a=0;const b=l[u];if(!b)break;for(let y=d;y<Math.min(m,v+a+f);y++){const S=b.getCell(y);S.getWidth()===2&&a++,y===m-1&&S.getChars()===""&&a++}c+=a}for(_.start.x+=s,_.end.x+=s+c;_.start.x>m;)_.start.x-=m,_.start.y++;for(;_.end.x>m;)_.end.x-=m,_.end.y++;return _}function n(l,m){return{start:{x:l.start.x-1,y:l.start.y-m-1},end:{x:l.end.x-1,y:l.end.y-m-1}}}function r(l,m,E,p){let _="";for(let s=m;s<=E;s++){const g=l.getLine(s);g&&(_+=g.translateToString(!0,0,p))}return _}function o(l,m){return!(l.y<m.start.y||l.y>m.end.y||l.y===m.start.y&&l.x<m.start.x||l.y===m.end.y&&l.x>m.end.x)}},29970:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLinkManager=void 0;const n=e(85608),r=e(87083),o=e(76003),l=e(41869),m=e(43718),E=e(23418),p=e(14951),_=e(26405),s=e(69061),g=e(52826),c=e(11192),h=e(73481),u=e(67251),{posix:d,win32:v}=m.path;let f=class extends m.Disposable{constructor(b,y){super(),this._xterm=b,this._client=y,this._standardLinkProviders=[],this._standardLinkProvidersDisposables=new m.DisposableCollection;const S=this._wrapLinkHandler((I,O)=>this._handleProtocolLink(O)),A=this.injector.get(c.TerminalProtocolLinkProvider,[this._xterm,S,this._tooltipCallback.bind(this)]);this._standardLinkProviders.push(A);const T=this._wrapLinkHandler((I,O)=>this._handleLocalLink(O)),w=this.injector.get(h.TerminalValidatedLocalLinkProvider,[this._xterm,this._client,T,this._wrapLinkHandler.bind(this),this._tooltipCallback.bind(this),async(I,O)=>O(await this._resolvePath(I))]);this._standardLinkProviders.push(w);const D=this.injector.get(u.TerminalWordLinkProvider,[this._xterm,async(I,O)=>O(await this._resolvePath(I)),T]);this._standardLinkProviders.push(D),this._registerStandardLinkProviders()}set processCwd(b){this._processCwd=b}async getTerminalCwd(){return await this.terminalService.getCwd(this._client.id)||this._processCwd}_registerStandardLinkProviders(){this._standardLinkProvidersDisposables.dispose(),this._standardLinkProvidersDisposables=new m.DisposableCollection;for(const b of this._standardLinkProviders)this._standardLinkProvidersDisposables.push(this._xterm.registerLinkProvider(b))}_tooltipCallback(b,y,S,A){const T=this._xterm._core,w={width:T._renderService.dimensions.css.cell.width,height:T._renderService.dimensions.css.cell.height},D={width:this._xterm.cols,height:this._xterm.rows},I=T.element.getBoundingClientRect();return this._showHover({viewportRange:y,cellDimensions:w,terminalDimensions:D,boundingClientRect:I,modifierDownCallback:S,modifierUpCallback:A},this._getLinkHoverString(b.text,b.label),O=>b.activate(void 0,O),b)}_showHover(b,y,S,A){const T=this._hoverManager.showHover(b,y,S);return A?.onInvalidated(()=>T.dispose()),m.Disposable.create(()=>T.dispose())}registerExternalLinkProvider(b,y){const S=this.injector.get(g.TerminalExternalLinkProviderAdapter,[this._xterm,b,y,this._wrapLinkHandler.bind(this),this._tooltipCallback.bind(this)]),A=this._xterm.registerLinkProvider(S);return this._registerStandardLinkProviders(),A}_wrapLinkHandler(b){return async(y,S)=>{y?.preventDefault(),!(y&&!this._isLinkActivationModifierDown(y))&&b(y,S)}}get _localLinkRegex(){const b=this._client.os===m.OperatingSystem.Windows?h.winLocalLinkClause:h.unixLocalLinkClause;return new RegExp(`${b}(${h.lineAndColumnClause})`)}async _handleLocalLink(b){const y=await this._resolvePath(b);if(!y)return;const S=this.extractLineColumnInfo(b),A={startLineNumber:S.lineNumber,endLineNumber:S.lineNumber,startColumn:S.columnNumber,endColumn:S.columnNumber};await this._editorService.open(y.uri,{range:A})}_handleHypertextLink(b){this._openerService.open(b)}async _handleProtocolLink(b){const y=m.URI.parse(b);if(y.scheme===m.Schemes.file){const S=m.FileUri.fsPath(y);this._handleLocalLink(this._client.os!==m.OperatingSystem.Windows&&m.isWindows?S.replace(/\\/g,d.sep):S);return}this._handleHypertextLink(b)}_isLinkActivationModifierDown(b){return m.isOSX?b.metaKey:b.ctrlKey}get osPath(){return this._client.os===m.OperatingSystem.Windows?v:d}_getLinkHoverString(b,y){const S=this.preferenceService.get("editor.multiCursorModifier");let A="";S==="ctrlCmd"?m.isMacintosh?A=(0,m.localize)("terminalLinkHandler.followLinkAlt.mac","option + click"):A=(0,m.localize)("terminalLinkHandler.followLinkAlt","alt + click"):m.isMacintosh?A=(0,m.localize)("terminalLinkHandler.followLinkCmd","cmd + click"):A=(0,m.localize)("terminalLinkHandler.followLinkCtrl","ctrl + click");const T=(0,m.localize)("followLink","Follow link");return y=y||T,`${y} (${A})`}async _getUserHomeDir(){const b=await this._fileSystem.getCurrentUserHome();if(!b)throw new Error("Unable to get user home directory");return await this._fileSystem.getFsPath(b.uri)}_getUserHomeDirOnce(){return this._getHomeDirPromise||(this._getHomeDirPromise=this._getUserHomeDir()),this._getHomeDirPromise}async _preprocessPath(b){if(b.charAt(0)==="~"){const y=await this._getUserHomeDirOnce();if(!y)return null;b=this.osPath.join(y,b.substring(1))}else if(b.charAt(0)!=="/"&&b.charAt(0)!=="~"){const y=await this.getTerminalCwd();if(this._client.os===m.OperatingSystem.Windows)if(!b.match("^"+h.winDrivePrefix)&&!b.startsWith("\\\\?\\")){if(!y)return null;b=this.osPath.join(y,b)}else b=b.replace(/^\\\\\?\\/,"");else{if(!y)return null;b=this.osPath.join(y,b)}}return b=this.osPath.normalize(b),b}async _resolvePath(b){const y=await this._preprocessPath(b);if(y)try{const S=m.URI.file(y),A=await this._fileService.getFileStat(S.toString());if(A)return{uri:S,isDirectory:A.isDirectory}}catch{return}}extractLineColumnInfo(b){const y=this._localLinkRegex.exec(b),S={lineNumber:1,columnNumber:1};if(!y)return S;const A=this._client.os===m.OperatingSystem.Windows?h.winLineAndColumnMatchIndex:h.unixLineAndColumnMatchIndex;for(let T=0;T<h.lineAndColumnClause.length;T++){const w=A+h.lineAndColumnClauseGroupCount*T,D=y[w];if(D){S.lineNumber=parseInt(D,10);const I=y[w+2];I&&(S.columnNumber=parseInt(I,10));break}}return S}extractLinkUrl(b){const y=this._localLinkRegex.exec(b);return y?y[1]:null}};t.TerminalLinkManager=f,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(_.ITerminalService),n.__metadata("design:type",Object)],f.prototype,"terminalService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",E.WorkbenchEditorService)],f.prototype,"_editorService",void 0),n.__decorate([(0,o.Autowired)(l.IOpenerService),n.__metadata("design:type",Object)],f.prototype,"_openerService",void 0),n.__decorate([(0,o.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],f.prototype,"_fileService",void 0),n.__decorate([(0,o.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],f.prototype,"_fileSystem",void 0),n.__decorate([(0,o.Autowired)(l.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(_.ITerminalHoverManagerService),n.__metadata("design:type",Object)],f.prototype,"_hoverManager",void 0),t.TerminalLinkManager=f=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[r.Terminal,s.TerminalClient])],f)},97144:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLink=t.FOLDER_NOT_IN_WORKSPACE_LABEL=t.FOLDER_IN_WORKSPACE_LABEL=t.OPEN_FILE_LABEL=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(28247),E=500;t.OPEN_FILE_LABEL=(0,l.localize)("terminal.openFile","Open file in editor"),t.FOLDER_IN_WORKSPACE_LABEL=(0,l.localize)("terminal.focusFolder","Focus folder in explorer"),t.FOLDER_NOT_IN_WORKSPACE_LABEL=(0,l.localize)("terminal.openFolder","Open folder in new window");let p=class extends l.Disposable{get onInvalidated(){return this._onInvalidated.event}constructor(s,g,c,h,u,d,v,f){super(),this._xterm=s,this.range=g,this.text=c,this._viewportY=h,this._activateCallback=u,this._tooltipCallback=d,this._isHighConfidenceLink=v,this.label=f,this._onInvalidated=new l.Emitter,this.decorations={pointerCursor:!1,underline:this._isHighConfidenceLink}}dispose(){var s,g,c;super.dispose(),(s=this._hoverListeners)===null||s===void 0||s.dispose(),this._hoverListeners=void 0,(g=this._tooltipScheduler)===null||g===void 0||g.dispose(),this._tooltipScheduler=void 0,(c=this._tooltipDisposable)===null||c===void 0||c.dispose(),this._tooltipDisposable=void 0}activate(s,g){this._activateCallback(s,g)}hover(s,g){this._hoverListeners=new l.DisposableCollection,this._hoverListeners.push((0,o.addDisposableListener)(document,"keydown",h=>{!h.repeat&&this._isModifierDown(h)&&this._enableDecorations()})),this._hoverListeners.push((0,o.addDisposableListener)(document,"keyup",h=>{!h.repeat&&!this._isModifierDown(h)&&this._disableDecorations()})),this._hoverListeners.push(this._xterm.onRender(h=>{const u=this.range.start.y-this._viewportY;u>=h.start&&u<=h.end&&this._onInvalidated.fire()})),this._isHighConfidenceLink&&(this._tooltipScheduler=new l.RunOnceScheduler(()=>{var h;this._tooltipDisposable=this._tooltipCallback(this,(0,m.convertBufferRangeToViewport)(this.range,this._viewportY),this._isHighConfidenceLink?()=>this._enableDecorations():void 0,this._isHighConfidenceLink?()=>this._disableDecorations():void 0),(h=this._tooltipScheduler)===null||h===void 0||h.dispose(),this._tooltipScheduler=void 0},this.preferenceService.get("editor.hover.delay")||E),this._tooltipScheduler.schedule());const c={x:s.pageX,y:s.pageY};this._hoverListeners.push((0,o.addDisposableListener)(document,"mousemove",h=>{var u;this._isModifierDown(h)?this._enableDecorations():this._disableDecorations(),(Math.abs(h.pageX-c.x)>window.devicePixelRatio*2||Math.abs(h.pageY-c.y)>window.devicePixelRatio*2)&&(c.x=h.pageX,c.y=h.pageY,(u=this._tooltipScheduler)===null||u===void 0||u.schedule())}))}leave(){var s,g,c;(s=this._hoverListeners)===null||s===void 0||s.dispose(),this._hoverListeners=void 0,(g=this._tooltipScheduler)===null||g===void 0||g.dispose(),this._tooltipScheduler=void 0,(c=this._tooltipDisposable)===null||c===void 0||c.dispose(),this._tooltipDisposable=void 0}_enableDecorations(){this.decorations.pointerCursor||(this.decorations.pointerCursor=!0),this.decorations.underline||(this.decorations.underline=!0)}_disableDecorations(){this.decorations.pointerCursor&&(this.decorations.pointerCursor=!1),this.decorations.underline!==this._isHighConfidenceLink&&(this.decorations.underline=this._isHighConfidenceLink)}_isModifierDown(s){return l.isOSX?s.metaKey:s.ctrlKey}};t.TerminalLink=p,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),t.TerminalLink=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Object,String,Number,Function,Function,Boolean,Object])],p)},11192:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProtocolLinkProvider=void 0;const n=e(85608),r=e(76003),o=e(26405),l=e(67245),m=e(28247),E=e(97144);let p=class extends l.TerminalBaseLinkProvider{constructor(g,c,h){super(),this._xterm=g,this._activateCallback=c,this._tooltipCallback=h}_provideLinks(g){var c,h;let u=g-1,d=u;const v=[this._xterm.buffer.active.getLine(u)];for(;u>=0&&(!((c=this._xterm.buffer.active.getLine(u))===null||c===void 0)&&c.isWrapped);)v.unshift(this._xterm.buffer.active.getLine(u-1)),u--;for(;d<this._xterm.buffer.active.length&&(!((h=this._xterm.buffer.active.getLine(d+1))===null||h===void 0)&&h.isWrapped);)v.push(this._xterm.buffer.active.getLine(d+1)),d++;return this._linkComputerTarget=new _(this._xterm,u,d),o.LinkComputer.computeLinks(this._linkComputerTarget).map(a=>{var b;const y=(0,m.convertLinkRangeToBuffer)(v,this._xterm.cols,a.range,u);return this.injector.get(E.TerminalLink,[this._xterm,y,((b=a.url)===null||b===void 0?void 0:b.toString())||"",this._xterm.buffer.active.viewportY,this._activateCallback,this._tooltipCallback,!0,void 0])})}};t.TerminalProtocolLinkProvider=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.TerminalProtocolLinkProvider=p=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Function,Function])],p);class _{constructor(g,c,h){this._xterm=g,this._lineStart=c,this._lineEnd=h}getLineCount(){return 1}getLineContent(){return(0,m.getXtermLineContent)(this._xterm.buffer.active,this._lineStart,this._lineEnd,this._xterm.cols)}}},73481:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalValidatedLocalLinkProvider=t.lineAndColumnClauseGroupCount=t.unixLineAndColumnMatchIndex=t.winLineAndColumnMatchIndex=t.lineAndColumnClause=t.winLocalLinkClause=t.winDrivePrefix=t.unixLocalLinkClause=void 0;const n=e(85608),r=e(76003),o=e(11050),l=e(66894),m=e(43718),E=e(97408),p=e(67245),_=e(28247),s=e(97144),g="(\\.\\.?|\\~)",c="\\/",h="[^\\0\\s!`&*()\\[\\]'\":;\\\\]";t.unixLocalLinkClause="(("+g+"|("+h+")+)?("+c+"("+h+")+)+)",t.winDrivePrefix="(?:\\\\\\\\\\?\\\\)?[a-zA-Z]:";const u="("+t.winDrivePrefix+"|\\.\\.?|\\~)",d="(\\\\|\\/)",v="[^\\0<>\\?\\|\\/\\s!`&*()\\[\\]'\":;]";t.winLocalLinkClause="(("+u+"|("+v+")+)?("+d+"("+v+")+)+)",t.lineAndColumnClause=[`((\\S*)['"], line ((\\d+)( column (\\d+))?))`,`((\\S*)['"],((\\d+)(:(\\d+))?))`,"((\\S*) on line ((\\d+)(, column (\\d+))?))","((\\S*):line ((\\d+)(, column (\\d+))?))","(([^\\s\\(\\)]*)(\\s?[\\(\\[](\\d+)(,\\s?(\\d+))?)[\\)\\]])",`(([^:\\s\\(\\)<>'"\\[\\]]*)(:(\\d+))?(:(\\d+))?)`].join("|").replace(/ /g,"[\xA0 ]"),t.winLineAndColumnMatchIndex=12,t.unixLineAndColumnMatchIndex=11,t.lineAndColumnClauseGroupCount=6;const f=2e3;let a=class extends p.TerminalBaseLinkProvider{constructor(y,S,A,T,w,D){super(),this._xterm=y,this._client=S,this._activateFileCallback=A,this._wrapLinkHandler=T,this._tooltipCallback=w,this._validationCallback=D}async _provideLinks(y){var S,A;const T=[];let w=y-1,D=w;const I=[this._xterm.buffer.active.getLine(w)];for(;w>=0&&(!((S=this._xterm.buffer.active.getLine(w))===null||S===void 0)&&S.isWrapped);)I.unshift(this._xterm.buffer.active.getLine(w-1)),w--;for(;D<this._xterm.buffer.active.length&&(!((A=this._xterm.buffer.active.getLine(D+1))===null||A===void 0)&&A.isWrapped);)I.push(this._xterm.buffer.active.getLine(D+1)),D++;const O=(0,_.getXtermLineContent)(this._xterm.buffer.active,w,D,this._xterm.cols);if(O.length>f)return[];const P=new RegExp(this._localLinkRegex,"g");let R,M=-1;for(;(R=P.exec(O))!==null;){let k=R[0];if(!k||(M=O.indexOf(k,M+1),P.lastIndex=M+k.length,M<0))break;((O.startsWith("--- a/")||O.startsWith("+++ b/"))&&M===4||O.startsWith("diff --git")&&(k.startsWith("a/")||k.startsWith("b/")))&&(k=k.substring(2),M+=2);const B=await this.detectLocalLink(k,I,w,M,1);B.length>0&&T.push(...B)}if(T.length===0){const k=await this.detectLocalLink(O,I,w,M,2);k.length>0&&T.push(...k)}return T}async detectLocalLink(y,S,A,T,w){const D=[],I=await new Promise(O=>{this._validationCallback(y,async P=>{if(P){const R=P.isDirectory?await this._isDirectoryInsideWorkspace(P.uri)?s.FOLDER_IN_WORKSPACE_LABEL:s.FOLDER_NOT_IN_WORKSPACE_LABEL:s.OPEN_FILE_LABEL,M=this._wrapLinkHandler((B,x)=>{P.isDirectory?this._handleLocalFolderLink(P.uri):this._activateFileCallback(B,x)}),k=(0,_.convertLinkRangeToBuffer)(S,this._xterm.cols,{startColumn:T+1,startLineNumber:1,endColumn:T+y.length+w,endLineNumber:1},A);O(this.injector.get(s.TerminalLink,[this._xterm,k,y,this._xterm.buffer.active.viewportY,M,this._tooltipCallback,!0,R]))}else O(void 0)})});return I&&D.push(I),D}get _localLinkRegex(){const y=this._client.os===m.OperatingSystem.Windows?t.winLocalLinkClause:t.unixLocalLinkClause;return new RegExp(`${y}(${t.lineAndColumnClause})`)}async _handleLocalFolderLink(y){if(await this._isDirectoryInsideWorkspace(y)){await this.commandService.executeCommand("revealInExplorer",y);return}this.appConfig.isElectronRenderer&&this.windowService.openWorkspace(y,{newWindow:!0})}async _isDirectoryInsideWorkspace(y){const S=await this.workspaceService.roots;for(const A of S)if(m.URI.parse(A.uri).isEqualOrParent(y))return!0;return!1}};t.TerminalValidatedLocalLinkProvider=a,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],a.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(l.IWindowService),n.__metadata("design:type",Object)],a.prototype,"windowService",void 0),n.__decorate([(0,r.Autowired)(m.CommandService),n.__metadata("design:type",Object)],a.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],a.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],a.prototype,"appConfig",void 0),t.TerminalValidatedLocalLinkProvider=a=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Function,Function,Function,Function,Function,Function])],a)},67251:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalWordLinkProvider=t.USUAL_WORD_SEPARATORS=void 0;const n=e(85608),r=e(87083),o=e(76003),l=e(74404),m=e(11050),E=e(66894),p=e(43718),_=e(92323),s=e(97408),g=e(70845),c=e(67245),h=e(28247),u=e(97144);t.USUAL_WORD_SEPARATORS=" ()[]{}',\"`\u2500\u2018\u2019\u201C\u201D|";let d=class extends c.TerminalBaseLinkProvider{constructor(f,a,b){super(),this._xterm=f,this._validationCallback=a,this._activateFileCallback=b,this._refreshSeparatorCodes()}_refreshSeparatorCodes(){let f="";for(let a=57520;a<=57535;a++)f+=String.fromCharCode(a);this._separatorRegex=new RegExp(`[${(0,g.escapeRegExpCharacters)(t.USUAL_WORD_SEPARATORS)}${f}]`,"g")}_provideLinks(f){const a=[],b=f-1,y=b,S=[this._xterm.buffer.active.getLine(b)],A=(0,h.getXtermLineContent)(this._xterm.buffer.active,b,y,this._xterm.cols);if(A===""||A.length>1024)return[];const T=this._parseWords(A);for(const w of T){if(w.text==="")continue;w.text.length>0&&w.text.charAt(w.text.length-1)===":"&&(w.text=w.text.slice(0,-1),w.endIndex--);const D=(0,h.convertLinkRangeToBuffer)(S,this._xterm.cols,{startColumn:w.startIndex+1,startLineNumber:1,endColumn:w.endIndex+1,endLineNumber:1},b),I=(O,P)=>{this._validationCallback(P,async R=>{R?R.isDirectory?this._handleLocalFolderLink(R.uri):this._activateFileCallback(O,P):this.quickOpenService.open(P)})};a.push(this.injector.get(u.TerminalLink,[this._xterm,D,w.text,this._xterm.buffer.active.viewportY,I,void 0,!0,w.text]))}return a}async _handleLocalFolderLink(f){if(await this._isDirectoryInsideWorkspace(f)){await this.commandService.executeCommand("revealInExplorer",f);return}this.appConfig.isElectronRenderer&&this.windowService.openWorkspace(f,{newWindow:!0})}_parseWords(f){const a=[],b=f.split(this._separatorRegex);let y=0;for(let S=0;S<b.length;S++)a.push({text:b[S],startIndex:y,endIndex:y+b[S].length}),y+=b[S].length+1;return a}async _isDirectoryInsideWorkspace(f){const a=await this.workspaceService.roots;for(const b of a)if(p.URI.parse(b.uri).isEqualOrParent(f))return!0;return!1}};t.TerminalWordLinkProvider=d,n.__decorate([(0,o.Autowired)(m.AppConfig),n.__metadata("design:type",Object)],d.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(_.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(E.IWindowService),n.__metadata("design:type",Object)],d.prototype,"windowService",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],d.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(l.PrefixQuickOpenService),n.__metadata("design:type",Object)],d.prototype,"quickOpenService",void 0),t.TerminalWordLinkProvider=d=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[r.Terminal,Function,Function])],d)},62810:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_COL=t.DEFAULT_ROW=t.AttachAddon=void 0;const n=e(43718);class r extends n.Disposable{constructor(){super(...arguments),this._onData=new n.Emitter,this.onData=this._onData.event,this._onExit=new n.Emitter,this.onExit=this._onExit.event,this._onTime=new n.Emitter,this.onTime=this._onTime.event,this._lastInputTime=0,this._onBeforeProcessData=new n.Emitter,this.onBeforeProcessData=this._onBeforeProcessData.event}setConnection(l){this._disposeConnection&&(this._disposeConnection.dispose(),this._disposeConnection=null),this.connection=l,l&&(this._disposeConnection=new n.Disposable(l.onData(m=>{let E=m;if(typeof m=="string"){const p={data:m};this._onBeforeProcessData.fire(p),p.data!==void 0&&(E=p.data)}if(this._onData.fire(E),this._terminal.write(typeof E=="string"?E:new Uint8Array(E,0,E.byteLength)),this._lastInputTime){const p=Date.now()-this._lastInputTime;this._lastInputTime=0,this._onTime.fire(p)}})),l.onExit&&this._disposeConnection.addDispose(l.onExit(m=>{this._onExit.fire(m)})))}async activate(l){this._terminal=l,this.addDispose(n.Disposable.create(()=>{var m;return(m=this._disposeConnection)===null||m===void 0?void 0:m.dispose()})),this.addDispose(l.onData(m=>this._sendData(m))),this.addDispose(l.onBinary(m=>this._sendBinary(m)))}_sendData(l){!this.connection||this.connection.readonly||(this._timeResponse(),this.connection.sendData(l))}_sendBinary(l){if(!this.connection||this.connection.readonly)return;const m=new Uint8Array(l.length);for(let E=0;E<l.length;++E)m[E]=l.charCodeAt(E)&255;this._timeResponse(),this.connection.sendData(m)}_timeResponse(){this._lastInputTime=Date.now()}}t.AttachAddon=r,t.DEFAULT_ROW=80,t.DEFAULT_COL=24},98944:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalApiService=void 0;const n=e(85608),r=n.__importDefault(e(56005)),o=e(76003),l=e(43718),m=e(28423),E=e(26405);let p=class{constructor(){this._onDidOpenTerminal=new l.Emitter,this._onDidCloseTerminal=new l.Emitter,this._onDidTerminalTitleChange=new l.Emitter,this._onDidChangeActiveTerminal=new l.Emitter,this.onDidOpenTerminal=this._onDidOpenTerminal.event,this.onDidCloseTerminal=this._onDidCloseTerminal.event,this.onDidTerminalTitleChange=this._onDidTerminalTitleChange.event,this.onDidChangeActiveTerminal=this._onDidChangeActiveTerminal.event,this.controller.onDidOpenTerminal(s=>{this._onDidOpenTerminal.fire(s)}),this.controller.onDidCloseTerminal(s=>{this._onDidCloseTerminal.fire(s)}),this.controller.onDidTerminalTitleChange(s=>{this._onDidTerminalTitleChange.fire(s)}),this.controller.onDidChangeActiveTerminal(s=>{this._onDidChangeActiveTerminal.fire(s)})}get terminals(){return Array.from(this.controller.clients.values()).map(s=>({id:s.id,name:s.name,isActive:this.view.currentWidgetId.get()===s.id}))}async createTerminal(s,g){const c=await this.controller.createTerminalWithWidgetByTerminalOptions({terminalOptions:s,id:g}),h={get id(){return c.id},get name(){return c.name},get processId(){return c.pid},show:(u=!0)=>{const d=c.widget;this.view.selectWidget(d.id),this.controller.showTerminalPanel(),u||setTimeout(()=>c.focus())},hide:()=>{this.controller.hideTerminalPanel()},dispose:()=>{this.view.removeWidget(c.widget.id),this.controller.clients.delete(c.id)}};return await c.attached.promise,h.show(),h}async getProcessId(s){const g=this.controller.clients.get(s);if(g)return g.pid}async getDefaultShellPath(){const s=await this.terminalProfileInternalService.resolveDefaultProfile();return s?.path||"/bin/bash"}sendText(s,g,c=!0){this.service.sendText(s,`${g}${c?"\r":""}`)}showTerm(s,g=!0){const c=this.controller.clients.get(s);if(!c)return;const h=c.widget;this.view.selectWidget(h.id),this.controller.showTerminalPanel(),g||setTimeout(()=>c.focus())}hideTerm(s){this.controller.clients.get(s)&&this.controller.hideTerminalPanel()}removeTerm(s){const g=this.controller.clients.get(s);g&&(this.view.removeWidget(g.widget.id),this.controller.clients.delete(s))}createWidget(s,g){const c=s,h=this.view.createGroup(),u=this.view.getGroup(h),d=this.view.createWidget(u,c,!1,!0);return(0,m.transaction)(v=>{d.name.set((0,r.default)(s),v)}),this.view.selectWidget(c),d.onRender(()=>{g(d.element)}),d}scheduleReconnection(){return this.network.scheduleReconnection()}};t.TerminalApiService=p,n.__decorate([(0,o.Autowired)(E.ITerminalController),n.__metadata("design:type",Object)],p.prototype,"controller",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalGroupViewService),n.__metadata("design:type",Object)],p.prototype,"view",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalInternalService),n.__metadata("design:type",Object)],p.prototype,"service",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalNetwork),n.__metadata("design:type",Object)],p.prototype,"network",void 0),n.__decorate([(0,o.Autowired)(E.ITerminalProfileInternalService),n.__metadata("design:type",Object)],p.prototype,"terminalProfileInternalService",void 0),t.TerminalApiService=p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p)},69061:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.createTerminalClientFactory2=t.TerminalClientFactory=t.TerminalClient=void 0;const r=e(85608),o=e(76003),l=e(41869),m=e(67889),E=e(43718),p=e(23418),_=e(42933),s=e(28423),g=e(72665),c=e(88913),h=e(10560),u=e(26405),d=e(94620),v=e(3276),f=e(29970),a=e(62810),b=e(90853),y=e(35628),S=e(70845),A=e(41685);let T=n=class extends E.Disposable{constructor(){super(),this.isTaskExecutor=!1,this._ready=!1,this._hasOutput=!1,this._areLinksReady=!1,this._onInput=new E.Emitter,this.onInput=this._onInput.event,this._onOutput=new E.Emitter,this.onOutput=this._onOutput.event,this._onExit=new E.Emitter,this.onExit=this._onExit.event,this._onTitleChange=new E.Emitter,this.onTitleChange=this._onTitleChange.event,this._onLinksReady=new E.Emitter,this.onLinksReady=this._onLinksReady.event,this._onResponseTime=new E.Emitter,this.onResponseTime=this._onResponseTime.event,this._onNameChangeEmitter=new E.Emitter,this.onNameChange=this._onNameChangeEmitter.event,this._name="",this.init()}async init(){this.xterm=this.injector.get(A.XTerm,[{xtermOptions:{theme:this.theme.terminalTheme,...this.internalService.getOptions(),...this.terminalPreference.toJSON()}}]),this.addDispose(this.xterm),this.addDispose(this.internalService.onError(O=>{var P;this.messageService.error(O.message),!((P=O.launchConfig)===null||P===void 0)&&P.executable?this.updateTerminalName({name:"error: "+O.launchConfig.executable}):this.updateTerminalName({name:"error"})})),this.addDispose(this.internalService.onProcessChange(O=>{O.sessionId===this.id&&(0,s.transaction)(P=>{this.widget.processName.set(O.processName,P)})}))}onWidgetShow(){this._show&&(this._show.resolve(),this._show=null),this._layout()}async setupWidget(O){this._widget=O,this._prepare(),this.addDispose(E.Disposable.create(()=>{n.WORKSPACE_PATH_CACHED.delete(O.group.id)})),this.addDispose(this.terminalPreference.onChange(async({name:P,value:R})=>{!O.show&&!this._show&&(this._show=new E.Deferred),this._show&&await this._show.promise,this._setOption(P,R),this.xterm.updatePreferences({[P]:R})})),O.show?this.onWidgetShow():this.addDispose(O.onShow(P=>{P&&this.onWidgetShow()})),this.addDispose(O.onError(P=>{var R;P||((R=this._error)===null||R===void 0||R.resolve(),this._layout())})),this.addDispose(O.onResize(async()=>{this._debounceResize()}))}async init2(O,P){var R,M,k,B;if(this._uid=P?.id||O.id,this.setupWidget(O),!P||Object.keys(P).length===0){const j=await this.terminalProfileInternalService.resolveDefaultProfile();P={id:this._uid,config:j}}if(!P.cwd){const K=O.group.widgets.get();if(K.length>1&&K[0]){const U=await this.internalService.getCwd(K[0].id);U&&(P.cwd=U)}}await this._checkWorkspace();const x=(k=(R=P.cwd)!==null&&R!==void 0?R:(M=P?.config)===null||M===void 0?void 0:M.cwd)!==null&&k!==void 0?k:this._workspacePath,N=this.controller.convertProfileToLaunchConfig(P.config,x);this._launchConfig=N,this._launchConfig.__fromTerminalOptions&&(this._terminalOptions=this._launchConfig.__fromTerminalOptions),this.name=N.name||"",N.initialText&&this.xterm.raw.writeln(N.initialText),N.env||(N.env={}),(B=this.environmentService.mergedCollection)===null||B===void 0||B.applyToProcessEnvironment(N.env,this.applicationService.backendOS,this.variableResolver.resolve.bind(this.variableResolver)),this.addDispose(this.environmentService.onDidChangeCollections(j=>{j.applyToProcessEnvironment(N.env,this.applicationService.backendOS,this.variableResolver.resolve.bind(this.variableResolver))})),this._attachXterm(),this._attachAfterRender()}get name(){return this._name}set name(O){this._name!==O&&(this._name=O,this._onNameChangeEmitter.fire(O))}get term(){return this.xterm.raw}get pid(){return this.internalService.getProcessId(this.id)}get launchConfig(){return this._launchConfig}get createOptions(){}get container(){return this.xterm.container}get id(){return this._uid}get widget(){return this._widget}get ready(){return this._ready}get attached(){return this._attached}get firstOutput(){return this._firstStdout}get show(){return this._show}get areLinksReady(){return this._areLinksReady}get os(){return this._os}_prepareAddons(){this._attachAddon=new a.AttachAddon;const O=this._attachAddon.onBeforeProcessData;if(this.preferenceService.get("terminal.integrated.localEchoEnabled")){const P=this.preferenceService.get("terminal.integrated.localEchoExcludePrograms",S.DEFAULT_LOCAL_ECHO_EXCLUDE),R=new S.TypeAheadAddon(O,{localEchoExcludePrograms:Array.isArray(P)?P:S.DEFAULT_LOCAL_ECHO_EXCLUDE,localEchoLatencyThreshold:this.preferenceService.get("terminal.integrated.localEchoLatencyThreshold",30),localEchoStyle:this.preferenceService.get("terminal.integrated.localEchoStyle","dim")},this.preferenceService.onPreferenceChanged);this.addDispose(R),this.xterm.raw.loadAddon(R)}this.addDispose([this._attachAddon,this._attachAddon.onData(P=>{this._onOutput.fire({id:this.id,data:P})}),this._attachAddon.onExit(P=>{var R,M;this.logger.warn(`${this.id} ${this.name} exit with ${P}`),P!==0&&this.messageService.error(`terminal ${this.name}(${(M=(R=this._attachAddon.connection)===null||R===void 0?void 0:R.ptyInstance)===null||M===void 0?void 0:M.shellPath}) exited with non-zero code ${P}`),this._onExit.fire({id:this.id,code:P})}),this._attachAddon.onTime(P=>{this._onResponseTime.fire(P),this.reporter.performance(E.REPORT_NAME.TERMINAL_MEASURE,{duration:P,msg:"terminal.response"})})]),this.xterm.raw.loadAddon(this._attachAddon)}_xtermEvents(){this.addDispose(this.xterm.raw.onResize(O=>{this._hasOutput&&this._doResize()}))}_attachXterm(){this._prepareAddons(),this._xtermEvents(),this._linkManager=this.injector.get(f.TerminalLinkManager,[this.xterm.raw,this]),this._linkManager.processCwd=this._workspacePath,this.addDispose(this._linkManager),this._areLinksReady=!0,this._onLinksReady.fire(this)}_doResize(){this.internalService.resize(this.id,this.xterm.raw.cols,this.xterm.raw.rows)}_prepare(){var O,P,R,M,k;(O=this._attached)===null||O===void 0||O.reject("TerminalClient is Re-initialization"),(P=this._firstStdout)===null||P===void 0||P.reject("TerminalClient is Re-initialization"),(R=this._error)===null||R===void 0||R.reject("TerminalClient is Re-initialization"),(M=this._show)===null||M===void 0||M.reject("TerminalClient is Re-initialization"),this._ready=!1,this._hasOutput=!1,this._attached=new E.Deferred,this._show=new E.Deferred,this._error=new E.Deferred,this._firstStdout=new E.Deferred,(k=this._attachAddon)===null||k===void 0||k.setConnection(void 0),this.internalService.getOS().then(x=>{this._os=x});const{dispose:B}=this.onOutput(()=>{B(),this._hasOutput=!0,this._firstStdout.resolve()})}_attachAfterRender(){queueMicrotask(()=>{var O;this._layout(),this.attach(),this.focus(),this.widget.show||(O=this._show)===null||O===void 0||O.promise.then(async()=>{this._show=new E.Deferred})})}async _pickWorkspace(){var O;if(this.workspace.isMultiRootWorkspaceOpened&&!this._widget.recovery){const P=this.workspace.tryGetRoots();return await this.quickPick.show(P.map(M=>new E.URI(M.uri).codeUri.fsPath),{placeholder:(0,l.localize)("terminal.selectCWDForNewTerminal")})}else return this.workspace.workspace?new E.URI((O=this.workspace.workspace)===null||O===void 0?void 0:O.uri).codeUri.fsPath:void 0}async _checkWorkspace(){const O=this._widget;if(n.WORKSPACE_PATH_CACHED.has(O.group.id))this._workspacePath=n.WORKSPACE_PATH_CACHED.get(O.group.id);else{const P=await this._pickWorkspace();P&&(this._workspacePath=P,n.WORKSPACE_PATH_CACHED.set(O.group.id,this._workspacePath))}}async checkHealthy(){return await this.internalService.check([this.id])}displayUnHealthyMessage(){const O=this.term,P=O.options.theme,R=(k,B,x)=>{const N=" ",j=k.split(`
28811
28831
  `).map(U=>N+U+N).join(`
28812
28832
  `),K=`\x1B[48;2;${M(B)};38;2;${M(x)}m${j}\x1B[0m`;O.writeln(`
28813
28833
  `),O.writeln(`
@@ -28815,7 +28835,7 @@ ${(0,o.formatLocalize)("terminal.integrated.exitedWithCode",h)}`),!((u=this.pres
28815
28835
  `)},M=k=>{const B=parseInt(k.slice(1,3),16),x=parseInt(k.slice(3,5),16),N=parseInt(k.slice(5,7),16);return`${B};${x};${N}`};R((0,l.localize)("terminal.process.unHealthy"),P?.foreground||"#d7dbdeff",P?.background||"#151b21ff")}reset(){this._prepare(),this._attachAfterRender()}async attach(){if(!this._ready)return this._doAttach()}async _doAttach(){var O;const P=this.id,{rows:R=a.DEFAULT_ROW,cols:M=a.DEFAULT_COL}=this.xterm.raw;let k;const B={...this._launchConfig,cwd:((O=this._launchConfig)===null||O===void 0?void 0:O.cwd)||this._workspacePath};B.isExtensionOwnedTerminal&&(B.customPtyImplementation=(x,N,j)=>new b.TerminalProcessExtHostProxy(x,N,j,this.controller)),this._launchConfig=B,this.logger.log("attach terminal by launchConfig: ",this._launchConfig);try{k=await this.internalService.attachByLaunchConfig(P,M,R,this._launchConfig,this.xterm)}catch(x){this.logger.error(`attach ${P} terminal failed, _launchConfig`,JSON.stringify(this._launchConfig),x)}this.resolveConnection(k)}resolveConnection(O){if(!O){this._attached.reject("no connection while attaching terminal client");return}this._attachAddon.setConnection(O);const P=this.name||this._launchConfig.name||O.name;P!==this.name&&(this.name=P,this._onTitleChange.fire({id:this.id,name:P})),this._ready=!0,this._attached.resolve(),this._widget.rename(this.name),this.eventBus.fire(new l.TerminalClientAttachEvent({clientId:this.id})),this._firstStdout.promise.then(()=>{this._doResize()})}_setOption(O,P){try{this.xterm.raw.options[O]=P,this._layout()}catch{}}_checkReady(){if(!this._ready)throw new Error("terminal client not ready")}_layout(){try{this._renderOnDemand(),this.xterm.raw.element&&this.xterm.fit()}catch{}}_renderOnDemand(){var O;this.xterm.raw.element||!((O=this._widget.element)===null||O===void 0)&&O.clientHeight&&(this._widget.element.appendChild(this.xterm.container),this.xterm.open(),setTimeout(()=>{var P;((P=this.controller.activeClient)===null||P===void 0?void 0:P.id)===this.id&&this.focus()}))}_debounceResize(){this._layout()}focus(){return this.xterm.raw.focus()}clear(){return this._checkReady(),this.xterm.raw.clear()}selectAll(){return this._checkReady(),this.xterm.raw.selectAll()}paste(O){return this._checkReady(),this.xterm.raw.paste(O)}findNext(O){return this._checkReady(),this.xterm.findNext(O)}closeSearch(){this.xterm.closeSearch()}getSelection(){return this._checkReady(),this.xterm.raw.hasSelection()?this.xterm.raw.getSelection():(this.logger.warn("The terminal has no selection to copy"),"")}updateTheme(){return this.xterm.updateTheme(this.theme.terminalTheme)}updateLaunchConfig(O){this._launchConfig={...this._launchConfig,...O}}updateTerminalName(O){!this.name&&!this._widget.name.get()&&this._widget.rename(O.name||this.name)}async sendText(O){await this.internalService.sendText(this.id,O),this._onInput.fire({id:this.id,data:O})}registerLinkProvider(O){if(!this._linkManager)throw new Error("TerminalInstance.registerLinkProvider before link manager was ready");return this._linkManager.registerExternalLinkProvider(this,O)}dispose(O=!0){super.dispose(),O&&this.internalService.disposeById(this.id)}};t.TerminalClient=T,T.WORKSPACE_PATH_CACHED=new Map,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],T.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(u.ITerminalInternalService),r.__metadata("design:type",Object)],T.prototype,"internalService",void 0),r.__decorate([(0,o.Autowired)(h.IWorkspaceService),r.__metadata("design:type",Object)],T.prototype,"workspace",void 0),r.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),r.__metadata("design:type",p.WorkbenchEditorService)],T.prototype,"editorService",void 0),r.__decorate([(0,o.Autowired)(_.IFileServiceClient),r.__metadata("design:type",Object)],T.prototype,"fileService",void 0),r.__decorate([(0,o.Autowired)(g.IMessageService),r.__metadata("design:type",Object)],T.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(u.ITerminalTheme),r.__metadata("design:type",Object)],T.prototype,"theme",void 0),r.__decorate([(0,o.Autowired)(u.ITerminalController),r.__metadata("design:type",Object)],T.prototype,"controller",void 0),r.__decorate([(0,o.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],T.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(u.ITerminalGroupViewService),r.__metadata("design:type",Object)],T.prototype,"view",void 0),r.__decorate([(0,o.Autowired)(v.ITerminalPreference),r.__metadata("design:type",Object)],T.prototype,"terminalPreference",void 0),r.__decorate([(0,o.Autowired)(y.TerminalKeyBoardInputService),r.__metadata("design:type",y.TerminalKeyBoardInputService)],T.prototype,"keyboard",void 0),r.__decorate([(0,o.Autowired)(l.QuickPickService),r.__metadata("design:type",Object)],T.prototype,"quickPick",void 0),r.__decorate([(0,o.Autowired)(E.ILogger),r.__metadata("design:type",Object)],T.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(E.IReporter),r.__metadata("design:type",Object)],T.prototype,"reporter",void 0),r.__decorate([(0,o.Autowired)(d.EnvironmentVariableServiceToken),r.__metadata("design:type",Object)],T.prototype,"environmentService",void 0),r.__decorate([(0,o.Autowired)(E.IApplicationService),r.__metadata("design:type",Object)],T.prototype,"applicationService",void 0),r.__decorate([(0,o.Autowired)(u.ITerminalProfileInternalService),r.__metadata("design:type",Object)],T.prototype,"terminalProfileInternalService",void 0),r.__decorate([(0,o.Autowired)(c.IVariableResolverService),r.__metadata("design:type",Object)],T.prototype,"variableResolver",void 0),r.__decorate([(0,o.Autowired)(l.IEventBus),r.__metadata("design:type",Object)],T.prototype,"eventBus",void 0),r.__decorate([(0,E.debounce)(100),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],T.prototype,"_debounceResize",null),t.TerminalClient=T=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],T);let w=class{static async createClient2(O,P,R){const k=O.createChild([{token:T,useClass:T}]).get(T);return await k.init2(P,R),k}};t.TerminalClientFactory=w,t.TerminalClientFactory=w=r.__decorate([(0,o.Injectable)()],w);const D=I=>(O,P)=>w.createClient2(I,O,P);t.createTerminalClientFactory2=D},43395:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ansiColorMap=t.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=t.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=t.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=t.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=t.TERMINAL_FIND_MATCH_BORDER_COLOR=t.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=t.TERMINAL_BORDER_COLOR=t.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR=t.TERMINAL_SELECTION_FOREGROUND_COLOR=t.TERMINAL_SELECTION_BACKGROUND_COLOR=t.TERMINAL_CURSOR_BACKGROUND_COLOR=t.TERMINAL_CURSOR_FOREGROUND_COLOR=t.TERMINAL_FOREGROUND_COLOR=t.TERMINAL_BACKGROUND_COLOR=t.ansiColorIdentifiers=void 0,t.registerTerminalColors=o;const n=e(43718),r=e(52416);t.ansiColorIdentifiers=[],t.TERMINAL_BACKGROUND_COLOR=(0,r.registerColor)("terminal.background",{dark:r.PANEL_BACKGROUND,light:r.PANEL_BACKGROUND,hcDark:r.PANEL_BACKGROUND,hcLight:r.PANEL_BACKGROUND},(0,n.localize)("terminal.background","The background color of the terminal, this allows coloring the terminal differently to the panel.")),t.TERMINAL_FOREGROUND_COLOR=(0,r.registerColor)("terminal.foreground",{light:"#333333",dark:"#CCCCCC",hcDark:"#FFFFFF",hcLight:"#292929"},(0,n.localize)("terminal.foreground","The foreground color of the terminal.")),t.TERMINAL_CURSOR_FOREGROUND_COLOR=(0,r.registerColor)("terminalCursor.foreground",null,(0,n.localize)("terminalCursor.foreground","The foreground color of the terminal cursor.")),t.TERMINAL_CURSOR_BACKGROUND_COLOR=(0,r.registerColor)("terminalCursor.background",null,(0,n.localize)("terminalCursor.background","The background color of the terminal cursor. Allows customizing the color of a character overlapped by a block cursor.")),t.TERMINAL_SELECTION_BACKGROUND_COLOR=(0,r.registerColor)("terminal.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#F3F518",hcLight:"#0F4A85"},(0,n.localize)("terminal.selectionBackground","The selection background color of the terminal.")),t.TERMINAL_SELECTION_FOREGROUND_COLOR=(0,r.registerColor)("terminal.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:"#ffffff"},(0,n.localize)("terminal.selectionForeground","The selection foreground color of the terminal. When this is null the selection foreground will be retained and have the minimum contrast ratio feature applied.")),t.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR=(0,r.registerColor)("terminal.inactiveSelectionBackground",{light:(0,r.transparent)(t.TERMINAL_SELECTION_BACKGROUND_COLOR,.5),dark:(0,r.transparent)(t.TERMINAL_SELECTION_BACKGROUND_COLOR,.5),hcDark:(0,r.transparent)(t.TERMINAL_SELECTION_BACKGROUND_COLOR,.7),hcLight:(0,r.transparent)(t.TERMINAL_SELECTION_BACKGROUND_COLOR,.5)},(0,n.localize)("terminal.inactiveSelectionBackground","The selection background color of the terminal when it does not have focus.")),t.TERMINAL_BORDER_COLOR=(0,r.registerColor)("terminal.border",{dark:r.PANEL_BORDER,light:r.PANEL_BORDER,hcDark:r.PANEL_BORDER,hcLight:r.PANEL_BORDER},(0,n.localize)("terminal.border","The color of the border that separates split panes within the terminal. This defaults to panel.border.")),t.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=(0,r.registerColor)("terminal.findMatchBackground",{dark:null,light:null,hcDark:null,hcLight:"#0F4A85"},(0,n.localize)("terminal.findMatchBackground","Color of the current search match in the terminal. The color must not be opaque so as not to hide underlying terminal content.")),t.TERMINAL_FIND_MATCH_BORDER_COLOR=(0,r.registerColor)("terminal.findMatchBorder",{dark:r.editorFindMatch,light:r.editorFindMatch,hcDark:"#f38518",hcLight:"#0F4A85"},(0,n.localize)("terminal.findMatchBorder","Border color of the current search match in the terminal.")),t.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=(0,r.registerColor)("terminal.findMatchHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,n.localize)("terminal.findMatchHighlightBackground","Color of the other search matches in the terminal. The color must not be opaque so as not to hide underlying terminal content.")),t.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=(0,r.registerColor)("terminal.findMatchHighlightBorder",{dark:r.editorFindMatchHighlight,light:r.editorFindMatchHighlight,hcDark:"#f38518",hcLight:"#0F4A85"},(0,n.localize)("terminal.findMatchHighlightBorder","Border color of the other search matches in the terminal.")),t.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=(0,r.registerColor)("terminalOverviewRuler.findMatchForeground",{dark:r.overviewRulerFindMatchForeground,light:r.overviewRulerFindMatchForeground,hcDark:"#f38518",hcLight:"#0F4A85"},(0,n.localize)("terminalOverviewRuler.findMatchHighlightForeground","Overview ruler marker color for find matches in the terminal.")),t.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=(0,r.registerColor)("terminalOverviewRuler.cursorForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},(0,n.localize)("terminalOverviewRuler.cursorForeground","The overview ruler cursor color.")),t.ansiColorMap={"terminal.ansiBlack":{index:0,defaults:{light:"#000000",dark:"#000000",hcDark:"#000000",hcLight:"#292929"}},"terminal.ansiRed":{index:1,defaults:{light:"#cd3131",dark:"#cd3131",hcDark:"#cd0000",hcLight:"#cd3131"}},"terminal.ansiGreen":{index:2,defaults:{light:"#00BC00",dark:"#0DBC79",hcDark:"#00cd00",hcLight:"#00bc00"}},"terminal.ansiYellow":{index:3,defaults:{light:"#949800",dark:"#e5e510",hcDark:"#cdcd00",hcLight:"#949800"}},"terminal.ansiBlue":{index:4,defaults:{light:"#0451a5",dark:"#2472c8",hcDark:"#cd00cd",hcLight:"#bc05bc"}},"terminal.ansiMagenta":{index:5,defaults:{light:"#bc05bc",dark:"#bc3fbc",hcDark:"#cd00cd",hcLight:"#bc05bc"}},"terminal.ansiCyan":{index:6,defaults:{light:"#0598bc",dark:"#11a8cd",hcDark:"#00cdcd",hcLight:"#0598b"}},"terminal.ansiWhite":{index:7,defaults:{light:"#555555",dark:"#e5e5e5",hcDark:"#e5e5e5",hcLight:"#555555"}},"terminal.ansiBrightBlack":{index:8,defaults:{light:"#666666",dark:"#666666",hcDark:"#7f7f7f",hcLight:"#666666"}},"terminal.ansiBrightRed":{index:9,defaults:{light:"#cd3131",dark:"#f14c4c",hcDark:"#ff0000",hcLight:"#cd3131"}},"terminal.ansiBrightGreen":{index:10,defaults:{light:"#14CE14",dark:"#23d18b",hcDark:"#00ff00",hcLight:"#00bc00"}},"terminal.ansiBrightYellow":{index:11,defaults:{light:"#b5ba00",dark:"#f5f543",hcDark:"#ffff00",hcLight:"#b5ba00"}},"terminal.ansiBrightBlue":{index:12,defaults:{light:"#0451a5",dark:"#3b8eea",hcDark:"#5c5cff",hcLight:"#0451a5"}},"terminal.ansiBrightMagenta":{index:13,defaults:{light:"#bc05bc",dark:"#d670d6",hcDark:"#ff00ff",hcLight:"#bc05bc"}},"terminal.ansiBrightCyan":{index:14,defaults:{light:"#0598bc",dark:"#29b8db",hcDark:"#00ffff",hcLight:"#0598bc"}},"terminal.ansiBrightWhite":{index:15,defaults:{light:"#a5a5a5",dark:"#e5e5e5",hcDark:"#ffffff",hcLight:"#a5a5a5"}}};function o(){Object.keys(t.ansiColorMap).forEach(l=>{const m=t.ansiColorMap[l],E=l.substring(13);t.ansiColorIdentifiers[m.index]=(0,r.registerColor)(l,m.defaults,(0,n.localize)("terminal.ansiColor","'{0}' ANSI color in the terminal.",E))})}},49241:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(66e3);let m=class{constructor(p){this._contextKeyService=this.globalContextkeyService.createScoped(p),this.isTerminalFocused=l.IsTerminalFocused.bind(this._contextKeyService),this.isTerminalViewInitialized=l.IsTerminalViewInitialized.bind(this._contextKeyService),this.shellExecutionSupportedContextKey=l.ShellExecutionSupported.bind(this.globalContextkeyService)}get service(){return this._contextKeyService}};t.TerminalContextKey=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"globalContextkeyService",void 0),t.TerminalContextKey=m=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[HTMLDivElement])],m)},88023:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalContextMenuService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),m=e(43718),E=e(26405);let p=class extends m.Disposable{get contextMenu(){const s=this.menuService.createMenu(l.MenuId.TerminalPanelContext,this.controller.contextKeyService||this.contextKeyService);return this.addDispose(s),s}onContextMenu(s){s.preventDefault();const{x:g,y:c}=s.nativeEvent,h=this.contextMenu,u=(0,l.generateMergedCtxMenu)({menus:h});this.ctxMenuRenderer.show({anchor:{x:g,y:c},menuNodes:u,args:[]})}get tabContextMenu(){const s=this.menuService.createMenu(l.MenuId.TerminalTabContext,this.contextKeyService);return this.addDispose(s),s}get tabDropDownContextMenu(){const s=this.menuService.createMenu(l.MenuId.TerminalNewDropdownContext,this.contextKeyService);return this.addDispose(s),s}onDropDownContextMenu(s){s.preventDefault();const{x:g,y:c}=s.nativeEvent,h=this.tabDropDownContextMenu,u=(0,l.generateMergedCtxMenu)({menus:h});this.ctxMenuRenderer.show({anchor:{x:g,y:c},menuNodes:u,args:[s.target]})}onTabContextMenu(s,g){s.stopPropagation(),s.preventDefault();const{x:c,y:h}=s.nativeEvent,u=this.tabContextMenu,d=(0,l.generateMergedCtxMenu)({menus:u});this.ctxMenuRenderer.show({anchor:{x:c,y:h},menuNodes:d,args:[s.target,g]})}};t.TerminalContextMenuService=p,n.__decorate([(0,r.Autowired)(E.ITerminalController),n.__metadata("design:type",Object)],p.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.AbstractMenuService),n.__metadata("design:type",l.AbstractMenuService)],p.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(l.ICtxMenuRenderer),n.__metadata("design:type",l.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"contextKeyService",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"contextMenu",null),n.__decorate([o.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"tabContextMenu",null),n.__decorate([o.memoize,n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[])],p.prototype,"tabDropDownContextMenu",null),t.TerminalContextMenuService=p=n.__decorate([(0,r.Injectable)()],p)},7734:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalController=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(30144),m=e(93899),E=e(81741),p=e(1237),_=e(67889),s=e(43718),g=e(54414),c=e(63067),h=e(52416),u=e(26405),d=e(49241),v=e(68611);let f=class extends s.WithEventBus{get themeBackground(){return this._themeBackground}set themeBackground(b){b!==this._themeBackground&&(this._themeBackground=b,this._onThemeBackgroundChangeEmitter.fire(b))}get clients(){return this._clients}get focused(){return this._focus}get ready(){return this._ready}get activeClient(){if(this._activeClientId)return this._clients.get(this._activeClientId)}get contextKeyService(){if(this.terminalContextKey)return this.terminalContextKey.service}get clientId(){return this._clientId?this._clientId:(this._clientId=this.applicationService.clientId,this._clientId)}async _createClientOrIgnore(b){return this._clients.has(b.id)?this._clients.get(b.id):await this._createClient(b)}async _createClient(b,y){const S=await this.clientFactory(b,y);return this.logger.log("create client with ITerminalClientFactory2",S),this.setupClient(b,S)}setupClient(b,y){return this._clients.set(y.id,y),this.logger.log(`setup client ${y.id}`),y.addDispose(y.onExit(S=>{this._onDidCloseTerminal.fire({id:y.id,code:S.code})})),y.addDispose(y.onTitleChange(S=>{this._onDidTerminalTitleChange.fire({id:y.id,name:S.name})})),y.addDispose({dispose:()=>{this._clients.delete(y.id),this._onDidCloseTerminal.fire({id:y.id,code:-1})}}),y.addDispose(y.onLinksReady(()=>{this._setInstanceLinkProviders(y)})),this._onDidOpenTerminal.fire({id:y.id,name:y.name,isActive:!1}),this.terminalView.selectWidget(b.id),y}_disposeClient(b){const y=this.findClientFromWidgetId(b.id);y&&y.dispose()}constructor(){super(),this._onDidOpenTerminal=new s.Emitter,this._onDidCloseTerminal=new s.Emitter,this._onDidTerminalTitleChange=new s.Emitter,this._onDidChangeActiveTerminal=new s.Emitter,this._ready=new s.Deferred,this._linkProviders=new Set,this._linkProviderDisposables=new Map,this.onDidOpenTerminal=this._onDidOpenTerminal.event,this.onDidCloseTerminal=this._onDidCloseTerminal.event,this.onDidTerminalTitleChange=this._onDidTerminalTitleChange.event,this.onDidChangeActiveTerminal=this._onDidChangeActiveTerminal.event,this._onInstanceRequestStartExtensionTerminal=new s.Emitter,this.onInstanceRequestStartExtensionTerminal=this._onInstanceRequestStartExtensionTerminal.event,this.viewReady=new s.Deferred,this._onThemeBackgroundChangeEmitter=new s.Emitter,this.onThemeBackgroundChange=this._onThemeBackgroundChangeEmitter.event,this._focus=!1,this._clients=new Map}_createOneGroup(b){const y=this.terminalView.createGroup(b);return{group:this.terminalView.getGroup(y),index:y}}_reset(){const{group:b}=this._createOneGroup();return this.terminalView.createWidget(b)}async recovery(b){var y,S,A,T,w;if(this.config.isElectronRenderer&&!this.config.isRemote||!b.current||!(!((A=(S=(y=b?.groups)===null||y===void 0?void 0:y[0])===null||S===void 0?void 0:S[0])===null||A===void 0)&&A.client))return;const D=(w=(T=b.current)===null||T===void 0?void 0:T.split(u.TERMINAL_ID_SEPARATOR))===null||w===void 0?void 0:w[1];b.current&&b.current.includes(u.TERMINAL_ID_SEPARATOR)&&(b.current=`${this.clientId}|${D}`),b.groups=b.groups.map(k=>Array.isArray(k)?k.map(({client:B,...x})=>{var N;if(!x.task)return{client:B.includes(u.TERMINAL_ID_SEPARATOR)?`${this.clientId}${u.TERMINAL_ID_SEPARATOR}${(N=B?.split(u.TERMINAL_ID_SEPARATOR))===null||N===void 0?void 0:N[1]}`:B,...x}}).filter(Boolean):k);let I="",O="";const{groups:P,current:R}=b;for(const k of P){if(!k||k.length===0)continue;const{group:B}=this._createOneGroup(),x=[];for(const N of k)N&&x.push((async()=>{const j=this.terminalView.createWidget(B,typeof N=="string"?N:N.client,!!N.task,!1,!0),K=await this.clientFactory(j);this.setupClient(j,K),N.task&&(K.isTaskExecutor=!0,K.taskId=N.task),this._clients.set(K.id,K),R===K.id&&(I=j.id),O||(O=j.id),K.attached.promise.then(()=>{j.rename(K.name),K.ready||this.terminalView.removeWidget(j.id)})})());await Promise.all(x)}this.terminalView.groups.get().findIndex(k=>k.widgetsMap.has(I))>-1&&I?this.terminalView.selectWidget(I):O&&this.terminalView.selectWidget(O)}initContextKey(b){this.terminalContextKey||(this.terminalContextKey=this.injector.get(d.TerminalContextKey,[b]),this.terminalContextKey.isTerminalFocused.set(this._focus),this.terminalContextKey.isTerminalViewInitialized.set(!0))}async firstInitialize(){if(await Promise.race([(async()=>{await this.layoutService.viewReady.promise,await this.viewReady.promise})(),new Promise(b=>{setTimeout(()=>{this.logger.warn("TerminalView didn't initialize in 2s, skip waiting, but may cause some problem"),b()},2e3)})]),this._tabBarHandler=this.layoutService.getTabbarHandler(l.TERMINAL_CONTAINER_ID),this.themeBackground=this.terminalTheme.terminalTheme.background||"",this.addDispose(this.terminalView.onWidgetCreated(b=>{this._createClientOrIgnore(b)})),this.addDispose(this.terminalView.onWidgetDisposed(b=>{this._disposeClient(b)})),this.addDispose(this.terminalView.onWidgetEmpty(()=>{this.hideTerminalPanel()})),this.addDispose(this.terminalView.onWidgetSelected(b=>{const y=this.findClientFromWidgetId(b.id);y&&(this._onDidChangeActiveTerminal.fire(y.id),y.ready&&setTimeout(()=>{y.focus()})),this._activeClientId=y?.id})),this.addDispose(this.themeService.onThemeChange(()=>{this._clients.forEach(b=>{b.updateTheme()}),this.themeBackground=this.terminalTheme.terminalTheme.background||""})),this.addDispose(this.eventBus.onDirective(o.ResizeEvent.createDirective((0,o.getSlotLocation)("@opensumi/ide-terminal-next",this.config.layoutConfig)),()=>{this._tabBarHandler&&this._tabBarHandler.isActivated()&&this.terminalView.resize()})),this.registerContributedProfilesCommandAndMenu(),this.addDispose(this.profileService.onDidChangeAvailableProfiles(()=>{this.registerContributedProfilesCommandAndMenu()})),this._tabBarHandler&&(this.addDispose(this._tabBarHandler.onActivate(()=>{if(this.terminalView.empty()){const b=this._reset();this.terminalView.selectWidget(b.id)}else this.terminalView.selectGroup(this.terminalView.currentGroupIndex.get()>-1?this.terminalView.currentGroupIndex.get():0)})),this.addDispose(this._tabBarHandler.onInActivate(()=>{this.editorService.currentEditor&&this.editorService.currentEditor.monacoEditor.focus()})),this._tabBarHandler.isActivated()))if(this.terminalView.empty()){const b=this._reset();this.terminalView.selectWidget(b.id)}else this.terminalView.selectGroup(this.terminalView.currentGroupIndex.get()>-1?this.terminalView.currentGroupIndex.get():0);this.terminalContextKey.isTerminalViewInitialized.set(!0),this._ready.resolve()}async reconnect(){Array.from(this._clients.values()).forEach(async y=>{await y.checkHealthy()||y.displayUnHealthyMessage()})}focus(){this._focus=!0,this.terminalContextKey.isTerminalFocused.set(!0)}blur(){this._focus=!1,this.terminalContextKey.isTerminalFocused.set(!1)}onContextMenu(b){b.preventDefault();const y=this.menuService.createMenu(m.MenuId.TerminalInstanceContext),S=(0,E.generateCtxMenu)({menus:y});this.ctxMenuRenderer.show({menuNodes:S[1],anchor:{x:b.clientX,y:b.clientY}})}toJSON(){const b=[];let y=this._clients.get(this.terminalView.currentWidgetId.get());return this.terminalView.groups.get().forEach(S=>{const A=[];S.widgets.get().forEach(w=>{var D;const I=this._clients.get(w.id),O=!this.preferenceService.get("terminal.integrated.enablePersistentSessions")||((D=I?.launchConfig)===null||D===void 0?void 0:D.disablePersistence);if(!I||O||I?.isTaskExecutor)return;y||(y=I);const P={client:I.id};A.push(P)}),A.length>0&&b.push(A)}),{groups:b,current:y&&y.id}}disposeTerminalClients(b){const y=Array.from(this.clients.values()).filter(S=>S.id===b?.id||S.isTaskExecutor===b?.isTaskExecutor||S.name===b?.name);for(const S of y)try{S.dispose()}catch{}}findClientFromWidgetId(b){return this._clients.get(b)}convertTerminalOptionsToLaunchConfig(b){const y={name:b.name,executable:(0,s.withNullAsUndefined)(b.shellPath),args:(0,s.withNullAsUndefined)(b.shellArgs),cwd:(0,s.withNullAsUndefined)(b.cwd),env:(0,s.withNullAsUndefined)(b.env),icon:(0,s.withNullAsUndefined)((0,u.asTerminalIcon)(b.iconPath)),color:(0,s.isThemeColor)(b.color)?b.color.id:void 0,initialText:(0,s.withNullAsUndefined)(b.message),strictEnv:(0,s.withNullAsUndefined)(b.strictEnv),hideFromUser:(0,s.withNullAsUndefined)(b.hideFromUser),isExtensionOwnedTerminal:b.isExtensionTerminal,location:u.TerminalLocation.Panel,disablePersistence:(0,s.withNullAsUndefined)(b.isTransient)};return y.__fromTerminalOptions=b,y}convertProfileToLaunchConfig(b,y){if(!b)return{};if(b&&"profileName"in b){const S=b;return S.path?{executable:S.path,args:S.args,env:S.env,color:S.color,name:S.overrideName?S.profileName:void 0,cwd:y}:b}return y&&(b.cwd=y),b}async createTerminalWithWidgetByTerminalOptions(b){const y=this.convertTerminalOptionsToLaunchConfig(b.terminalOptions);return this.createTerminalWithWidget({...b,config:y})}async createTerminal(b){const y=b.id||this.service.generateSessionId(),{group:S}=this._createOneGroup(),A=this.terminalView.createWidget(S,y,!1,!0);return await this._createClient(A,b)}async createTerminalWithWidget(b){const y=b.id?this.clientId+u.TERMINAL_ID_SEPARATOR+b.id:this.service.generateSessionId(),S=this.convertProfileToLaunchConfig(b.config),{group:A}=this._createOneGroup(S),T=this.terminalView.createWidget(A,y,b.isTaskExecutor||!b.closeWhenExited,!0);b.beforeCreate&&typeof b.beforeCreate=="function"&&b.beforeCreate(y);const w=await this._createClient(T,{id:y,config:S,cwd:b?.cwd,location:b?.location,resource:b?.resource});return b.isTaskExecutor&&(w.isTaskExecutor=!0,w.taskId=b.taskId),w}clearCurrentGroup(){const b=this.terminalView.currentGroup.get();b&&b.widgets.get().forEach(S=>{const A=this._clients.get(S.id);A&&A.clear()})}clearAllGroups(){this._clients.forEach(b=>{b&&b.clear()})}showTerminalPanel(){this._tabBarHandler&&this._tabBarHandler.activate()}hideTerminalPanel(){this._tabBarHandler&&this._tabBarHandler.isActivated()&&this._tabBarHandler.deactivate()}toggleTerminalPanel(){this._tabBarHandler&&(this._tabBarHandler.isActivated()?this._tabBarHandler.deactivate():this._tabBarHandler.activate())}requestStartExtensionTerminal(b,y,S){return new Promise(A=>{this._onInstanceRequestStartExtensionTerminal.fire({proxy:b,cols:y,rows:S,callback:A})})}registerLinkProvider(b){const y=new s.DisposableStore;this._linkProviders.add(b);for(const S of this._clients.values())S.areLinksReady&&y.add(S.registerLinkProvider(b));return this._linkProviderDisposables.set(b,y),{dispose:()=>{const S=this._linkProviderDisposables.get(b);S?.dispose(),this._linkProviders.delete(b)}}}_setInstanceLinkProviders(b){for(const y of this._linkProviders){const S=this._linkProviderDisposables.get(y),A=b.registerLinkProvider(y);S?.add(A)}}registerContributedProfilesCommandAndMenu(){this.commandAndMenuDisposeCollection&&this.commandAndMenuDisposeCollection.dispose(),this.commandAndMenuDisposeCollection=new s.DisposableCollection,this.profileService.availableProfiles.filter(y=>!y.isAutoDetected).forEach(y=>{const S=`TerminalProfilesCommand:${y.path}:${y.profileName}`;this.commandAndMenuDisposeCollection.push(this.commandRegistry.registerCommand({id:S},{execute:async()=>{await this.createTerminal({config:y})}})),this.commandAndMenuDisposeCollection.push(this.menuRegistry.registerMenuItem(m.MenuId.TerminalNewDropdownContext,{command:{id:S,label:y.profileName||"unknown profile"}}))}),this.profileService.contributedProfiles.forEach(y=>{const S=`TerminalProfilesCommand:${y.extensionIdentifier}:${y.id}`;this.commandAndMenuDisposeCollection.push(this.commandRegistry.registerCommand({id:S},{execute:async()=>{await this.profileService.createContributedTerminalProfile(y.extensionIdentifier,y.id,{icon:y.icon})}})),this.commandAndMenuDisposeCollection.push(this.menuRegistry.registerMenuItem(m.MenuId.TerminalNewDropdownContext,{command:{id:S,label:(0,s.replaceLocalizePlaceholder)(y.title)||y.title||"unknown profile"}}))})}};t.TerminalController=f,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],f.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(h.IThemeService),n.__metadata("design:type",Object)],f.prototype,"themeService",void 0),n.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],f.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(u.ITerminalTheme),n.__metadata("design:type",Object)],f.prototype,"terminalTheme",void 0),n.__decorate([(0,r.Autowired)(u.ITerminalGroupViewService),n.__metadata("design:type",v.TerminalGroupViewService)],f.prototype,"terminalView",void 0),n.__decorate([(0,r.Autowired)(u.ITerminalClientFactory2),n.__metadata("design:type",Function)],f.prototype,"clientFactory",void 0),n.__decorate([(0,r.Autowired)(u.ITerminalInternalService),n.__metadata("design:type",Object)],f.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(u.ITerminalErrorService),n.__metadata("design:type",Object)],f.prototype,"errorService",void 0),n.__decorate([(0,r.Autowired)(u.ITerminalProfileService),n.__metadata("design:type",Object)],f.prototype,"profileService",void 0),n.__decorate([(0,r.Autowired)(s.CommandRegistry),n.__metadata("design:type",Object)],f.prototype,"commandRegistry",void 0),n.__decorate([(0,r.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],f.prototype,"menuRegistry",void 0),n.__decorate([(0,r.Autowired)(s.IApplicationService),n.__metadata("design:type",Object)],f.prototype,"applicationService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],f.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(s.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(p.AbstractMenuService),n.__metadata("design:type",p.AbstractMenuService)],f.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],f.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,r.Autowired)(_.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),t.TerminalController=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},48520:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalEnvironmentService=t.ENVIRONMENT_VARIABLE_COLLECTIONS_KEY=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(97331)),l=n.__importDefault(e(14041)),m=e(76003),E=e(41869),p=e(43718),_=e(25751),s=e(67899),g=e(10560),c=e(26405),h=e(94620),u=e(12404),d=e(7066);t.ENVIRONMENT_VARIABLE_COLLECTIONS_KEY="terminal.integrated.environmentVariableCollections";const v="terminal.environmentVariableCollections.changed";let f=class{constructor(){this.collections=new Map,this._onDidChangeCollections=new p.Emitter}get onDidChangeCollections(){return this._onDidChangeCollections.event}async initEnvironmentVariableCollections(){const b=await this.storageService.getData(t.ENVIRONMENT_VARIABLE_COLLECTIONS_KEY);if(b)try{JSON.parse(b).forEach(S=>{this.collections.set(S.extensionIdentifier,{persistent:!0,map:(0,h.deserializeEnvironmentVariableCollection)(S.collection)})})}catch(y){this.logger.warn(`parse environment variable collection error:
28816
28836
  ${y.message}, data:
28817
28837
  ${b}`)}this.mergedCollection=this.resolveMergedCollection(),this.previousMergedCollection=void 0}set(b,y){this.collections.set(b,y),this.updateCollections()}delete(b){this.collections.delete(b),this.updateCollections()}async getProcessEnv(){return(0,p.raceTimeout)(this.terminalProcessService.getEnv(),1e3)}resolveMergedCollection(){return new u.MergedEnvironmentVariableCollection(this.collections)}onDidClickStatusBarEntry(b){this.dialogService.warning(l.default.createElement(d.TerminalVariable,{diff:b}),[(0,p.localize)("dialog.file.close"),(0,p.localize)("terminal.relaunch")]).then(y=>{var S;y&&y===(0,p.localize)("terminal.relaunch")&&(this.commandService.executeCommand(E.TERMINAL_COMMANDS.RE_LAUNCH.id),(S=this.statusBarEntryAccessor)===null||S===void 0||S.dispose(),this.statusBarEntryAccessor=void 0)})}updateStatusBarMessage(){var b;if(!this.mergedCollection)return;const y=(b=this.previousMergedCollection)===null||b===void 0?void 0:b.diff(this.mergedCollection);if(!y)return;this.statusBarEntryAccessor&&(this.statusBarEntryAccessor.dispose(),this.statusBarEntryAccessor=void 0);const S=[];this.mergedCollection.map.forEach((A,T)=>{A.forEach(w=>S.push((0,h.mutatorTypeLabel)(w.type,w.value,T)))}),this.statusBarEntryAccessor=this.statusbarService.addElement(v,{iconClass:(0,E.getIcon)("warning-circle"),color:"orange",alignment:E.StatusBarAlignment.RIGHT,tooltip:(0,p.toMarkdownString)((0,p.localize)("terminal.environment.changed")+"\n\n```\n"+S.join(`
28818
- `)+"\n```"),onClick:()=>this.onDidClickStatusBarEntry(y)})}notifyCollectionUpdates(){this._onDidChangeCollections.fire(this.mergedCollection),this.updateStatusBarMessage()}updateCollections(){(0,o.default)(this.persistCollections.bind(this),100)(),this.previousMergedCollection=this.mergedCollection,this.mergedCollection=this.resolveMergedCollection(),(0,r.default)(this.notifyCollectionUpdates.bind(this),1e3)()}persistCollections(){const b=[];this.collections.forEach((S,A)=>{S.persistent&&b.push({extensionIdentifier:A,collection:(0,h.serializeEnvironmentVariableCollection)(this.collections.get(A).map)})});const y=JSON.stringify(b);this.storageService.setData(t.ENVIRONMENT_VARIABLE_COLLECTIONS_KEY,y)}};t.TerminalEnvironmentService=f,n.__decorate([(0,m.Autowired)(g.IWorkspaceStorageService),n.__metadata("design:type",Object)],f.prototype,"storageService",void 0),n.__decorate([(0,m.Autowired)(s.IStatusBarService),n.__metadata("design:type",Object)],f.prototype,"statusbarService",void 0),n.__decorate([(0,m.Autowired)(c.ITerminalProcessPath),n.__metadata("design:type",Object)],f.prototype,"terminalProcessService",void 0),n.__decorate([(0,m.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],f.prototype,"dialogService",void 0),n.__decorate([(0,m.Autowired)(p.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,m.Autowired)(p.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),t.TerminalEnvironmentService=f=n.__decorate([(0,m.Injectable)()],f)},102:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalErrorService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(26405);let m=class{constructor(){this.errors=new Map,this._onErrorsChangeEmitter=new o.Emitter,this.onErrorsChange=this._onErrorsChangeEmitter.event,this.service.onError(p=>{this.errors.set(p.id,p),this._onErrorsChangeEmitter.fire()}),this.service.onExit(p=>{try{this.view.getWidget(p.sessionId).reuse||this.view.removeWidget(p.sessionId)}catch{}}),this.controller.onDidCloseTerminal(p=>{this.errors.delete(p.id),this._onErrorsChangeEmitter.fire()})}async fix(p){const _=this.controller.findClientFromWidgetId(p);if(_)return await 0,this.errors.delete(p),this._onErrorsChangeEmitter.fire(),_.reset(),_.attached.promise}};t.TerminalErrorService=m,n.__decorate([(0,r.Autowired)(l.ITerminalService),n.__metadata("design:type",Object)],m.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],m.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalGroupViewService),n.__metadata("design:type",Object)],m.prototype,"view",void 0),t.TerminalErrorService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},90853:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProcessExtHostProxy=void 0;const n=e(43718);class r extends n.Disposable{get onProcessReady(){return this._onProcessReady.event}get onProcessOverrideDimensions(){return this._onProcessOverrideDimensions.event}constructor(l,m,E,p){super(),this.terminalId=l,this._cols=m,this._rows=E,this.controller=p,this._onProcessData=this.registerDispose(new n.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessExit=this.registerDispose(new n.Emitter),this.onProcessExit=this._onProcessExit.event,this._onProcessReady=this.registerDispose(new n.Emitter),this._onProcessTitleChanged=this.registerDispose(new n.Emitter),this.onProcessTitleChanged=this._onProcessTitleChanged.event,this._onProcessOverrideDimensions=this.registerDispose(new n.Emitter),this._onStart=this.registerDispose(new n.Emitter),this.onStart=this._onStart.event,this._onInput=this.registerDispose(new n.Emitter),this.onInput=this._onInput.event,this._onResize=this.registerDispose(new n.Emitter),this.onResize=this._onResize.event,this._onShutdown=this.registerDispose(new n.Emitter),this.onShutdown=this._onShutdown.event,this._onRequestInitialCwd=this.registerDispose(new n.Emitter),this.onRequestInitialCwd=this._onRequestInitialCwd.event,this._onRequestCwd=this.registerDispose(new n.Emitter),this.onRequestCwd=this._onRequestCwd.event,this._onRequestLatency=this.registerDispose(new n.Emitter),this.onRequestLatency=this._onRequestLatency.event,this._pendingInitialCwdRequests=[],this._pendingCwdRequests=[],this._pendingLatencyRequests=[]}emitData(l){this._onProcessData.fire(l)}emitTitle(l){this._onProcessTitleChanged.fire(l)}emitReady(l,m){this._onProcessReady.fire({pid:l,cwd:m})}emitExit(l){this._onProcessExit.fire(l),this.dispose()}emitOverrideDimensions(l){this._onProcessOverrideDimensions.fire(l)}emitInitialCwd(l){for(;this._pendingInitialCwdRequests.length>0;)this._pendingInitialCwdRequests.pop()(l)}emitCwd(l){for(;this._pendingCwdRequests.length>0;)this._pendingCwdRequests.pop()(l)}emitLatency(l){for(;this._pendingLatencyRequests.length>0;)this._pendingLatencyRequests.pop()(l)}async start(){return this.controller.requestStartExtensionTerminal(this,this._cols,this._rows)}shutdown(l){this._onShutdown.fire(l)}input(l){this._onInput.fire(l)}resize(l,m){this._onResize.fire({cols:l,rows:m})}getInitialCwd(){return new Promise(l=>{this._onRequestInitialCwd.fire(),this._pendingInitialCwdRequests.push(l)})}getCwd(){return new Promise(l=>{this._onRequestCwd.fire(),this._pendingCwdRequests.push(l)})}getLatency(){return new Promise(l=>{this._onRequestLatency.fire(),this._pendingLatencyRequests.push(l)})}}t.TerminalProcessExtHostProxy=r},53891:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalHoverManagerService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=20,m=5;let E=class{appendTerminalHoverOverlay(){const _=document.querySelector("#ide-overlay");if(!_)throw new Error("ide-overlay is requried");const s=document.createElement("div");s.classList.add("terminal-hover-overlay"),_.appendChild(s),this.hoverOverlay=s}appendTerminalHoverContainer(){var _;this.hoverWidget=document.createElement("div"),this.hoverWidget.style.display="none",this.hoverWidget.style.position="fixed",this.hoverWidget.style.color="var(--editorWidget-foreground)",this.hoverWidget.style.backgroundColor="var(--editorWidget-background)",this.hoverWidget.style.borderColor="var(--editorWidget-border)",this.hoverWidget.style.borderWidth="0.5px",this.hoverWidget.style.borderStyle="solid",this.hoverWidget.style.padding="5px",this.hoverWidget.style.top="-500px",this.hoverWidget.style.left="-500px",this.hoverWidget.style.zIndex="10",this.hoverWidget.classList.add("hover-container"),this.hoverOverlay||this.appendTerminalHoverOverlay(),(_=this.hoverOverlay)===null||_===void 0||_.appendChild(this.hoverWidget)}setHoverOverlay(_){this.hoverOverlay=_}showHover(_,s,g){this.hoverWidget||this.appendTerminalHoverContainer();const c=_.viewportRange,h=_.cellDimensions,u=_.boundingClientRect;return this.hoverWidget&&(this.hoverWidget.textContent=s,this.hoverWidget.style.display="inline"),requestAnimationFrame(()=>{if(this.hoverWidget){this.hoverWidget.style.top=`${(c.start.y-1)*h.height+u.y-l}px`;let d=c.start.x*h.width+u.x+m;d+this.hoverWidget.clientWidth>u.x+u.width&&(d=u.x+u.width-this.hoverWidget.clientWidth-m),this.hoverWidget.style.left=`${d}px`}}),o.Disposable.create(()=>this.dispose())}hideHover(){this.hoverWidget&&this.dispose()}dispose(){var _;(_=this.hoverWidget)===null||_===void 0||_.remove(),this.hoverWidget=void 0}};t.TerminalHoverManagerService=E,t.TerminalHoverManagerService=E=n.__decorate([(0,r.Injectable)()],E)},35628:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalKeyBoardInputService=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this._isCommandOrCtrl=!1}get isCommandOrCtrl(){return this._isCommandOrCtrl}listen(){const E=o.isMacintosh?"Meta":"Control";document.addEventListener("keydown",p=>{p.key===E&&(this._isCommandOrCtrl=!0)}),document.addEventListener("keyup",p=>{p.key===E&&(this._isCommandOrCtrl=!1)})}};t.TerminalKeyBoardInputService=l,t.TerminalKeyBoardInputService=l=n.__decorate([(0,r.Injectable)()],l)},82022:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalInternalService=void 0;const n=e(85608),r=e(76003),o=e(26405);let l=class{constructor(){this._processExtHostProxies=new Map}generateSessionId(){return this.service.generateSessionId?this.service.generateSessionId():(0,o.generateSessionId)()}getOptions(){return this.service.getOptions?this.service.getOptions():{}}check(E){return this.service.check?this.service.check(E):Promise.resolve(!0)}_getExtHostProxy(E){return this._processExtHostProxies.get(E)}async sendText(E,p){const _=this._getExtHostProxy(E);return _?_.emitData(p):this.service.sendText(E,p)}async resize(E,p,_){const s=this._getExtHostProxy(E);return s?s.resize(p,_):this.service.resize(E,p,_)}disposeById(E){const p=this._getExtHostProxy(E);return p?(this._processExtHostProxies.delete(E),p.dispose()):this.service.disposeById(E)}async getProcessId(E){return this._getExtHostProxy(E)?-1:this.service.getProcessId(E)}onError(E){return this.service.onError(E)}onExit(E){return this.service.onExit(E)}onProcessChange(E){return this.service.onProcessChange(E)}async getOS(){return await this.service.getOS()}async getProfiles(E){return await this.service.getProfiles(E)}async getDefaultSystemShell(){return await this.service.getDefaultSystemShell()}async getCodePlatformKey(){return await this.service.getCodePlatformKey()}async attachByLaunchConfig(E,p,_,s,g){if(s.customPtyImplementation){const c=s.customPtyImplementation(E,p,_);return c.start(),c.onProcessExit(()=>{this._processExtHostProxies.delete(E)}),this._processExtHostProxies.set(E,c),{name:s.name||"ExtensionTerminal-"+E,readonly:!1,onData:c.onProcessData.bind(c),sendData:c.input.bind(c),onExit:c.onProcessExit.bind(c)}}return await this.service.attachByLaunchConfig(E,p,_,s,g)}async getCwd(E){return await this.service.getCwd(E)}};t.TerminalInternalService=l,n.__decorate([(0,r.Autowired)(o.ITerminalService),n.__metadata("design:type",Object)],l.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(o.ITerminalController),n.__metadata("design:type",Object)],l.prototype,"controller",void 0),t.TerminalInternalService=l=n.__decorate([(0,r.Injectable)()],l)},12642:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNetworkService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(26405);let m=class extends o.Disposable{constructor(){super(),this._onConnect=new o.Emitter,this.onConnect=this._onConnect.event,this._onDisconnect=new o.Emitter,this.onDisconnect=this._onDisconnect.event,this._status=l.TerminalNetworkStatus.DISCONNECTED,this._resetRetryTimers=new Map,this._reconnectInfo=new Map,this.controller.onDidCloseTerminal(p=>{this._resetRetryTimers.delete(p.id),this._reconnectInfo.delete(p.id)}),this.onDispose(()=>{this._timer&&clearTimeout(this._timer)})}get status(){return this._status}setStatus(p){this._status=p,p===l.TerminalNetworkStatus.CONNECTED?(this._onConnect.fire(),this.scheduleReconnection()):this._onDisconnect.fire()}bindErrors(){this.service.onError(this.handleError.bind(this))}handleError(p){p.shouldReconnect==null&&(p.shouldReconnect=!0);const _=p.id,s=this.getReconnectInfo(_);s.times&&(s.nextRetry=Date.now()+2e3),this._reconnectInfo.set(_,s),this.scheduleReconnection()}reconnect(){if(this._status===l.TerminalNetworkStatus.DISCONNECTED)return;const p=Date.now();let _=Number.POSITIVE_INFINITY;for(const s of this.errorService.errors.keys()){if(!this.shouldReconnect(s))continue;const{nextRetry:g}=this.getReconnectInfo(s);g>p?_=Math.min(_,g-p):this.reconnectClient(s)}_<Number.POSITIVE_INFINITY&&this.scheduleReconnection(_)}async reconnectClient(p){this.countRetry(p);const _=this.errorService.fix(p);return _.then(()=>{this.resetRetryLater(p)}),_}getReconnectInfo(p){return this._reconnectInfo.get(p)||{times:0,nextRetry:0}}countRetry(p){const _=this._resetRetryTimers.get(p);_&&(clearTimeout(_),this._resetRetryTimers.delete(p));const s=this.getReconnectInfo(p);s.times+=1,this._reconnectInfo.set(p,s)}resetRetryLater(p){const _=window.setTimeout(()=>{this._reconnectInfo.delete(p),this._resetRetryTimers.delete(p)},8e3);this._resetRetryTimers.set(p,_)}scheduleReconnection(p=200){this._timer||(this._timer=window.setTimeout(()=>{this._timer=void 0,this.reconnect()},p))}shouldReconnect(p){const _=this.errorService.errors.get(p);return _?.shouldReconnect?this.getReconnectInfo(p).times<3:!1}};t.TerminalNetworkService=m,n.__decorate([(0,r.Autowired)(l.ITerminalErrorService),n.__metadata("design:type",Object)],m.prototype,"errorService",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalInternalService),n.__metadata("design:type",Object)],m.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],m.prototype,"controller",void 0),t.TerminalNetworkService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},13663:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalPreference=void 0;const r=e(85608),o=r.__importDefault(e(16735)),l=e(76003),m=e(41869),E=e(43718),p=e(3276);let _=n=class{_prefToOption(g){return g.startsWith("terminal.integrated.")?g.replace("terminal.integrated.",""):g.replace("terminal.","")}_optionToPref(g){return`terminal.${g}`}_valid(g,c){return this.toValidOption(g,c)||n.defaultOptions[g]}constructor(){this._onChange=new E.Emitter,this.onChange=this._onChange.event,this.service.onPreferenceChanged(({preferenceName:g,newValue:c,oldValue:h})=>{const u=this._prefToOption(g);c!==h&&p.SupportedOptionsName[u]&&this._onChange.fire({name:u,value:this._valid(u,c)})})}getCodeCompatibleOption(){const g={copyOnSelection:this.service.get("terminal.integrated.copyOnSelection"),cursorBlink:this.service.get("terminal.integrated.cursorBlinking"),fontSize:this.service.get("terminal.integrated.fontSize"),scrollback:this.service.get("terminal.integrated.scrollback"),fontFamily:this.service.get("terminal.integrated.fontFamily")||this.service.get("editor.fontFamily"),fontWeight:this.service.get("terminal.integrated.fontWeight"),fontWeightBold:this.service.get("terminal.integrated.fontWeightBold"),cursorStyle:this.service.get("terminal.integrated.cursorStyle")==="line"?"bar":this.service.get("terminal.integrated.cursorStyle"),cursorWidth:this.service.get("terminal.integrated.cursorWidth"),lineHeight:this.service.get("terminal.integrated.lineHeight"),letterSpacing:this.service.get("terminal.integrated.letterSpacing"),fastScrollSensitivity:this.service.get("terminal.integrated.fastScrollSensitivity")};return(0,o.default)(g,c=>c!==void 0)}get(g){const c=this.service.get(this._optionToPref(g),n.defaultOptions[g]);return this._valid(g,c)}getOrUndefined(g){return this.service.get(this._optionToPref(g))}toValidOption(g,c){switch(g){case p.SupportedOptionsName.fontSize:return c>5?c:5;case p.SupportedOptionsName.cursorStyle:return c==="line"?"bar":c;default:return c}}getOptions(){const g={};return Object.entries(p.SupportedOptionsName).forEach(([c])=>{if(!c)return;const h=this.getOrUndefined(c);h&&(g[c]=h)}),g}toJSON(){return{...n.defaultOptions,...this.getCodeCompatibleOption(),...this.getOptions()}}};t.TerminalPreference=_,_.defaultOptions={allowTransparency:!1,macOptionIsMeta:!1,cursorBlink:!1,scrollback:2500,tabStopWidth:8,fontSize:12,customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,scrollSensitivity:1,overviewRulerWidth:10,copyOnSelection:!1,fontWeightBold:"bold",fontFamily:"Menlo, Monaco, 'Courier New', monospace",cursorStyle:"block"},r.__decorate([(0,l.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],_.prototype,"service",void 0),t.TerminalPreference=_=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],_)},94486:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProfileInternalService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26405),m="Generated Profile";let E=class{async resolveTerminalTypeProfile(){var _,s;const g=this.preferenceService.get("terminal.type");if(!g||g==="default")return;let c=g;const h=[],u=await this.terminalService.getCodePlatformKey();await this.terminalService.getOS()===o.OperatingSystem.Windows?c=(_=await this.serviceClientRPC.$resolveWindowsShellPath(g))!==null&&_!==void 0?_:c:c=(s=await this.serviceClientRPC.$resolveUnixShellPath(g))!==null&&s!==void 0?s:c;const v=this.preferenceService.get(`terminal.integrated.shellArgs.${u}`,[]);return h.push(...v),{profileName:"terminal.type",path:c,args:h,icon:void 0,isDefault:!1}}async resolveDefaultProfile(_){const s=await this.resolveTerminalTypeProfile();if(s)return s;await this.profileService.profilesReady;let g=await this.resolveRealDefaultProfile();return g||(g=await this._resolvedFallbackDefaultProfile(_)),g}async resolveRealDefaultProfile(){await this.profileService.profilesReady;const _=this.profileService.getDefaultProfileName();if(_)return this.profileService.availableProfiles.find(s=>s.profileName===_)}async _resolvedFallbackDefaultProfile(_){var s;const g=await this.terminalService.getDefaultSystemShell();let c;return((s=_?.os)!==null&&s!==void 0?s:await this.terminalService.getOS())===o.OperatingSystem.Macintosh&&o.path.parse(g).name.match(/(zsh|bash)/)?c=["--login"]:c=[],{profileName:m,path:g,args:c,isDefault:!1}}};t.TerminalProfileInternalService=E,n.__decorate([(0,r.Autowired)(l.ITerminalProfileService),n.__metadata("design:type",Object)],E.prototype,"profileService",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalService),n.__metadata("design:type",Object)],E.prototype,"terminalService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalServicePath),n.__metadata("design:type",Object)],E.prototype,"serviceClientRPC",void 0),t.TerminalProfileInternalService=E=n.__decorate([(0,r.Injectable)()],E)},89570:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProfileService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(26405),{equals:E}=l.arrays;let p=class extends l.WithEventBus{get onTerminalProfileResolved(){return this.onTerminalProfileResolvedEmitter.event}get onDidChangeDefaultShell(){return this.onDidChangeDefaultShellEmitter.event}get profilesReady(){return this._profilesReadyBarrier.wait().then(()=>{})}get onDidChangeAvailableProfiles(){return this._onDidChangeAvailableProfiles.event}constructor(){super(),this.onTerminalProfileResolvedEmitter=new l.Emitter,this.onDidChangeDefaultShellEmitter=new l.Emitter,this._onDidChangeAvailableProfiles=new l.Emitter,this._profileProviders=new Map,this._contributedProfiles=[],this._rawContributedProfileMap=new Map,this._profilesReadyBarrier=new l.AutoOpenBarrier(5e3),this.refreshAvailableProfiles(),this.setupPreferenceListener()}get availableProfiles(){return this._availableProfiles||[]}get contributedProfiles(){return this._contributedProfiles||[]}setupPreferenceListener(){this.preferenceService.onPreferenceChanged(h=>{h.preferenceName==="terminal.type"&&this.onDidChangeDefaultShellEmitter.fire(h.newValue)})}getDefaultProfileName(){return this.preferenceService.get(`terminal.integrated.defaultProfile.${this.terminalService.getCodePlatformKey()}`)}refreshAvailableProfiles(){this._refreshAvailableProfilesNow()}getContributedProfileProvider(h,u){const d=this._profileProviders.get(h);return d?.get(u)}async createContributedTerminalProfile(h,u,d){await this.onTerminalProfileResolvedEmitter.fireAndAwait(u);const v=this.getContributedProfileProvider(h,u);if(!v){this.logger.error(`No terminal profile provider registered for id "${u}"`);return}try{await v.createContributedTerminalProfile(d)}catch(f){this.logger.error("create contributed terminal profile error:",f.message)}}registerTerminalProfileProvider(h,u,d){let v=this._profileProviders.get(h);return v||(v=new Map,this._profileProviders.set(h,v)),v.set(u,d),l.Disposable.create(()=>this._profileProviders.delete(u))}async _detectProfiles(h=!0){return await this.terminalService.getProfiles(h)}async _updateContributedProfiles(){const h=await this.terminalService.getCodePlatformKey(),u=[],d=this.preferenceService.get("terminal.integrated.profiles."+h,{});for(const[a,b]of Object.entries(d))b===null&&u.push(a);const v=Array.from(this.rawContributedProfiles.filter(a=>!u.includes(a.title))),f=!E(v,this._contributedProfiles,s);return this._contributedProfiles=v,f}async _refreshAvailableProfilesNow(){const h=await this._detectProfiles(!0),u=!E(h,this._availableProfiles,_),d=await this._updateContributedProfiles();(u||d)&&(this._availableProfiles=h,this._profilesReadyBarrier.open(),this._onDidChangeAvailableProfiles.fire(this._availableProfiles))}async getContributedDefaultProfile(h){if(h&&!h.extHostTerminalId&&!("executable"in h)){const u=await this.terminalService.getCodePlatformKey(),d=this.preferenceService.get(`terminal.integrated.defaultProfile.${u}`);return this.contributedProfiles.find(f=>f.title===d)}}async saveContributedProfile(h){const u=await this.terminalService.getCodePlatformKey(),d=await this.preferenceService.get(`terminal.integrated.profiles.${u}`);if(typeof d=="object"){const v={extensionIdentifier:h.extensionIdentifier,icon:h.options.icon,id:h.id,title:h.title,color:h.options.color};d[h.title]=v}await this.preferenceService.set(`terminal.integrated.profiles.${u}`,d,l.PreferenceScope.User)}get rawContributedProfiles(){return Array.from(this._rawContributedProfileMap.values())}addContributedProfile(h,u){var d;const v=((d=u?.profiles)===null||d===void 0?void 0:d.filter(f=>g(f)).map(f=>({...f,extensionIdentifier:h})))||[];for(const f of v)this._rawContributedProfileMap.set(f.id,f);this.refreshAvailableProfiles()}removeContributedProfile(h){const u=this.rawContributedProfiles;for(const d of u)d.extensionIdentifier===h&&this._rawContributedProfileMap.delete(d.id)}};t.TerminalProfileService=p,n.__decorate([(0,r.Autowired)(m.ITerminalService),n.__metadata("design:type",Object)],p.prototype,"terminalService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,l.throttle)(2e3),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"refreshAvailableProfiles",null),t.TerminalProfileService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p);function _(c,h){return c.profileName===h.profileName&&(0,m.terminalProfileArgsMatch)(c.args,h.args)&&c.color===h.color&&c.isAutoDetected===h.isAutoDetected&&c.isDefault===h.isDefault&&c.overrideName===h.overrideName&&c.path===h.path}function s(c,h){return c.extensionIdentifier===h.extensionIdentifier&&c.color===h.color&&c.icon===h.icon&&c.id===h.id&&c.title===h.title}function g(c){return!c.icon||typeof c.icon=="string"||l.URI.isUri(c.icon)||"light"in c.icon&&"dark"in c.icon&&l.URI.isUri(c.icon.light)&&l.URI.isUri(c.icon.dark)}},46666:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalRenderProvider=void 0;const n=e(85608),r=e(76003),o=e(65586);let l=class{get infoItemRender(){return o.renderInfoItem}get addItemRender(){return o.renderAddItem}};t.TerminalRenderProvider=l,t.TerminalRenderProvider=l=n.__decorate([(0,r.Injectable)()],l)},70406:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalRestore=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26405),m="OPENSUMI_TERMINAL_RESTORE";let E=class extends o.Disposable{get storageKey(){return m}save(){const _=this.controller.toJSON(),s=this.storageKey;this.scopedBrowserStorageService.setData(s,_)}restore(){const _=this.storageKey,s=this.scopedBrowserStorageService.getData(_);if(s)try{return this.controller.recovery(s)}catch{}return Promise.resolve()}};t.TerminalRestore=E,n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],E.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalInternalService),n.__metadata("design:type",Object)],E.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(o.ScopedBrowserStorageService),n.__metadata("design:type",o.ScopedBrowserStorageService)],E.prototype,"scopedBrowserStorageService",void 0),t.TerminalRestore=E=n.__decorate([(0,r.Injectable)()],E)},12894:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalSearchService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(26405);let m=class{constructor(){this._isVisible=!1,this._onVisibleChange=new o.Emitter,this.onVisibleChange=this._onVisibleChange.event,this.text=""}get isVisible(){return this._isVisible}set isVisible(p){this._isVisible=p,this._onVisibleChange.fire(p)}get client(){return this.controller.findClientFromWidgetId(this.terminalView.currentWidget.get().id)}open(){this.isVisible=!0}close(){var p;(p=this.client)===null||p===void 0||p.closeSearch(),this.isVisible=!1}clear(){var p;(p=this.client)===null||p===void 0||p.closeSearch(),this.text=""}search(){var p;(p=this.client)===null||p===void 0||p.findNext(this.text)}};t.TerminalSearchService=m,n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],m.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalGroupViewService),n.__metadata("design:type",Object)],m.prototype,"terminalView",void 0),n.__decorate([(0,o.debounce)(150),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],m.prototype,"search",null),t.TerminalSearchService=m=n.__decorate([(0,r.Injectable)()],m)},91815:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodePtyTerminalService=void 0;const r=e(85608),o=e(76003),l=e(41869),m=e(43718),E=e(26405);let p=n=class extends m.Disposable{constructor(){super(...arguments),this._onError=this.registerDispose(new m.Emitter),this.onError=this._onError.event,this._onExit=this.registerDispose(new m.Emitter),this.onExit=this._onExit.event,this._onProcessChange=this.registerDispose(new m.Emitter),this.onProcessChange=this._onProcessChange.event,this._onDataDispatcher=this.registerDispose(new m.Dispatcher),this._onExitDispatcher=this.registerDispose(new m.Dispatcher),this._createCustomWebSocket=(s,g)=>({name:g.name,readonly:!1,onData:c=>this._onDataDispatcher.on(s)(c),onExit:c=>this._onExitDispatcher.on(s)(h=>{c(h.code)}),sendData:c=>{this.sendText(s,c)},ptyInstance:g})}generateSessionId(){return this.applicationService.clientId+E.TERMINAL_ID_SEPARATOR+(0,E.generateSessionId)()}async check(s){return await this.serviceClientRPC.ensureTerminal(s)}async attachByLaunchConfig(s,g,c,h,u){h.executable||(h.executable=await this.getDefaultSystemShell()),this.logger.log(`attach terminal ${s} with launchConfig `,h);const d=await this.serviceClientRPC.create2(s,g,c,h);if(d&&(d.pid||d.name))return this.logger.log(`${s} attach success, pid: ${d.pid}, name: ${d.name}`),this._createCustomWebSocket(s,d);this.logger.error(`${s} cannot create ptyInstance`,d)}_sendMessage(s,g,c){const h=c||n.countId++;this.serviceClientRPC.onMessage(s,JSON.stringify({id:h,...g}))}async sendText(s,g){this._sendMessage(s,{data:g})}async resize(s,g,c){this._sendMessage(s,{method:"resize",params:{cols:g,rows:c}})}async getCodePlatformKey(){return await this.serviceClientRPC.getCodePlatformKey()}disposeById(s){this.serviceClientRPC.disposeById(s)}async getProcessId(s){return this.serviceClientRPC.getProcessId(s)}onMessage(s,g){this._onDataDispatcher.dispatch(s,g)}closeClient(s,g,c){this.logger.log(`${s} was closed, error:`,g),(0,E.isTerminalError)(g)?this._onError.fire(g):typeof g=="number"?(this._onExitDispatcher.dispatch(s,{code:g,signal:c}),this._onExit.fire({sessionId:s,code:g,signal:c})):g&&(this._onExitDispatcher.dispatch(s,{code:g.code,signal:g.signal}),this._onExit.fire({sessionId:s,code:g.code,signal:g.signal}))}$processChange(s,g){this._onProcessChange.fire({sessionId:s,processName:g})}async getOS(){return this.backendOs?this.backendOs:this.backendOs=this.serviceClientRPC.getOS()}async getProfiles(s){const g=await this.getCodePlatformKey(),c=this.preferenceService.get(`terminal.integrated.profiles.${g}`,{});return await this.serviceClientRPC.detectAvailableProfiles({autoDetect:s,preference:c})}async getCwd(s){try{return await this.serviceClientRPC.getCwd(s)}catch{return}}async getDefaultSystemShell(){return await this.serviceClientRPC.getDefaultSystemShell(await this.getOS())}};t.NodePtyTerminalService=p,p.countId=1,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],p.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m.ILogger),r.__metadata("design:type",Object)],p.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(E.ITerminalServicePath),r.__metadata("design:type",Object)],p.prototype,"serviceClientRPC",void 0),r.__decorate([(0,o.Autowired)(l.PreferenceService),r.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(m.IApplicationService),r.__metadata("design:type",Object)],p.prototype,"applicationService",void 0),t.NodePtyTerminalService=p=n=r.__decorate([(0,o.Injectable)()],p)},29041:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalTheme=void 0;const n=e(85608),r=e(76003),o=e(9132),l=e(48611),m=n.__importStar(e(43395));let E=class extends o.Themable{get terminalTheme(){var _,s,g,c,h,u,d,v,f,a,b,y,S,A,T,w;const D=this.getColorSync(m.TERMINAL_BACKGROUND_COLOR),I=this.getColorSync(m.TERMINAL_FOREGROUND_COLOR),O=this.getColorSync(m.TERMINAL_SELECTION_BACKGROUND_COLOR),P=this.getColorSync(m.TERMINAL_CURSOR_FOREGROUND_COLOR)||I,R=this.getColorSync(m.TERMINAL_CURSOR_BACKGROUND_COLOR)||D,M=this.getColorSync(m.TERMINAL_SELECTION_BACKGROUND_COLOR),k=this.getColorSync(m.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR),B=this.getColorSync(m.TERMINAL_SELECTION_FOREGROUND_COLOR)||void 0,x=m.ansiColorIdentifiers;if(!(D&&I&&O&&P&&R))throw new Error("terminal color undefined");return{background:l.Color.Format.CSS.formatHexA(D),foreground:l.Color.Format.CSS.formatHexA(I),cursor:l.Color.Format.CSS.formatHexA(P),cursorAccent:l.Color.Format.CSS.formatHexA(R),selectionBackground:M?.toString(),selectionInactiveBackground:k?.toString(),selectionForeground:B?.toString(),black:(_=this.getColorSync(x[0]))===null||_===void 0?void 0:_.toString(),red:(s=this.getColorSync(x[1]))===null||s===void 0?void 0:s.toString(),green:(g=this.getColorSync(x[2]))===null||g===void 0?void 0:g.toString(),yellow:(c=this.getColorSync(x[3]))===null||c===void 0?void 0:c.toString(),blue:(h=this.getColorSync(x[4]))===null||h===void 0?void 0:h.toString(),magenta:(u=this.getColorSync(x[5]))===null||u===void 0?void 0:u.toString(),cyan:(d=this.getColorSync(x[6]))===null||d===void 0?void 0:d.toString(),white:(v=this.getColorSync(x[7]))===null||v===void 0?void 0:v.toString(),brightBlack:(f=this.getColorSync(x[8]))===null||f===void 0?void 0:f.toString(),brightRed:(a=this.getColorSync(x[9]))===null||a===void 0?void 0:a.toString(),brightGreen:(b=this.getColorSync(x[10]))===null||b===void 0?void 0:b.toString(),brightYellow:(y=this.getColorSync(x[11]))===null||y===void 0?void 0:y.toString(),brightBlue:(S=this.getColorSync(x[12]))===null||S===void 0?void 0:S.toString(),brightMagenta:(A=this.getColorSync(x[13]))===null||A===void 0?void 0:A.toString(),brightCyan:(T=this.getColorSync(x[14]))===null||T===void 0?void 0:T.toString(),brightWhite:(w=this.getColorSync(x[15]))===null||w===void 0?void 0:w.toString()}}};t.TerminalTheme=E,t.TerminalTheme=E=n.__decorate([(0,r.Injectable)()],E)},70845:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeAheadAddon=t.PredictionTimeline=t.PredictionStats=t.isTenativeCharacterPrediction=t.DEFAULT_LOCAL_ECHO_EXCLUDE=void 0,t.escapeRegExpCharacters=l;const n=e(85608),r=e(43718),o=e(4636);t.DEFAULT_LOCAL_ECHO_EXCLUDE=["vim","vi","nano","tmux"];function l(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}const m="\x1B",E=`${m}[`,p=`${E}?25h`,_=`${E}?25l`,s=`${E}X`,g=`${E}K`,c=/^\x1b\[[0-9;]*m/,h=/^\x1b\[?([0-9]*)(;[35])?O?([DC])/,u=/[^a-z0-9]/i,d=24,v=1e3*60*5,f=5,a=.3,b=.5,y=/^(\x1b\[(\??25[hl]|\??[0-9;]+n))+/,S=X=>X._core,A=X=>{},T=!1,w=(...X)=>{T&&console.log(X)};class D{get x(){return this._x}get y(){return this._y}get baseY(){return this._baseY}get coordinate(){return{x:this._x,y:this._y,baseY:this._baseY}}constructor(J,re,ce){this.rows=J,this.cols=re,this._buffer=ce,this._x=0,this._y=1,this._baseY=1,this._x=ce.cursorX,this._y=ce.cursorY,this._baseY=ce.baseY}getLine(){return this._buffer.getLine(this._y+this._baseY)}getCell(J){var re;return(re=this.getLine())===null||re===void 0?void 0:re.getCell(this._x,J)}moveTo(J){return this._x=J.x,this._y=J.y+J.baseY-this._baseY,this.moveInstruction()}clone(){const J=new D(this.rows,this.cols,this._buffer);return J.moveTo(this),J}move(J,re){return this._x=J,this._y=re,this.moveInstruction()}shift(J=0,re=0){return this._x+=J,this._y+=re,this.moveInstruction()}moveInstruction(){return this._y>=this.rows?(this._baseY+=this._y-(this.rows-1),this._y=this.rows-1):this._y<0&&(this._baseY-=this._y,this._y=0),`${E}${this._y+1};${this._x+1}H`}}const I=(X,J,re)=>{let ce=!1;re<0&&J.shift(-1);let fe;for(;J.x>=0;){if(fe=J.getCell(fe),!fe?.getCode())return;const Ae=fe.getChars();if(u.test(Ae)){if(ce)break}else ce=!0;J.shift(re)}re<0&&J.shift(1)};class O{get remaining(){return this._input.length-this.index}get eof(){return this.index===this._input.length}get rest(){return this._input.slice(this.index)}constructor(J){this._input=J,this.index=0}eatChar(J){if(this._input[this.index]===J)return this.index++,J}eatStr(J){if(this._input.slice(this.index,J.length)===J)return this.index+=J.length,J}eatGradually(J){const re=this.index;for(let ce=0;ce<J.length;ce++){if(ce>0&&this.eof)return 2;if(!this.eatChar(J[ce]))return this.index=re,1}return 0}eatRe(J){const re=J.exec(this._input.slice(this.index));if(re)return this.index+=re[0].length,re}eatCharCode(J=0,re=J+1){const ce=this._input.charCodeAt(this.index);if(!(ce<J||ce>=re))return this.index++,ce}}class P{constructor(){this.clearAfterTimeout=!1}apply(){return""}rollback(){return""}rollForwards(){return""}matches(){return 1}}class R{constructor(J){this.inner=J}apply(J,re){return this._appliedCursor=re.clone(),this.inner.apply(J,this._appliedCursor),""}rollback(J){return this.inner.rollback(J.clone()),""}rollForwards(J,re){return this._appliedCursor&&J.moveTo(this._appliedCursor),re}matches(J){return this.inner.matches(J)}}const M=X=>X instanceof R&&X.inner instanceof k;t.isTenativeCharacterPrediction=M;class k{constructor(J,re){this._style=J,this._char=re,this.affectsStyle=!0}apply(J,re){const ce=re.getCell();return this.appliedAt=ce?{pos:re.coordinate,oldAttributes:z(ce),oldChar:ce.getChars()}:{pos:re.coordinate,oldAttributes:"",oldChar:""},re.shift(1),this._style.apply+this._char+this._style.undo}rollback(J){if(!this.appliedAt)return"";const{oldAttributes:re,oldChar:ce,pos:fe}=this.appliedAt;return J.moveTo(fe)+(ce?`${re}${ce}${J.moveTo(fe)}`:s)}rollForwards(J,re){return this.appliedAt?J.clone().moveTo(this.appliedAt.pos)+re:""}matches(J,re){const ce=J.index;for(;J.eatRe(c););if(J.eof)return 2;if(J.eatChar(this._char))return 0;if(re instanceof k){const fe=J.eatGradually(`\b${re._char}${this._char}`);if(fe!==1)return fe}return J.index=ce,1}}class B{constructor(J){this._terminal=J}apply(J,re){var ce;const fe=!(!((ce=re.getLine())===null||ce===void 0)&&ce.translateToString(void 0,re.x).trim()),Ae=re.coordinate,te=re.shift(-1),Le=re.getCell();return this._appliedAt=Le?{isLastChar:fe,pos:Ae,oldAttributes:z(Le),oldChar:Le.getChars()}:{isLastChar:fe,pos:Ae,oldAttributes:"",oldChar:""},te+s}rollback(J){if(!this._appliedAt)return"";const{oldAttributes:re,oldChar:ce,pos:fe}=this._appliedAt;return ce?re+ce+J.moveTo(fe)+z(S(this._terminal)._inputHandler._curAttrData):J.moveTo(fe)+s}rollForwards(){return""}matches(J){var re;if(!((re=this._appliedAt)===null||re===void 0)&&re.isLastChar){const ce=J.eatGradually(`\b${E}K`);if(ce!==1)return ce;const fe=J.eatGradually("\b \b");if(fe!==1)return fe}return 1}}class x{apply(J,re){return this._prevPosition=re.coordinate,re.move(0,re.y+1),`\r
28838
+ `)+"\n```"),onClick:()=>this.onDidClickStatusBarEntry(y)})}notifyCollectionUpdates(){this._onDidChangeCollections.fire(this.mergedCollection),this.updateStatusBarMessage()}updateCollections(){(0,o.default)(this.persistCollections.bind(this),100)(),this.previousMergedCollection=this.mergedCollection,this.mergedCollection=this.resolveMergedCollection(),(0,r.default)(this.notifyCollectionUpdates.bind(this),1e3)()}persistCollections(){const b=[];this.collections.forEach((S,A)=>{S.persistent&&b.push({extensionIdentifier:A,collection:(0,h.serializeEnvironmentVariableCollection)(this.collections.get(A).map)})});const y=JSON.stringify(b);this.storageService.setData(t.ENVIRONMENT_VARIABLE_COLLECTIONS_KEY,y)}};t.TerminalEnvironmentService=f,n.__decorate([(0,m.Autowired)(g.IWorkspaceStorageService),n.__metadata("design:type",Object)],f.prototype,"storageService",void 0),n.__decorate([(0,m.Autowired)(s.IStatusBarService),n.__metadata("design:type",Object)],f.prototype,"statusbarService",void 0),n.__decorate([(0,m.Autowired)(c.ITerminalProcessPath),n.__metadata("design:type",Object)],f.prototype,"terminalProcessService",void 0),n.__decorate([(0,m.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],f.prototype,"dialogService",void 0),n.__decorate([(0,m.Autowired)(p.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,m.Autowired)(p.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),t.TerminalEnvironmentService=f=n.__decorate([(0,m.Injectable)()],f)},102:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalErrorService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(26405);let m=class{constructor(){this.errors=new Map,this._onErrorsChangeEmitter=new o.Emitter,this.onErrorsChange=this._onErrorsChangeEmitter.event,this.service.onError(p=>{this.errors.set(p.id,p),this._onErrorsChangeEmitter.fire()}),this.service.onExit(p=>{try{this.view.getWidget(p.sessionId).reuse||this.view.removeWidget(p.sessionId)}catch{}}),this.controller.onDidCloseTerminal(p=>{this.errors.delete(p.id),this._onErrorsChangeEmitter.fire()})}async fix(p){const _=this.controller.findClientFromWidgetId(p);if(_)return await 0,this.errors.delete(p),this._onErrorsChangeEmitter.fire(),_.reset(),_.attached.promise}};t.TerminalErrorService=m,n.__decorate([(0,r.Autowired)(l.ITerminalService),n.__metadata("design:type",Object)],m.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],m.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalGroupViewService),n.__metadata("design:type",Object)],m.prototype,"view",void 0),t.TerminalErrorService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},90853:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProcessExtHostProxy=void 0;const n=e(43718);class r extends n.Disposable{get onProcessReady(){return this._onProcessReady.event}get onProcessOverrideDimensions(){return this._onProcessOverrideDimensions.event}constructor(l,m,E,p){super(),this.terminalId=l,this._cols=m,this._rows=E,this.controller=p,this._onProcessData=this.registerDispose(new n.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessExit=this.registerDispose(new n.Emitter),this.onProcessExit=this._onProcessExit.event,this._onProcessReady=this.registerDispose(new n.Emitter),this._onProcessTitleChanged=this.registerDispose(new n.Emitter),this.onProcessTitleChanged=this._onProcessTitleChanged.event,this._onProcessOverrideDimensions=this.registerDispose(new n.Emitter),this._onStart=this.registerDispose(new n.Emitter),this.onStart=this._onStart.event,this._onInput=this.registerDispose(new n.Emitter),this.onInput=this._onInput.event,this._onResize=this.registerDispose(new n.Emitter),this.onResize=this._onResize.event,this._onShutdown=this.registerDispose(new n.Emitter),this.onShutdown=this._onShutdown.event,this._onRequestInitialCwd=this.registerDispose(new n.Emitter),this.onRequestInitialCwd=this._onRequestInitialCwd.event,this._onRequestCwd=this.registerDispose(new n.Emitter),this.onRequestCwd=this._onRequestCwd.event,this._onRequestLatency=this.registerDispose(new n.Emitter),this.onRequestLatency=this._onRequestLatency.event,this._pendingInitialCwdRequests=[],this._pendingCwdRequests=[],this._pendingLatencyRequests=[]}emitData(l){this._onProcessData.fire(l)}emitTitle(l){this._onProcessTitleChanged.fire(l)}emitReady(l,m){this._onProcessReady.fire({pid:l,cwd:m})}emitExit(l){this._onProcessExit.fire(l),this.dispose()}emitOverrideDimensions(l){this._onProcessOverrideDimensions.fire(l)}emitInitialCwd(l){for(;this._pendingInitialCwdRequests.length>0;)this._pendingInitialCwdRequests.pop()(l)}emitCwd(l){for(;this._pendingCwdRequests.length>0;)this._pendingCwdRequests.pop()(l)}emitLatency(l){for(;this._pendingLatencyRequests.length>0;)this._pendingLatencyRequests.pop()(l)}async start(){return this.controller.requestStartExtensionTerminal(this,this._cols,this._rows)}shutdown(l){this._onShutdown.fire(l)}input(l){this._onInput.fire(l)}resize(l,m){this._onResize.fire({cols:l,rows:m})}getInitialCwd(){return new Promise(l=>{this._onRequestInitialCwd.fire(),this._pendingInitialCwdRequests.push(l)})}getCwd(){return new Promise(l=>{this._onRequestCwd.fire(),this._pendingCwdRequests.push(l)})}getLatency(){return new Promise(l=>{this._onRequestLatency.fire(),this._pendingLatencyRequests.push(l)})}}t.TerminalProcessExtHostProxy=r},53891:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalHoverManagerService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=20,m=5;let E=class{appendTerminalHoverOverlay(){let _=document.querySelector("#terminal-link-hover-overlay");_||(_=document.createElement("div"),_.id="terminal-link-hover-overlay",document.body.appendChild(_));const s=document.createElement("div");s.classList.add("terminal-hover-overlay"),_.appendChild(s),this.hoverOverlay=s}appendTerminalHoverContainer(){var _;this.hoverWidget=document.createElement("div"),this.hoverWidget.style.display="none",this.hoverWidget.style.position="fixed",this.hoverWidget.style.color="var(--editorWidget-foreground)",this.hoverWidget.style.backgroundColor="var(--editorWidget-background)",this.hoverWidget.style.borderColor="var(--editorWidget-border)",this.hoverWidget.style.borderWidth="0.5px",this.hoverWidget.style.borderStyle="solid",this.hoverWidget.style.padding="5px",this.hoverWidget.style.top="-500px",this.hoverWidget.style.left="-500px",this.hoverWidget.style.zIndex="10",this.hoverWidget.classList.add("hover-container"),this.hoverOverlay||this.appendTerminalHoverOverlay(),(_=this.hoverOverlay)===null||_===void 0||_.appendChild(this.hoverWidget)}setHoverOverlay(_){this.hoverOverlay=_}showHover(_,s,g){this.hoverWidget||this.appendTerminalHoverContainer();const c=_.viewportRange,h=_.cellDimensions,u=_.boundingClientRect;return this.hoverWidget&&(this.hoverWidget.textContent=s,this.hoverWidget.style.display="inline"),requestAnimationFrame(()=>{if(this.hoverWidget){this.hoverWidget.style.top=`${(c.start.y-1)*h.height+u.y-l}px`;let d=c.start.x*h.width+u.x+m;d+this.hoverWidget.clientWidth>u.x+u.width&&(d=u.x+u.width-this.hoverWidget.clientWidth-m),this.hoverWidget.style.left=`${d}px`}}),o.Disposable.create(()=>this.dispose())}hideHover(){this.hoverWidget&&this.dispose()}dispose(){var _;(_=this.hoverWidget)===null||_===void 0||_.remove(),this.hoverWidget=void 0}};t.TerminalHoverManagerService=E,t.TerminalHoverManagerService=E=n.__decorate([(0,r.Injectable)()],E)},35628:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalKeyBoardInputService=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class{constructor(){this._isCommandOrCtrl=!1}get isCommandOrCtrl(){return this._isCommandOrCtrl}listen(){const E=o.isMacintosh?"Meta":"Control";document.addEventListener("keydown",p=>{p.key===E&&(this._isCommandOrCtrl=!0)}),document.addEventListener("keyup",p=>{p.key===E&&(this._isCommandOrCtrl=!1)})}};t.TerminalKeyBoardInputService=l,t.TerminalKeyBoardInputService=l=n.__decorate([(0,r.Injectable)()],l)},82022:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalInternalService=void 0;const n=e(85608),r=e(76003),o=e(26405);let l=class{constructor(){this._processExtHostProxies=new Map}generateSessionId(){return this.service.generateSessionId?this.service.generateSessionId():(0,o.generateSessionId)()}getOptions(){return this.service.getOptions?this.service.getOptions():{}}check(E){return this.service.check?this.service.check(E):Promise.resolve(!0)}_getExtHostProxy(E){return this._processExtHostProxies.get(E)}async sendText(E,p){const _=this._getExtHostProxy(E);return _?_.emitData(p):this.service.sendText(E,p)}async resize(E,p,_){const s=this._getExtHostProxy(E);return s?s.resize(p,_):this.service.resize(E,p,_)}disposeById(E){const p=this._getExtHostProxy(E);return p?(this._processExtHostProxies.delete(E),p.dispose()):this.service.disposeById(E)}async getProcessId(E){return this._getExtHostProxy(E)?-1:this.service.getProcessId(E)}onError(E){return this.service.onError(E)}onExit(E){return this.service.onExit(E)}onProcessChange(E){return this.service.onProcessChange(E)}async getOS(){return await this.service.getOS()}async getProfiles(E){return await this.service.getProfiles(E)}async getDefaultSystemShell(){return await this.service.getDefaultSystemShell()}async getCodePlatformKey(){return await this.service.getCodePlatformKey()}async attachByLaunchConfig(E,p,_,s,g){if(s.customPtyImplementation){const c=s.customPtyImplementation(E,p,_);return c.start(),c.onProcessExit(()=>{this._processExtHostProxies.delete(E)}),this._processExtHostProxies.set(E,c),{name:s.name||"ExtensionTerminal-"+E,readonly:!1,onData:c.onProcessData.bind(c),sendData:c.input.bind(c),onExit:c.onProcessExit.bind(c)}}return await this.service.attachByLaunchConfig(E,p,_,s,g)}async getCwd(E){return await this.service.getCwd(E)}};t.TerminalInternalService=l,n.__decorate([(0,r.Autowired)(o.ITerminalService),n.__metadata("design:type",Object)],l.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(o.ITerminalController),n.__metadata("design:type",Object)],l.prototype,"controller",void 0),t.TerminalInternalService=l=n.__decorate([(0,r.Injectable)()],l)},12642:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNetworkService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(26405);let m=class extends o.Disposable{constructor(){super(),this._onConnect=new o.Emitter,this.onConnect=this._onConnect.event,this._onDisconnect=new o.Emitter,this.onDisconnect=this._onDisconnect.event,this._status=l.TerminalNetworkStatus.DISCONNECTED,this._resetRetryTimers=new Map,this._reconnectInfo=new Map,this.controller.onDidCloseTerminal(p=>{this._resetRetryTimers.delete(p.id),this._reconnectInfo.delete(p.id)}),this.onDispose(()=>{this._timer&&clearTimeout(this._timer)})}get status(){return this._status}setStatus(p){this._status=p,p===l.TerminalNetworkStatus.CONNECTED?(this._onConnect.fire(),this.scheduleReconnection()):this._onDisconnect.fire()}bindErrors(){this.service.onError(this.handleError.bind(this))}handleError(p){p.shouldReconnect==null&&(p.shouldReconnect=!0);const _=p.id,s=this.getReconnectInfo(_);s.times&&(s.nextRetry=Date.now()+2e3),this._reconnectInfo.set(_,s),this.scheduleReconnection()}reconnect(){if(this._status===l.TerminalNetworkStatus.DISCONNECTED)return;const p=Date.now();let _=Number.POSITIVE_INFINITY;for(const s of this.errorService.errors.keys()){if(!this.shouldReconnect(s))continue;const{nextRetry:g}=this.getReconnectInfo(s);g>p?_=Math.min(_,g-p):this.reconnectClient(s)}_<Number.POSITIVE_INFINITY&&this.scheduleReconnection(_)}async reconnectClient(p){this.countRetry(p);const _=this.errorService.fix(p);return _.then(()=>{this.resetRetryLater(p)}),_}getReconnectInfo(p){return this._reconnectInfo.get(p)||{times:0,nextRetry:0}}countRetry(p){const _=this._resetRetryTimers.get(p);_&&(clearTimeout(_),this._resetRetryTimers.delete(p));const s=this.getReconnectInfo(p);s.times+=1,this._reconnectInfo.set(p,s)}resetRetryLater(p){const _=window.setTimeout(()=>{this._reconnectInfo.delete(p),this._resetRetryTimers.delete(p)},8e3);this._resetRetryTimers.set(p,_)}scheduleReconnection(p=200){this._timer||(this._timer=window.setTimeout(()=>{this._timer=void 0,this.reconnect()},p))}shouldReconnect(p){const _=this.errorService.errors.get(p);return _?.shouldReconnect?this.getReconnectInfo(p).times<3:!1}};t.TerminalNetworkService=m,n.__decorate([(0,r.Autowired)(l.ITerminalErrorService),n.__metadata("design:type",Object)],m.prototype,"errorService",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalInternalService),n.__metadata("design:type",Object)],m.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],m.prototype,"controller",void 0),t.TerminalNetworkService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},13663:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalPreference=void 0;const r=e(85608),o=r.__importDefault(e(16735)),l=e(76003),m=e(41869),E=e(43718),p=e(3276);let _=n=class{_prefToOption(g){return g.startsWith("terminal.integrated.")?g.replace("terminal.integrated.",""):g.replace("terminal.","")}_optionToPref(g){return`terminal.${g}`}_valid(g,c){return this.toValidOption(g,c)||n.defaultOptions[g]}constructor(){this._onChange=new E.Emitter,this.onChange=this._onChange.event,this.service.onPreferenceChanged(({preferenceName:g,newValue:c,oldValue:h})=>{const u=this._prefToOption(g);c!==h&&p.SupportedOptionsName[u]&&this._onChange.fire({name:u,value:this._valid(u,c)})})}getCodeCompatibleOption(){const g={copyOnSelection:this.service.get("terminal.integrated.copyOnSelection"),cursorBlink:this.service.get("terminal.integrated.cursorBlinking"),fontSize:this.service.get("terminal.integrated.fontSize"),scrollback:this.service.get("terminal.integrated.scrollback"),fontFamily:this.service.get("terminal.integrated.fontFamily")||this.service.get("editor.fontFamily"),fontWeight:this.service.get("terminal.integrated.fontWeight"),fontWeightBold:this.service.get("terminal.integrated.fontWeightBold"),cursorStyle:this.service.get("terminal.integrated.cursorStyle")==="line"?"bar":this.service.get("terminal.integrated.cursorStyle"),cursorWidth:this.service.get("terminal.integrated.cursorWidth"),lineHeight:this.service.get("terminal.integrated.lineHeight"),letterSpacing:this.service.get("terminal.integrated.letterSpacing"),fastScrollSensitivity:this.service.get("terminal.integrated.fastScrollSensitivity")};return(0,o.default)(g,c=>c!==void 0)}get(g){const c=this.service.get(this._optionToPref(g),n.defaultOptions[g]);return this._valid(g,c)}getOrUndefined(g){return this.service.get(this._optionToPref(g))}toValidOption(g,c){switch(g){case p.SupportedOptionsName.fontSize:return c>5?c:5;case p.SupportedOptionsName.cursorStyle:return c==="line"?"bar":c;default:return c}}getOptions(){const g={};return Object.entries(p.SupportedOptionsName).forEach(([c])=>{if(!c)return;const h=this.getOrUndefined(c);h&&(g[c]=h)}),g}toJSON(){return{...n.defaultOptions,...this.getCodeCompatibleOption(),...this.getOptions()}}};t.TerminalPreference=_,_.defaultOptions={allowTransparency:!1,macOptionIsMeta:!1,cursorBlink:!1,scrollback:2500,tabStopWidth:8,fontSize:12,customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,scrollSensitivity:1,overviewRulerWidth:10,copyOnSelection:!1,fontWeightBold:"bold",fontFamily:"Menlo, Monaco, 'Courier New', monospace",cursorStyle:"block"},r.__decorate([(0,l.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],_.prototype,"service",void 0),t.TerminalPreference=_=n=r.__decorate([(0,l.Injectable)(),r.__metadata("design:paramtypes",[])],_)},94486:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProfileInternalService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26405),m="Generated Profile";let E=class{async resolveTerminalTypeProfile(){var _,s;const g=this.preferenceService.get("terminal.type");if(!g||g==="default")return;let c=g;const h=[],u=await this.terminalService.getCodePlatformKey();await this.terminalService.getOS()===o.OperatingSystem.Windows?c=(_=await this.serviceClientRPC.$resolveWindowsShellPath(g))!==null&&_!==void 0?_:c:c=(s=await this.serviceClientRPC.$resolveUnixShellPath(g))!==null&&s!==void 0?s:c;const v=this.preferenceService.get(`terminal.integrated.shellArgs.${u}`,[]);return h.push(...v),{profileName:"terminal.type",path:c,args:h,icon:void 0,isDefault:!1}}async resolveDefaultProfile(_){const s=await this.resolveTerminalTypeProfile();if(s)return s;await this.profileService.profilesReady;let g=await this.resolveRealDefaultProfile();return g||(g=await this._resolvedFallbackDefaultProfile(_)),g}async resolveRealDefaultProfile(){await this.profileService.profilesReady;const _=this.profileService.getDefaultProfileName();if(_)return this.profileService.availableProfiles.find(s=>s.profileName===_)}async _resolvedFallbackDefaultProfile(_){var s;const g=await this.terminalService.getDefaultSystemShell();let c;return((s=_?.os)!==null&&s!==void 0?s:await this.terminalService.getOS())===o.OperatingSystem.Macintosh&&o.path.parse(g).name.match(/(zsh|bash)/)?c=["--login"]:c=[],{profileName:m,path:g,args:c,isDefault:!1}}};t.TerminalProfileInternalService=E,n.__decorate([(0,r.Autowired)(l.ITerminalProfileService),n.__metadata("design:type",Object)],E.prototype,"profileService",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalService),n.__metadata("design:type",Object)],E.prototype,"terminalService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalServicePath),n.__metadata("design:type",Object)],E.prototype,"serviceClientRPC",void 0),t.TerminalProfileInternalService=E=n.__decorate([(0,r.Injectable)()],E)},89570:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalProfileService=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(26405),{equals:E}=l.arrays;let p=class extends l.WithEventBus{get onTerminalProfileResolved(){return this.onTerminalProfileResolvedEmitter.event}get onDidChangeDefaultShell(){return this.onDidChangeDefaultShellEmitter.event}get profilesReady(){return this._profilesReadyBarrier.wait().then(()=>{})}get onDidChangeAvailableProfiles(){return this._onDidChangeAvailableProfiles.event}constructor(){super(),this.onTerminalProfileResolvedEmitter=new l.Emitter,this.onDidChangeDefaultShellEmitter=new l.Emitter,this._onDidChangeAvailableProfiles=new l.Emitter,this._profileProviders=new Map,this._contributedProfiles=[],this._rawContributedProfileMap=new Map,this._profilesReadyBarrier=new l.AutoOpenBarrier(5e3),this.refreshAvailableProfiles(),this.setupPreferenceListener()}get availableProfiles(){return this._availableProfiles||[]}get contributedProfiles(){return this._contributedProfiles||[]}setupPreferenceListener(){this.preferenceService.onPreferenceChanged(h=>{h.preferenceName==="terminal.type"&&this.onDidChangeDefaultShellEmitter.fire(h.newValue)})}getDefaultProfileName(){return this.preferenceService.get(`terminal.integrated.defaultProfile.${this.terminalService.getCodePlatformKey()}`)}refreshAvailableProfiles(){this._refreshAvailableProfilesNow()}getContributedProfileProvider(h,u){const d=this._profileProviders.get(h);return d?.get(u)}async createContributedTerminalProfile(h,u,d){await this.onTerminalProfileResolvedEmitter.fireAndAwait(u);const v=this.getContributedProfileProvider(h,u);if(!v){this.logger.error(`No terminal profile provider registered for id "${u}"`);return}try{await v.createContributedTerminalProfile(d)}catch(f){this.logger.error("create contributed terminal profile error:",f.message)}}registerTerminalProfileProvider(h,u,d){let v=this._profileProviders.get(h);return v||(v=new Map,this._profileProviders.set(h,v)),v.set(u,d),l.Disposable.create(()=>this._profileProviders.delete(u))}async _detectProfiles(h=!0){return await this.terminalService.getProfiles(h)}async _updateContributedProfiles(){const h=await this.terminalService.getCodePlatformKey(),u=[],d=this.preferenceService.get("terminal.integrated.profiles."+h,{});for(const[a,b]of Object.entries(d))b===null&&u.push(a);const v=Array.from(this.rawContributedProfiles.filter(a=>!u.includes(a.title))),f=!E(v,this._contributedProfiles,s);return this._contributedProfiles=v,f}async _refreshAvailableProfilesNow(){const h=await this._detectProfiles(!0),u=!E(h,this._availableProfiles,_),d=await this._updateContributedProfiles();(u||d)&&(this._availableProfiles=h,this._profilesReadyBarrier.open(),this._onDidChangeAvailableProfiles.fire(this._availableProfiles))}async getContributedDefaultProfile(h){if(h&&!h.extHostTerminalId&&!("executable"in h)){const u=await this.terminalService.getCodePlatformKey(),d=this.preferenceService.get(`terminal.integrated.defaultProfile.${u}`);return this.contributedProfiles.find(f=>f.title===d)}}async saveContributedProfile(h){const u=await this.terminalService.getCodePlatformKey(),d=await this.preferenceService.get(`terminal.integrated.profiles.${u}`);if(typeof d=="object"){const v={extensionIdentifier:h.extensionIdentifier,icon:h.options.icon,id:h.id,title:h.title,color:h.options.color};d[h.title]=v}await this.preferenceService.set(`terminal.integrated.profiles.${u}`,d,l.PreferenceScope.User)}get rawContributedProfiles(){return Array.from(this._rawContributedProfileMap.values())}addContributedProfile(h,u){var d;const v=((d=u?.profiles)===null||d===void 0?void 0:d.filter(f=>g(f)).map(f=>({...f,extensionIdentifier:h})))||[];for(const f of v)this._rawContributedProfileMap.set(f.id,f);this.refreshAvailableProfiles()}removeContributedProfile(h){const u=this.rawContributedProfiles;for(const d of u)d.extensionIdentifier===h&&this._rawContributedProfileMap.delete(d.id)}};t.TerminalProfileService=p,n.__decorate([(0,r.Autowired)(m.ITerminalService),n.__metadata("design:type",Object)],p.prototype,"terminalService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(l.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,l.throttle)(2e3),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"refreshAvailableProfiles",null),t.TerminalProfileService=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p);function _(c,h){return c.profileName===h.profileName&&(0,m.terminalProfileArgsMatch)(c.args,h.args)&&c.color===h.color&&c.isAutoDetected===h.isAutoDetected&&c.isDefault===h.isDefault&&c.overrideName===h.overrideName&&c.path===h.path}function s(c,h){return c.extensionIdentifier===h.extensionIdentifier&&c.color===h.color&&c.icon===h.icon&&c.id===h.id&&c.title===h.title}function g(c){return!c.icon||typeof c.icon=="string"||l.URI.isUri(c.icon)||"light"in c.icon&&"dark"in c.icon&&l.URI.isUri(c.icon.light)&&l.URI.isUri(c.icon.dark)}},46666:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalRenderProvider=void 0;const n=e(85608),r=e(76003),o=e(65586);let l=class{get infoItemRender(){return o.renderInfoItem}get addItemRender(){return o.renderAddItem}};t.TerminalRenderProvider=l,t.TerminalRenderProvider=l=n.__decorate([(0,r.Injectable)()],l)},70406:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalRestore=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(26405),m="OPENSUMI_TERMINAL_RESTORE";let E=class extends o.Disposable{get storageKey(){return m}save(){const _=this.controller.toJSON(),s=this.storageKey;this.scopedBrowserStorageService.setData(s,_)}restore(){const _=this.storageKey,s=this.scopedBrowserStorageService.getData(_);if(s)try{return this.controller.recovery(s)}catch{}return Promise.resolve()}};t.TerminalRestore=E,n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],E.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalInternalService),n.__metadata("design:type",Object)],E.prototype,"service",void 0),n.__decorate([(0,r.Autowired)(o.ScopedBrowserStorageService),n.__metadata("design:type",o.ScopedBrowserStorageService)],E.prototype,"scopedBrowserStorageService",void 0),t.TerminalRestore=E=n.__decorate([(0,r.Injectable)()],E)},12894:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalSearchService=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(26405);let m=class{constructor(){this._isVisible=!1,this._onVisibleChange=new o.Emitter,this.onVisibleChange=this._onVisibleChange.event,this.text=""}get isVisible(){return this._isVisible}set isVisible(p){this._isVisible=p,this._onVisibleChange.fire(p)}get client(){return this.controller.findClientFromWidgetId(this.terminalView.currentWidget.get().id)}open(){this.isVisible=!0}close(){var p;(p=this.client)===null||p===void 0||p.closeSearch(),this.isVisible=!1}clear(){var p;(p=this.client)===null||p===void 0||p.closeSearch(),this.text=""}search(){var p;(p=this.client)===null||p===void 0||p.findNext(this.text)}};t.TerminalSearchService=m,n.__decorate([(0,r.Autowired)(l.ITerminalController),n.__metadata("design:type",Object)],m.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(l.ITerminalGroupViewService),n.__metadata("design:type",Object)],m.prototype,"terminalView",void 0),n.__decorate([(0,o.debounce)(150),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],m.prototype,"search",null),t.TerminalSearchService=m=n.__decorate([(0,r.Injectable)()],m)},91815:(L,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodePtyTerminalService=void 0;const r=e(85608),o=e(76003),l=e(41869),m=e(43718),E=e(26405);let p=n=class extends m.Disposable{constructor(){super(...arguments),this._onError=this.registerDispose(new m.Emitter),this.onError=this._onError.event,this._onExit=this.registerDispose(new m.Emitter),this.onExit=this._onExit.event,this._onProcessChange=this.registerDispose(new m.Emitter),this.onProcessChange=this._onProcessChange.event,this._onDataDispatcher=this.registerDispose(new m.Dispatcher),this._onExitDispatcher=this.registerDispose(new m.Dispatcher),this._createCustomWebSocket=(s,g)=>({name:g.name,readonly:!1,onData:c=>this._onDataDispatcher.on(s)(c),onExit:c=>this._onExitDispatcher.on(s)(h=>{c(h.code)}),sendData:c=>{this.sendText(s,c)},ptyInstance:g})}generateSessionId(){return this.applicationService.clientId+E.TERMINAL_ID_SEPARATOR+(0,E.generateSessionId)()}async check(s){return await this.serviceClientRPC.ensureTerminal(s)}async attachByLaunchConfig(s,g,c,h,u){h.executable||(h.executable=await this.getDefaultSystemShell()),this.logger.log(`attach terminal ${s} with launchConfig `,h);const d=await this.serviceClientRPC.create2(s,g,c,h);if(d&&(d.pid||d.name))return this.logger.log(`${s} attach success, pid: ${d.pid}, name: ${d.name}`),this._createCustomWebSocket(s,d);this.logger.error(`${s} cannot create ptyInstance`,d)}_sendMessage(s,g,c){const h=c||n.countId++;this.serviceClientRPC.onMessage(s,JSON.stringify({id:h,...g}))}async sendText(s,g){this._sendMessage(s,{data:g})}async resize(s,g,c){this._sendMessage(s,{method:"resize",params:{cols:g,rows:c}})}async getCodePlatformKey(){return await this.serviceClientRPC.getCodePlatformKey()}disposeById(s){this.serviceClientRPC.disposeById(s)}async getProcessId(s){return this.serviceClientRPC.getProcessId(s)}onMessage(s,g){this._onDataDispatcher.dispatch(s,g)}closeClient(s,g,c){this.logger.log(`${s} was closed, error:`,g),(0,E.isTerminalError)(g)?this._onError.fire(g):typeof g=="number"?(this._onExitDispatcher.dispatch(s,{code:g,signal:c}),this._onExit.fire({sessionId:s,code:g,signal:c})):g&&(this._onExitDispatcher.dispatch(s,{code:g.code,signal:g.signal}),this._onExit.fire({sessionId:s,code:g.code,signal:g.signal}))}$processChange(s,g){this._onProcessChange.fire({sessionId:s,processName:g})}async getOS(){return this.backendOs?this.backendOs:this.backendOs=this.serviceClientRPC.getOS()}async getProfiles(s){const g=await this.getCodePlatformKey(),c=this.preferenceService.get(`terminal.integrated.profiles.${g}`,{});return await this.serviceClientRPC.detectAvailableProfiles({autoDetect:s,preference:c})}async getCwd(s){try{return await this.serviceClientRPC.getCwd(s)}catch{return}}async getDefaultSystemShell(){return await this.serviceClientRPC.getDefaultSystemShell(await this.getOS())}};t.NodePtyTerminalService=p,p.countId=1,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],p.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m.ILogger),r.__metadata("design:type",Object)],p.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(E.ITerminalServicePath),r.__metadata("design:type",Object)],p.prototype,"serviceClientRPC",void 0),r.__decorate([(0,o.Autowired)(l.PreferenceService),r.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(m.IApplicationService),r.__metadata("design:type",Object)],p.prototype,"applicationService",void 0),t.NodePtyTerminalService=p=n=r.__decorate([(0,o.Injectable)()],p)},29041:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalTheme=void 0;const n=e(85608),r=e(76003),o=e(9132),l=e(48611),m=n.__importStar(e(43395));let E=class extends o.Themable{get terminalTheme(){var _,s,g,c,h,u,d,v,f,a,b,y,S,A,T,w;const D=this.getColorSync(m.TERMINAL_BACKGROUND_COLOR),I=this.getColorSync(m.TERMINAL_FOREGROUND_COLOR),O=this.getColorSync(m.TERMINAL_SELECTION_BACKGROUND_COLOR),P=this.getColorSync(m.TERMINAL_CURSOR_FOREGROUND_COLOR)||I,R=this.getColorSync(m.TERMINAL_CURSOR_BACKGROUND_COLOR)||D,M=this.getColorSync(m.TERMINAL_SELECTION_BACKGROUND_COLOR),k=this.getColorSync(m.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR),B=this.getColorSync(m.TERMINAL_SELECTION_FOREGROUND_COLOR)||void 0,x=m.ansiColorIdentifiers;if(!(D&&I&&O&&P&&R))throw new Error("terminal color undefined");return{background:l.Color.Format.CSS.formatHexA(D),foreground:l.Color.Format.CSS.formatHexA(I),cursor:l.Color.Format.CSS.formatHexA(P),cursorAccent:l.Color.Format.CSS.formatHexA(R),selectionBackground:M?.toString(),selectionInactiveBackground:k?.toString(),selectionForeground:B?.toString(),black:(_=this.getColorSync(x[0]))===null||_===void 0?void 0:_.toString(),red:(s=this.getColorSync(x[1]))===null||s===void 0?void 0:s.toString(),green:(g=this.getColorSync(x[2]))===null||g===void 0?void 0:g.toString(),yellow:(c=this.getColorSync(x[3]))===null||c===void 0?void 0:c.toString(),blue:(h=this.getColorSync(x[4]))===null||h===void 0?void 0:h.toString(),magenta:(u=this.getColorSync(x[5]))===null||u===void 0?void 0:u.toString(),cyan:(d=this.getColorSync(x[6]))===null||d===void 0?void 0:d.toString(),white:(v=this.getColorSync(x[7]))===null||v===void 0?void 0:v.toString(),brightBlack:(f=this.getColorSync(x[8]))===null||f===void 0?void 0:f.toString(),brightRed:(a=this.getColorSync(x[9]))===null||a===void 0?void 0:a.toString(),brightGreen:(b=this.getColorSync(x[10]))===null||b===void 0?void 0:b.toString(),brightYellow:(y=this.getColorSync(x[11]))===null||y===void 0?void 0:y.toString(),brightBlue:(S=this.getColorSync(x[12]))===null||S===void 0?void 0:S.toString(),brightMagenta:(A=this.getColorSync(x[13]))===null||A===void 0?void 0:A.toString(),brightCyan:(T=this.getColorSync(x[14]))===null||T===void 0?void 0:T.toString(),brightWhite:(w=this.getColorSync(x[15]))===null||w===void 0?void 0:w.toString()}}};t.TerminalTheme=E,t.TerminalTheme=E=n.__decorate([(0,r.Injectable)()],E)},70845:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeAheadAddon=t.PredictionTimeline=t.PredictionStats=t.isTenativeCharacterPrediction=t.DEFAULT_LOCAL_ECHO_EXCLUDE=void 0,t.escapeRegExpCharacters=l;const n=e(85608),r=e(43718),o=e(4636);t.DEFAULT_LOCAL_ECHO_EXCLUDE=["vim","vi","nano","tmux"];function l(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}const m="\x1B",E=`${m}[`,p=`${E}?25h`,_=`${E}?25l`,s=`${E}X`,g=`${E}K`,c=/^\x1b\[[0-9;]*m/,h=/^\x1b\[?([0-9]*)(;[35])?O?([DC])/,u=/[^a-z0-9]/i,d=24,v=1e3*60*5,f=5,a=.3,b=.5,y=/^(\x1b\[(\??25[hl]|\??[0-9;]+n))+/,S=X=>X._core,A=X=>{},T=!1,w=(...X)=>{T&&console.log(X)};class D{get x(){return this._x}get y(){return this._y}get baseY(){return this._baseY}get coordinate(){return{x:this._x,y:this._y,baseY:this._baseY}}constructor(J,re,ce){this.rows=J,this.cols=re,this._buffer=ce,this._x=0,this._y=1,this._baseY=1,this._x=ce.cursorX,this._y=ce.cursorY,this._baseY=ce.baseY}getLine(){return this._buffer.getLine(this._y+this._baseY)}getCell(J){var re;return(re=this.getLine())===null||re===void 0?void 0:re.getCell(this._x,J)}moveTo(J){return this._x=J.x,this._y=J.y+J.baseY-this._baseY,this.moveInstruction()}clone(){const J=new D(this.rows,this.cols,this._buffer);return J.moveTo(this),J}move(J,re){return this._x=J,this._y=re,this.moveInstruction()}shift(J=0,re=0){return this._x+=J,this._y+=re,this.moveInstruction()}moveInstruction(){return this._y>=this.rows?(this._baseY+=this._y-(this.rows-1),this._y=this.rows-1):this._y<0&&(this._baseY-=this._y,this._y=0),`${E}${this._y+1};${this._x+1}H`}}const I=(X,J,re)=>{let ce=!1;re<0&&J.shift(-1);let fe;for(;J.x>=0;){if(fe=J.getCell(fe),!fe?.getCode())return;const Ae=fe.getChars();if(u.test(Ae)){if(ce)break}else ce=!0;J.shift(re)}re<0&&J.shift(1)};class O{get remaining(){return this._input.length-this.index}get eof(){return this.index===this._input.length}get rest(){return this._input.slice(this.index)}constructor(J){this._input=J,this.index=0}eatChar(J){if(this._input[this.index]===J)return this.index++,J}eatStr(J){if(this._input.slice(this.index,J.length)===J)return this.index+=J.length,J}eatGradually(J){const re=this.index;for(let ce=0;ce<J.length;ce++){if(ce>0&&this.eof)return 2;if(!this.eatChar(J[ce]))return this.index=re,1}return 0}eatRe(J){const re=J.exec(this._input.slice(this.index));if(re)return this.index+=re[0].length,re}eatCharCode(J=0,re=J+1){const ce=this._input.charCodeAt(this.index);if(!(ce<J||ce>=re))return this.index++,ce}}class P{constructor(){this.clearAfterTimeout=!1}apply(){return""}rollback(){return""}rollForwards(){return""}matches(){return 1}}class R{constructor(J){this.inner=J}apply(J,re){return this._appliedCursor=re.clone(),this.inner.apply(J,this._appliedCursor),""}rollback(J){return this.inner.rollback(J.clone()),""}rollForwards(J,re){return this._appliedCursor&&J.moveTo(this._appliedCursor),re}matches(J){return this.inner.matches(J)}}const M=X=>X instanceof R&&X.inner instanceof k;t.isTenativeCharacterPrediction=M;class k{constructor(J,re){this._style=J,this._char=re,this.affectsStyle=!0}apply(J,re){const ce=re.getCell();return this.appliedAt=ce?{pos:re.coordinate,oldAttributes:z(ce),oldChar:ce.getChars()}:{pos:re.coordinate,oldAttributes:"",oldChar:""},re.shift(1),this._style.apply+this._char+this._style.undo}rollback(J){if(!this.appliedAt)return"";const{oldAttributes:re,oldChar:ce,pos:fe}=this.appliedAt;return J.moveTo(fe)+(ce?`${re}${ce}${J.moveTo(fe)}`:s)}rollForwards(J,re){return this.appliedAt?J.clone().moveTo(this.appliedAt.pos)+re:""}matches(J,re){const ce=J.index;for(;J.eatRe(c););if(J.eof)return 2;if(J.eatChar(this._char))return 0;if(re instanceof k){const fe=J.eatGradually(`\b${re._char}${this._char}`);if(fe!==1)return fe}return J.index=ce,1}}class B{constructor(J){this._terminal=J}apply(J,re){var ce;const fe=!(!((ce=re.getLine())===null||ce===void 0)&&ce.translateToString(void 0,re.x).trim()),Ae=re.coordinate,te=re.shift(-1),Le=re.getCell();return this._appliedAt=Le?{isLastChar:fe,pos:Ae,oldAttributes:z(Le),oldChar:Le.getChars()}:{isLastChar:fe,pos:Ae,oldAttributes:"",oldChar:""},te+s}rollback(J){if(!this._appliedAt)return"";const{oldAttributes:re,oldChar:ce,pos:fe}=this._appliedAt;return ce?re+ce+J.moveTo(fe)+z(S(this._terminal)._inputHandler._curAttrData):J.moveTo(fe)+s}rollForwards(){return""}matches(J){var re;if(!((re=this._appliedAt)===null||re===void 0)&&re.isLastChar){const ce=J.eatGradually(`\b${E}K`);if(ce!==1)return ce;const fe=J.eatGradually("\b \b");if(fe!==1)return fe}return 1}}class x{apply(J,re){return this._prevPosition=re.coordinate,re.move(0,re.y+1),`\r
28819
28839
  `}rollback(J){return this._prevPosition?J.moveTo(this._prevPosition):""}rollForwards(){return""}matches(J){return J.eatGradually(`\r
28820
28840
  `)}}class N extends x{apply(J,re){return this._prevPosition=re.coordinate,re.move(0,re.y+1)," \r"}matches(J){const re=J.eatGradually(" \r");return re!==1?J.eatGradually(g)===2?2:re:J.eatGradually(`\r
28821
28841
  `)}}class j{constructor(J,re,ce){this._direction=J,this._moveByWords=re,this._amount=ce}apply(J,re){const ce=re.x,fe=re.getCell(),Ae=fe?z(fe):"",{_amount:te,_direction:Le,_moveByWords:Te}=this,oe=Le==="D"?-1:1,le=re.clone();if(Te)for(let Ee=0;Ee<te;Ee++)I(J,le,oe);else le.shift(oe*te);return this._applied={amount:Math.abs(re.x-le.x),prevPosition:ce,prevAttrs:Ae,rollForward:re.moveTo(le)},this._applied.rollForward}rollback(J){return this._applied?J.move(this._applied.prevPosition,J.y)+this._applied.prevAttrs:""}rollForwards(){return""}matches(J){if(!this._applied)return 1;const re=this._direction,{amount:ce,rollForward:fe}=this._applied;if(J.eatStr(`${E}${re}`.repeat(ce))||re==="D"&&J.eatStr("\b".repeat(ce)))return 0;if(fe){const Ae=J.eatGradually(fe);if(Ae!==1)return Ae}return J.eatGradually(`${E}${ce}${re}`)}}class K extends r.Disposable{get accuracy(){let J=0;for(const[,re]of this._stats)re&&J++;return J/(this._stats.length||1)}get sampleSize(){return this._stats.length}get latency(){const J=this._stats.filter(([,re])=>re).map(([re])=>re).sort();return{count:J.length,min:J[0],median:J[Math.floor(J.length/2)],max:J[J.length-1]}}get maxLatency(){let J=-1/0;for(const[re,ce]of this._stats)ce&&(J=Math.max(re,J));return J}constructor(J){super(),this._stats=[],this._index=0,this._addedAtTime=new WeakMap,this._changeEmitter=new r.Emitter,this.onChange=this._changeEmitter.event,this.addDispose(J.onPredictionAdded(re=>this._addedAtTime.set(re,Date.now()))),this.addDispose(J.onPredictionSucceeded(this._pushStat.bind(this,!0))),this.addDispose(J.onPredictionFailed(this._pushStat.bind(this,!1)))}_pushStat(J,re){const ce=this._addedAtTime.get(re);this._stats[this._index]=[Date.now()-ce,J],this._index=(this._index+1)%d,this._changeEmitter.fire()}}t.PredictionStats=K;class U{get _currentGenerationPredictions(){return this._expected.filter(({gen:J})=>J===this._expected[0].gen).map(({p:J})=>J)}get isShowingPredictions(){return this._showPredictions}get length(){return this._expected.length}constructor(J,re){this.terminal=J,this._style=re,this._expected=[],this._currentGen=0,this._showPredictions=!1,this._addedEmitter=new r.Emitter,this.onPredictionAdded=this._addedEmitter.event,this._failedEmitter=new r.Emitter,this.onPredictionFailed=this._failedEmitter.event,this._succeededEmitter=new r.Emitter,this.onPredictionSucceeded=this._succeededEmitter.event}setShowPredictions(J){if(J===this._showPredictions)return;w("set predictions:",J),this._showPredictions=J;const re=this._getActiveBuffer();if(!re)return;const ce=this._currentGenerationPredictions;J?(this.clearCursor(),this._style.expectIncomingStyle(ce.reduce((fe,Ae)=>Ae.affectsStyle?fe+1:fe,0)),this.terminal.write(ce.map(fe=>fe.apply(re,this.physicalCursor(re))).join(""))):this.terminal.write(ce.reverse().map(fe=>fe.rollback(this.physicalCursor(re))).join(""))}undoAllPredictions(){const J=this._getActiveBuffer();this._showPredictions&&J&&this.terminal.write(this._currentGenerationPredictions.reverse().map(re=>re.rollback(this.physicalCursor(J))).join("")),this._expected=[]}beforeServerInput(J){var re;const ce=J;if(this._inputBuffer&&(J=this._inputBuffer+J,this._inputBuffer=void 0),!this._expected.length)return this._clearPredictionState(),J;const fe=this._getActiveBuffer();if(!fe)return this._clearPredictionState(),J;let Ae="";const te=new O(J),Le=this._expected[0].gen,Te=()=>{const oe=te.eatRe(y);oe&&(Ae+=oe[0])};e:for(;this._expected.length&&te.remaining>0;){Te();const{p:oe,gen:le}=this._expected[0],Ee=this.physicalCursor(fe),we=te.index;switch(oe.matches(te,this._lookBehind)){case 0:{const ve=J.slice(we,te.index);le===Le?Ae+=(re=oe.rollForwards)===null||re===void 0?void 0:re.call(oe,Ee,ve):(oe.apply(fe,this.physicalCursor(fe)),Ae+=ve),this._succeededEmitter.fire(oe),this._lookBehind=oe,this._expected.shift();break}case 2:this._inputBuffer=J.slice(we),te.index=J.length;break e;case 1:{const ve=this._expected.filter(be=>be.gen===Le).reverse();Ae+=ve.map(({p:be})=>be.rollback(this.physicalCursor(fe))).join(""),ve.some(be=>be.p.affectsStyle)&&(Ae+=z(S(this.terminal)._inputHandler._curAttrData)),this._clearPredictionState(),this._failedEmitter.fire(oe);break e}}}if(Te(),te.eof||(Ae+=te.rest,this._clearPredictionState()),this._expected.length&&Le!==this._expected[0].gen)for(const{p:oe,gen:le}of this._expected){if(le!==this._expected[0].gen)break;oe.affectsStyle&&this._style.expectIncomingStyle(),Ae+=oe.apply(fe,this.physicalCursor(fe))}return this._showPredictions?(Ae.length===0||Ae===J||(this._physicalCursor&&(Ae+=this._physicalCursor.moveInstruction()),Ae=_+Ae+p),Ae):ce}_clearPredictionState(){this._expected=[],this.clearCursor(),this._lookBehind=void 0}addPrediction(J,re){if(w("prediction type: \x1B[36m%s\x1B[0m",re.constructor.name),this._expected.push({gen:this._currentGen,p:re}),this._addedEmitter.fire(re),this._currentGen!==this._expected[0].gen)return re.apply(J,this.tentativeCursor(J)),!1;const ce=re.apply(J,this.physicalCursor(J));return this._tenativeCursor=void 0,this._showPredictions&&ce&&(re.affectsStyle&&this._style.expectIncomingStyle(),w("predict:",JSON.stringify(ce)),w("prediction type: \x1B[36m%s\x1B[0m",re.constructor.name),this.terminal.write(ce)),!0}addBoundary(J,re){let ce=!1;return J&&re&&(ce=this.addPrediction(J,new R(re)),re.apply(J,this.tentativeCursor(J))),this._currentGen++,ce}peekEnd(){var J;return(J=this._expected[this._expected.length-1])===null||J===void 0?void 0:J.p}peekStart(){var J;return(J=this._expected[0])===null||J===void 0?void 0:J.p}physicalCursor(J){return this._physicalCursor||(this._showPredictions&&A(this.terminal),this._physicalCursor=new D(this.terminal.rows,this.terminal.cols,J)),this._physicalCursor}tentativeCursor(J){return this._tenativeCursor||(this._tenativeCursor=this.physicalCursor(J).clone()),this._tenativeCursor}clearCursor(){this._physicalCursor=void 0,this._tenativeCursor=void 0}_getActiveBuffer(){const J=this.terminal.buffer.active;return J.type==="normal"?J:void 0}}t.PredictionTimeline=U;const Y=X=>{if(X.isAttributeDefault())return[0];const J=[];return X.isBold()&&J.push(1),X.isDim()&&J.push(2),X.isItalic()&&J.push(3),X.isUnderline()&&J.push(4),X.isBlink()&&J.push(5),X.isInverse()&&J.push(7),X.isInvisible()&&J.push(8),X.isFgRGB()&&J.push(38,2,X.getFgColor()>>>24,X.getFgColor()>>>16&255,X.getFgColor()&255),X.isFgPalette()&&J.push(38,5,X.getFgColor()),X.isFgDefault()&&J.push(39),X.isBgRGB()&&J.push(48,2,X.getBgColor()>>>24,X.getBgColor()>>>16&255,X.getBgColor()&255),X.isBgPalette()&&J.push(48,5,X.getBgColor()),X.isBgDefault()&&J.push(49),J},z=X=>`${E}${Y(X).join(";")}m`,G=(X,J,re)=>{if(X.length-J>re.length)return!1;for(let ce=0;ce<re.length;ce++,J++)if(re[J]!==X[J])return!1;return!0},Q=(X,J)=>{const re=[0,0,-1,0,0,0];let ce=0,fe=0;do{const Ae=X[J+fe];if(re[fe+ce]=typeof Ae=="number"?Ae:Ae[0],typeof Ae!="number"){let te=0;do re[1]===5&&(ce=1),re[fe+te+1+ce]=Ae[te];while(++te<Ae.length&&te+fe+1+ce<re.length);break}if(re[1]===5&&fe+ce>=2||re[1]===2&&fe+ce>=5)break;re[1]&&(ce=1)}while(++fe+J<X.length&&fe+ce<re.length);return fe};class Z{static _compileArgs(J){return`${E}${J.join(";")}m`}constructor(J,re){this._terminal=re,this._expectedIncomingStyles=0,this.onUpdate(J)}expectIncomingStyle(J=1){this._expectedIncomingStyles+=J*2}startTracking(){this._expectedIncomingStyles=0,this._onDidWriteSGR(Y(S(this._terminal)._inputHandler._curAttrData)),this._csiHandler=this._terminal.parser.registerCsiHandler({final:"m"},J=>(this._onDidWriteSGR(J),!1))}debounceStopTracking(){this._stopTracking()}dispose(){this._stopTracking()}_stopTracking(){var J;(J=this._csiHandler)===null||J===void 0||J.dispose(),this._csiHandler=void 0}_onDidWriteSGR(J){const re=this._undoArgs;for(let ce=0;ce<J.length;){const fe=J[ce],Ae=typeof fe=="number"?fe:fe[0];if(this._expectedIncomingStyles){if(G(J,ce,this._undoArgs)){this._expectedIncomingStyles--,ce+=this._undoArgs.length;continue}if(G(J,ce,this._applyArgs)){this._expectedIncomingStyles--,ce+=this._applyArgs.length;continue}}const te=Ae===38||Ae===48||Ae===58?Q(J,ce):1;switch(this._applyArgs[0]){case 1:Ae===2?this._undoArgs=[22,2]:(Ae===22||Ae===0)&&(this._undoArgs=[22]);break;case 2:Ae===1?this._undoArgs=[22,1]:(Ae===22||Ae===0)&&(this._undoArgs=[22]);break;case 38:Ae===0||Ae===39||Ae===100?this._undoArgs=[39]:(Ae>=30&&Ae<=38||Ae>=90&&Ae<=97)&&(this._undoArgs=J.slice(ce,ce+te));break;default:Ae===this._applyArgs[0]?this._undoArgs=this._applyArgs:Ae===0&&(this._undoArgs=this._originalUndoArgs)}ce+=te}re!==this._undoArgs&&(this.undo=Z._compileArgs(this._undoArgs))}onUpdate(J){const{applyArgs:re,undoArgs:ce}=this._getArgs(J);this._applyArgs=re,this._undoArgs=this._originalUndoArgs=ce,this.apply=Z._compileArgs(this._applyArgs),this.undo=Z._compileArgs(this._undoArgs)}_getArgs(J){switch(J){case"bold":return{applyArgs:[1],undoArgs:[22]};case"dim":return{applyArgs:[2],undoArgs:[22]};case"italic":return{applyArgs:[3],undoArgs:[23]};case"underlined":return{applyArgs:[4],undoArgs:[24]};case"inverted":return{applyArgs:[7],undoArgs:[27]};default:{let re;try{re=o.Color.fromHex(J)}catch{re=new o.Color(new o.RGBA(255,0,0,1))}const{r:ce,g:fe,b:Ae}=re.rgba;return{applyArgs:[38,2,ce,fe,Ae],undoArgs:[39]}}}}}n.__decorate([(0,r.debounce)(2e3),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],Z.prototype,"debounceStopTracking",null);const $=(X=t.DEFAULT_LOCAL_ECHO_EXCLUDE)=>new RegExp(`\\b(${X.map(l).join("|")})\\b`,"i");class H extends r.Disposable{constructor(J,re,ce){super(),this.onBeforeProcessData=J,this._config=re,this.onDidTerminalPreferenceChange=ce,this._terminalTitle="",this.disposableCollection=new r.DisposableCollection,this._excludeProgramRe=$(this._config.localEchoExcludePrograms),this.addDispose(this.onDidTerminalPreferenceChange(fe=>{var Ae;switch(fe.preferenceName){case"terminal.integrated.localEchoLatencyThreshold":{fe.newValue&&fe.newValue!==this._config.localEchoLatencyThreshold&&(this._config.localEchoLatencyThreshold=fe.newValue);break}case"terminal.integrated.localEchoExcludePrograms":{fe.newValue&&fe.newValue!==this._config.localEchoExcludePrograms&&(this._config.localEchoExcludePrograms=fe.newValue,this._excludeProgramRe=$(this._config.localEchoExcludePrograms));break}case"terminal.integrated.localEchoStyle":{fe.newValue!==this._config.localEchoStyle&&(this._config.localEchoStyle=fe.newValue,(Ae=this._typeAheadStyle)===null||Ae===void 0||Ae.onUpdate(this._config.localEchoStyle));break}default:break}}))}_register(J){if(J===this)throw new Error("Cannot register a disposable on itself!");return this.disposableCollection.push(J),J}activate(J){w("#DEBUG1# activate terminal type ahead addon");const re=this._typeAheadStyle=this._register(new Z(this._config.localEchoStyle,J)),ce=this._timeline=new U(J,this._typeAheadStyle),fe=this.stats=new K(this._timeline);ce.setShowPredictions(this._config.localEchoLatencyThreshold===0),this._register(J.onData(te=>this._onUserData(te))),this._register(J.onTitleChange(te=>{this._terminalTitle=te,this._reevaluatePredictorState(fe,ce)})),this._register(J.onResize(()=>{ce.setShowPredictions(!1),ce.clearCursor(),this._reevaluatePredictorState(fe,ce)})),this._register(this._timeline.onPredictionSucceeded(te=>{var Le;((Le=this._lastRow)===null||Le===void 0?void 0:Le.charState)===1&&(0,t.isTenativeCharacterPrediction)(te)&&te.inner.appliedAt&&te.inner.appliedAt.pos.y+te.inner.appliedAt.pos.baseY===this._lastRow.y&&(this._lastRow.charState=2)})),this.onBeforeProcessData(te=>this._onBeforeProcessData(te));let Ae;this._register(fe.onChange(()=>{Ae||(Ae=setTimeout(()=>{this._sendLatencyStats(fe),Ae=void 0},v)),ce.length===0&&re.debounceStopTracking(),this._reevaluatePredictorState(fe,ce)}))}reset(){this._lastRow=void 0}_deferClearingPredictions(){var J,re;if(!(!this.stats||!this._timeline)){if((J=this._clearPredictionDebounce)===null||J===void 0||J.dispose(),this._timeline.length===0||((re=this._timeline.peekStart())===null||re===void 0?void 0:re.clearAfterTimeout)===!1){this._clearPredictionDebounce=void 0;return}this._clearPredictionDebounce=(0,r.disposableTimeout)(()=>{var ce,fe;(ce=this._timeline)===null||ce===void 0||ce.undoAllPredictions(),((fe=this._lastRow)===null||fe===void 0?void 0:fe.charState)===1&&(this._lastRow.charState=0)},Math.max(500,this.stats.maxLatency*3/2))}}_reevaluatePredictorState(J,re){this._reevaluatePredictorStateNow(J,re)}_reevaluatePredictorStateNow(J,re){if(this._excludeProgramRe.test(this._terminalTitle))re.setShowPredictions(!1);else if(this._config.localEchoLatencyThreshold<0)re.setShowPredictions(!1);else if(this._config.localEchoLatencyThreshold===0)re.setShowPredictions(!0);else if(J.sampleSize>f&&J.accuracy>a){const ce=J.latency.median;ce>=this._config.localEchoLatencyThreshold?re.setShowPredictions(!0):ce<this._config.localEchoLatencyThreshold/b&&re.setShowPredictions(!1)}}_sendLatencyStats(J){console.log("terminalLatencyStats",{...J.latency,predictionAccuracy:J.accuracy})}_onUserData(J){var re,ce,fe,Ae;if(((re=this._timeline)===null||re===void 0?void 0:re.terminal.buffer.active.type)!=="normal")return;w("user data:",JSON.stringify({data:J}));const te=this._timeline.terminal,Le=te.buffer.active;if(Le.cursorX===1&&Le.cursorY===te.rows-1&&((fe=(ce=Le.getLine(Le.cursorY+Le.baseY))===null||ce===void 0?void 0:ce.getCell(0))===null||fe===void 0?void 0:fe.getChars())===":")return;const Te=Le.baseY+Le.cursorY;Te!==((Ae=this._lastRow)===null||Ae===void 0?void 0:Ae.y)?this._lastRow={y:Te,startingX:Le.cursorX,endingX:Le.cursorX,charState:0}:(this._lastRow.startingX=Math.min(this._lastRow.startingX,Le.cursorX),this._lastRow.endingX=Math.max(this._lastRow.endingX,this._timeline.physicalCursor(Le).x));const oe=we=>this._timeline.tentativeCursor(Le).x<=this._lastRow.startingX?this._timeline.addBoundary(Le,we):this._timeline.addPrediction(Le,we),le=we=>this._timeline.tentativeCursor(Le).x>=this._lastRow.endingX-1?this._timeline.addBoundary(Le,we):this._timeline.addPrediction(Le,we),Ee=new O(J);for(;Ee.remaining>0;){if(Ee.eatCharCode(127)){const ve=this._timeline.peekEnd();ve&&ve instanceof k&&this._timeline.addBoundary(),this._timeline.isShowingPredictions&&A(this._timeline.terminal),this._timeline.tentativeCursor(Le).x<=this._lastRow.startingX?this._timeline.addBoundary(Le,new B(this._timeline.terminal)):(this._lastRow.endingX--,this._timeline.addPrediction(Le,new B(this._timeline.terminal)));continue}if(Ee.eatCharCode(32,126)){const ve=J[Ee.index-1],be=new k(this._typeAheadStyle,ve);this._lastRow.charState===0?(this._timeline.addBoundary(Le,be),this._lastRow.charState=1):this._timeline.addPrediction(Le,be),this._timeline.tentativeCursor(Le).x>=te.cols&&this._timeline.addBoundary(Le,new N);continue}const we=Ee.eatRe(h);if(we){const ve=we[3],be=new j(ve,!!we[2],Number(we[1])||1);ve==="D"?oe(be):le(be);continue}if(Ee.eatStr(`${m}f`)){le(new j("C",!0,1));continue}if(Ee.eatStr(`${m}b`)){oe(new j("D",!0,1));continue}if(Ee.eatChar("\r")&&Le.cursorY<te.rows-1){this._timeline.addPrediction(Le,new x);continue}this._timeline.addBoundary(Le,new P);break}this._timeline.length===1&&(this._deferClearingPredictions(),this._typeAheadStyle.startTracking())}_onBeforeProcessData(J){this._timeline&&(w("incoming data:",JSON.stringify(J.data)),J.data=this._timeline.beforeServerInput(J.data),w("emitted data:",JSON.stringify(J.data)),this._deferClearingPredictions())}}t.TypeAheadAddon=H,n.__decorate([(0,r.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[K,U]),n.__metadata("design:returntype",void 0)],H.prototype,"_reevaluatePredictorState",null)},4636:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Color=t.HSVA=t.HSLA=t.RGBA=void 0;function e(m,E){const p=Math.pow(10,E);return Math.round(m*p)/p}class n{constructor(E,p,_,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,E))|0,this.g=Math.min(255,Math.max(0,p))|0,this.b=Math.min(255,Math.max(0,_))|0,this.a=e(Math.max(Math.min(1,s),0),3)}static equals(E,p){return E.r===p.r&&E.g===p.g&&E.b===p.b&&E.a===p.a}}t.RGBA=n;class r{constructor(E,p,_,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,E),0)|0,this.s=e(Math.max(Math.min(1,p),0),3),this.l=e(Math.max(Math.min(1,_),0),3),this.a=e(Math.max(Math.min(1,s),0),3)}static equals(E,p){return E.h===p.h&&E.s===p.s&&E.l===p.l&&E.a===p.a}static fromRGBA(E){const p=E.r/255,_=E.g/255,s=E.b/255,g=E.a,c=Math.max(p,_,s),h=Math.min(p,_,s);let u=0,d=0;const v=(h+c)/2,f=c-h;if(f>0){switch(d=Math.min(v<=.5?f/(2*v):f/(2-2*v),1),c){case p:u=(_-s)/f+(_<s?6:0);break;case _:u=(s-p)/f+2;break;case s:u=(p-_)/f+4;break}u*=60,u=Math.round(u)}return new r(u,d,v,g)}static _hue2rgb(E,p,_){return _<0&&(_+=1),_>1&&(_-=1),_<.16666666666666666?E+(p-E)*6*_:_<.5?p:_<.6666666666666666?E+(p-E)*(.6666666666666666-_)*6:E}static toRGBA(E){const p=E.h/360,{s:_,l:s,a:g}=E;let c,h,u;if(_===0)c=h=u=s;else{const d=s<.5?s*(1+_):s+_-s*_,v=2*s-d;c=r._hue2rgb(v,d,p+.3333333333333333),h=r._hue2rgb(v,d,p),u=r._hue2rgb(v,d,p-.3333333333333333)}return new n(Math.round(c*255),Math.round(h*255),Math.round(u*255),g)}}t.HSLA=r;class o{constructor(E,p,_,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,E),0)|0,this.s=e(Math.max(Math.min(1,p),0),3),this.v=e(Math.max(Math.min(1,_),0),3),this.a=e(Math.max(Math.min(1,s),0),3)}static equals(E,p){return E.h===p.h&&E.s===p.s&&E.v===p.v&&E.a===p.a}static fromRGBA(E){const p=E.r/255,_=E.g/255,s=E.b/255,g=Math.max(p,_,s),c=Math.min(p,_,s),h=g-c,u=g===0?0:h/g;let d;return h===0?d=0:g===p?d=((_-s)/h%6+6)%6:g===_?d=(s-p)/h+2:d=(p-_)/h+4,new o(Math.round(d*60),u,g,E.a)}static toRGBA(E){const{h:p,s:_,v:s,a:g}=E,c=s*_,h=c*(1-Math.abs(p/60%2-1)),u=s-c;let[d,v,f]=[0,0,0];return p<60?(d=c,v=h):p<120?(d=h,v=c):p<180?(v=c,f=h):p<240?(v=h,f=c):p<300?(d=h,f=c):p<=360&&(d=c,f=h),d=Math.round((d+u)*255),v=Math.round((v+u)*255),f=Math.round((f+u)*255),new n(d,v,f,g)}}t.HSVA=o;class l{static fromHex(E){return l.Format.CSS.parseHex(E)||l.red}get hsla(){return this._hsla?this._hsla:r.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:o.fromRGBA(this.rgba)}constructor(E){if(E)if(E instanceof n)this.rgba=E;else if(E instanceof r)this._hsla=E,this.rgba=r.toRGBA(E);else if(E instanceof o)this._hsva=E,this.rgba=o.toRGBA(E);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(E){return!!E&&n.equals(this.rgba,E.rgba)&&r.equals(this.hsla,E.hsla)&&o.equals(this.hsva,E.hsva)}getRelativeLuminance(){const E=l._relativeLuminanceForComponent(this.rgba.r),p=l._relativeLuminanceForComponent(this.rgba.g),_=l._relativeLuminanceForComponent(this.rgba.b),s=.2126*E+.7152*p+.0722*_;return e(s,4)}static _relativeLuminanceForComponent(E){const p=E/255;return p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4)}getContrastRatio(E){const p=this.getRelativeLuminance(),_=E.getRelativeLuminance();return p>_?(p+.05)/(_+.05):(_+.05)/(p+.05)}isDarker(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3<128}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(E){const p=this.getRelativeLuminance(),_=E.getRelativeLuminance();return p>_}isDarkerThan(E){const p=this.getRelativeLuminance(),_=E.getRelativeLuminance();return p<_}lighten(E){return new l(new r(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*E,this.hsla.a))}darken(E){return new l(new r(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*E,this.hsla.a))}transparent(E){const{r:p,g:_,b:s,a:g}=this.rgba;return new l(new n(p,_,s,g*E))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new l(new n(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(E){const p=E.rgba,_=this.rgba.a,s=p.a,g=_+s*(1-_);if(g<1e-6)return l.transparent;const c=this.rgba.r*_/g+p.r*s*(1-_)/g,h=this.rgba.g*_/g+p.g*s*(1-_)/g,u=this.rgba.b*_/g+p.b*s*(1-_)/g;return new l(new n(c,h,u,g))}makeOpaque(E){if(this.isOpaque()||E.rgba.a!==1)return this;const{r:p,g:_,b:s,a:g}=this.rgba;return new l(new n(E.rgba.r-g*(E.rgba.r-p),E.rgba.g-g*(E.rgba.g-_),E.rgba.b-g*(E.rgba.b-s),1))}flatten(...E){const p=E.reduceRight((_,s)=>l._flatten(s,_));return l._flatten(this,p)}static _flatten(E,p){const _=1-E.rgba.a;return new l(new n(_*p.rgba.r+E.rgba.a*E.rgba.r,_*p.rgba.g+E.rgba.a*E.rgba.g,_*p.rgba.b+E.rgba.a*E.rgba.b))}toString(){return this._toString||(this._toString=l.Format.CSS.format(this)),this._toString}static getLighterColor(E,p,_){if(E.isLighterThan(p))return E;_=_||.5;const s=E.getRelativeLuminance(),g=p.getRelativeLuminance();return _=_*(g-s)/g,E.lighten(_)}static getDarkerColor(E,p,_){if(E.isDarkerThan(p))return E;_=_||.5;const s=E.getRelativeLuminance(),g=p.getRelativeLuminance();return _=_*(s-g)/s,E.darken(_)}}t.Color=l,l.white=new l(new n(255,255,255,1)),l.black=new l(new n(0,0,0,1)),l.red=new l(new n(255,0,0,1)),l.blue=new l(new n(0,0,255,1)),l.green=new l(new n(0,255,0,1)),l.cyan=new l(new n(0,255,255,1)),l.lightgrey=new l(new n(211,211,211,1)),l.transparent=new l(new n(0,0,0,0)),function(m){let E;(function(p){let _;(function(s){function g(S){return S.rgba.a===1?`rgb(${S.rgba.r}, ${S.rgba.g}, ${S.rgba.b})`:m.Format.CSS.formatRGBA(S)}s.formatRGB=g;function c(S){return`rgba(${S.rgba.r}, ${S.rgba.g}, ${S.rgba.b}, ${+S.rgba.a.toFixed(2)})`}s.formatRGBA=c;function h(S){return S.hsla.a===1?`hsl(${S.hsla.h}, ${(S.hsla.s*100).toFixed(2)}%, ${(S.hsla.l*100).toFixed(2)}%)`:m.Format.CSS.formatHSLA(S)}s.formatHSL=h;function u(S){return`hsla(${S.hsla.h}, ${(S.hsla.s*100).toFixed(2)}%, ${(S.hsla.l*100).toFixed(2)}%, ${S.hsla.a.toFixed(2)})`}s.formatHSLA=u;function d(S){const A=S.toString(16);return A.length!==2?"0"+A:A}function v(S){return`#${d(S.rgba.r)}${d(S.rgba.g)}${d(S.rgba.b)}`}s.formatHex=v;function f(S,A=!1){return A&&S.rgba.a===1?m.Format.CSS.formatHex(S):`#${d(S.rgba.r)}${d(S.rgba.g)}${d(S.rgba.b)}${d(Math.round(S.rgba.a*255))}`}s.formatHexA=f;function a(S){return S.isOpaque()?m.Format.CSS.formatHex(S):m.Format.CSS.formatRGBA(S)}s.format=a;function b(S){const A=S.length;if(A===0||S.charCodeAt(0)!==35)return null;if(A===7){const T=16*y(S.charCodeAt(1))+y(S.charCodeAt(2)),w=16*y(S.charCodeAt(3))+y(S.charCodeAt(4)),D=16*y(S.charCodeAt(5))+y(S.charCodeAt(6));return new m(new n(T,w,D,1))}if(A===9){const T=16*y(S.charCodeAt(1))+y(S.charCodeAt(2)),w=16*y(S.charCodeAt(3))+y(S.charCodeAt(4)),D=16*y(S.charCodeAt(5))+y(S.charCodeAt(6)),I=16*y(S.charCodeAt(7))+y(S.charCodeAt(8));return new m(new n(T,w,D,I/255))}if(A===4){const T=y(S.charCodeAt(1)),w=y(S.charCodeAt(2)),D=y(S.charCodeAt(3));return new m(new n(16*T+T,16*w+w,16*D+D))}if(A===5){const T=y(S.charCodeAt(1)),w=y(S.charCodeAt(2)),D=y(S.charCodeAt(3)),I=y(S.charCodeAt(4));return new m(new n(16*T+T,16*w+w,16*D+D,(16*I+I)/255))}return null}s.parseHex=b;function y(S){switch(S){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(_=p.CSS||(p.CSS={}))})(E=m.Format||(m.Format={}))}(l||(t.Color=l={}))},68611:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalGroupViewService=t.WidgetGroup=t.Widget=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(28423),m=e(26405);class E extends o.Disposable{constructor(g,c=!1,h=!1){super(),this.id=g,this.reuse=c,this.recovery=h,this.dynamic=(0,l.observableValue)(this,0),this.shadowDynamic=(0,l.observableValue)(this,0),this.name=(0,l.observableValue)(this,""),this.processName=(0,l.observableValue)(this,""),this._onRender=new o.Emitter,this._onResize=new o.Emitter,this._onShow=new o.Emitter,this._onError=new o.Emitter,this.onRender=this._onRender.event,this.onResize=this._onResize.event,this.onShow=this._onShow.event,this.onError=this._onError.event}get group(){return this._group}set group(g){this._group=g,g.addWidget(this)}get element(){return this._element}set element(g){this._element||(this._element=g,this._onRender.fire())}get show(){return this._show}set show(g){this._show=g,this._onShow.fire(g)}get error(){return this._error}set error(g){this._error=g,this._onError.fire(g)}resize(g){(0,l.transaction)(c=>{const h=g||this.shadowDynamic.get();this.dynamic.set(h,c),this.shadowDynamic.set(h,c)}),this._onResize.fire()}increase(g){(0,l.transaction)(c=>{const h=this.shadowDynamic.get();this.shadowDynamic.set(h+g,c)}),this._onResize.fire()}rename(g){(0,l.transaction)(c=>{this.name.set(g,c)})}}t.Widget=E;class p extends o.Disposable{constructor(g,c){super(),this.widgets=(0,l.observableValue)(this,[]),this.editable=(0,l.observableValue)(this,!1),this.activated=(0,l.observableValue)(this,!1),this.name=(0,l.observableValue)(this,""),this.currentId=(0,l.observableValue)(this,""),this.widgetsMap=new Map,this.current=(0,l.derived)(this,h=>{const u=this.currentId.read(h);return this.widgetsMap.get(u)}),this.snapshot=(0,l.derived)(this,h=>{const u=this.current.read(h);return this.name.read(h)||u?.name.read(h)||u?.processName.read(h)||""}),this._id=g||(0,m.userActionViewUuid)(),this._options=c||{},this._activated=!1}get id(){return this._id}get options(){return this._options}get length(){return this.widgets.get().length}get first(){return this.widgets.get()[0]}get last(){return this.widgets.get()[this.length-1]}addWidget(g){(0,l.transaction)(c=>{const h=this.widgets.get();this.widgets.set([...h,g],c)}),this.widgetsMap.set(g.id,g),this.currentId.get()||(0,l.transaction)(c=>{this.currentId.set(g.id,c)}),this._averageLayout()}findWidget(g){return this.widgets.get().findIndex(c=>c.id===g.id)}selectWidget(g){(0,l.transaction)(c=>{this.currentId.set(g.id,c)})}removeWidgetByIndex(g){const c=this.widgets.get(),h=c.splice(g,1);return this.widgetsMap.delete(h[0].id),(0,l.transaction)(u=>{this.widgets.set(c.filter(d=>d!==h[0]),u)}),this._averageLayout(),this.last&&this.selectWidget(this.last),h[0]}edit(){(0,l.transaction)(g=>{this.editable.set(!0,g)})}unedit(){(0,l.transaction)(g=>{this.editable.set(!1,g)})}rename(g){(0,l.transaction)(c=>{this.name.set(g,c),this.editable.set(!1,c)})}_isLast(g){return g.id===this.widgets.get()[this.widgets.get().length-1].id}_averageLayout(){const g=Math.round(p.whole/this.widgets.get().length*p.float)/p.float;this.widgets.get().forEach(c=>{this._isLast(c)?c.resize(p.whole-g*(this.widgets.get().length-1)):c.resize(g)})}}t.WidgetGroup=p,p.whole=100,p.float=1e3;let _=class{constructor(){this._widgets=new Map,this.groups=(0,l.observableValue)(this,[]),this.currentGroupIndex=(0,l.observableValue)(this,-1),this.currentGroupId=(0,l.observableValue)(this,""),this._onWidgetCreated=new o.Emitter,this._onWidgetSelected=new o.Emitter,this._onWidgetDisposed=new o.Emitter,this._onWidgetEmpty=new o.Emitter,this.currentGroup=(0,l.derived)(this,g=>{const c=this.groups.read(g),h=this.currentGroupIndex.read(g);return c[h]}),this.currentWidget=(0,l.derived)(this,g=>{const c=this.currentGroup.read(g);return c&&this.getWidget(c.currentId.read(g))}),this.currentWidgetId=(0,l.derived)(this,g=>{const c=this.currentGroup.read(g);return c&&c.currentId.read(g)}),this.onWidgetCreated=this._onWidgetCreated.event,this.onWidgetSelected=this._onWidgetSelected.event,this.onWidgetDisposed=this._onWidgetDisposed.event,this.onWidgetEmpty=this._onWidgetEmpty.event}getGroup(g){if(g>this.groups.get().length-1)throw new Error("out of groups length");return this.groups.get()[g]}swapGroup(g,c){const h=this.groups.get();if(g===-1||c===-1)return;const u=[...h],d=u[g];u[g]=u[c],u[c]=d,(0,l.transaction)(v=>{this.groups.set(u,v)})}_doSelectGroup(g){const c=this.getGroup(g);(0,l.transaction)(u=>{this.currentGroupIndex.set(g,u),this.currentGroupId.set(c.id,u),c.activated.set(!0,u)}),!c.current&&c.first&&c.selectWidget(c.first);const h=c.current.get();h&&(this._onWidgetSelected.fire(h),this.resize())}selectGroup(g){this._doSelectGroup(g)}_doCreateGroup(g,c){const h=new p(g,c);return(0,l.transaction)(u=>{const d=this.groups.get();this.groups.set([...d,h],u)}),this.groups.get().length-1}createGroup(g){const c=this._doCreateGroup(void 0,g);return this.getGroup(c),c}_checkIfEmpty(g){if(this.empty())this._onWidgetEmpty.fire();else{const c=this.currentGroupIndex.get();g===c&&this._doSelectGroup(this.groups.get().length-1),g<c&&this._doSelectGroup(c-1)}}_doRemoveGroup(g){const c=this.groups.get(),[h]=c.splice(g,1);h&&(h.widgets.get().forEach(u=>{this._widgets.delete(u.id),u.dispose(),this._onWidgetDisposed.fire(u)}),h.dispose(),(0,l.transaction)(u=>{this.groups.set(c.filter(d=>d.id!==h.id),u)})),this._checkIfEmpty(g)}removeGroup(g){this._doRemoveGroup(g)}getWidget(g){const c=this._widgets.get(g);if(!c)throw new Error("not find this widget");return c}selectWidget(g){const c=this.getWidget(g),h=c.group,u=this.groups.get().findIndex(d=>d.id===h.id);h.selectWidget(c),this.selectGroup(u)}createWidget(g,c,h,u=!1,d=!1){const v=new E(c||this.service.generateSessionId(),h,d);return this._widgets.set(v.id,v),v.group=g,u||this._onWidgetCreated.fire(v),v}_checkIfGroupEmpty(g){this.getGroup(g).length===0&&this._doRemoveGroup(g)}removeWidget(g){const c=this.getWidget(g),h=c.group,u=this.groups.get().findIndex(f=>h.id===f.id),d=h.findWidget(c);h.removeWidgetByIndex(d),this._widgets.delete(g),c.dispose(),this._onWidgetDisposed.fire(c),this._checkIfGroupEmpty(u);const v=h.current.get();v&&this._onWidgetSelected.fire(v)}resize(){const g=this.currentGroup.get();g&&g.widgets.get().forEach(c=>{c.resize()})}empty(){return this._widgets.size===0}clear(){(0,l.transaction)(g=>{this.groups.set([],g)}),this._widgets.clear(),this._onWidgetEmpty.fire()}};t.TerminalGroupViewService=_,n.__decorate([(0,r.Autowired)(m.ITerminalInternalService),n.__metadata("design:type",Object)],_.prototype,"service",void 0),t.TerminalGroupViewService=_=n.__decorate([(0,r.Injectable)()],_)},41685:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XTerm=void 0;const n=e(85608),r=e(95643),o=e(98239),l=e(87083),m=e(76003),E=e(41869),p=e(67889),_=e(43718),s=e(75124),g=e(9132),c=e(68179),h=e(42912),u=e(25655),d=n.__importDefault(e(73567)),v=e(43395);let f=class extends _.Disposable{constructor(b){super(),this.options=b,this.container=document.createElement("div"),this.container.className=d.default.terminalInstance,this.xtermOptions=b.xtermOptions,this.raw=new l.Terminal({allowProposedApi:!0,...this.xtermOptions}),this._prepareAddons(),this.raw.onSelectionChange(this.onSelectionChange.bind(this))}async enableCanvasRenderer(){try{this._canvasAddon||(this._canvasAddon=new(await e.e(359).then(e.t.bind(e,67359,23))).CanvasAddon),this.addDispose(this._canvasAddon),this.raw.loadAddon(this._canvasAddon),this._webglAddon&&(this._webglAddon.dispose(),this._webglAddon=void 0)}catch{}}async enableWebglRenderer(){try{this._webglAddon||(this._webglAddon=new(await e.e(151).then(e.t.bind(e,42151,23))).WebglAddon),this.addDispose(this._webglAddon),this.addDispose(this._webglAddon.onContextLoss(()=>{this.raw.options.rendererType="dom"})),this.raw.loadAddon(this._webglAddon),this._canvasAddon&&(this._canvasAddon.dispose(),this._canvasAddon=void 0)}catch{await this.enableCanvasRenderer()}}async _prepareAddons(){this._searchAddon=new o.SearchAddon,this._fitAddon=new r.FitAddon,this.addDispose([this._searchAddon,this._fitAddon]),this.raw.loadAddon(this._searchAddon),this.raw.loadAddon(this._fitAddon)}updateTheme(b){b&&(this.raw.options.theme=b,this.xtermOptions={...this.xtermOptions,theme:b})}updatePreferences(b){this.xtermOptions={...this.xtermOptions,...b}}getFindColors(){const b=this.themeService.getCurrentThemeSync(),y=b.getColor(v.TERMINAL_BACKGROUND_COLOR)||b.getColor(c.PANEL_BACKGROUND),S=b.getColor(v.TERMINAL_FIND_MATCH_BACKGROUND_COLOR),A=b.getColor(v.TERMINAL_FIND_MATCH_BORDER_COLOR),T=b.getColor(v.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),w=b.getColor(v.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR),D=b.getColor(v.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR),I=b.getColor(v.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR);return{activeMatchBackground:S?.toString(),activeMatchBorder:A?.toString()||"transparent",activeMatchColorOverviewRuler:T?.toString()||"transparent",matchBackground:y?w?.blend(y).toString():void 0,matchBorder:D?.toString()||"transparent",matchOverviewRuler:I?.toString()||"transparent"}}findNext(b){const y={decorations:this.getFindColors()};return this._searchAddon.findNext(b,y)}closeSearch(){this._searchAddon.clearDecorations()}open(){this.raw.open(this.container);const b=this.preferenceService.get("terminal.integrated.xtermRenderType",u.RenderType.WebGL);b===u.RenderType.WebGL?this.enableWebglRenderer():b===u.RenderType.Canvas&&this.enableCanvasRenderer()}fit(){this._fitAddon.fit()}async onSelectionChange(){var b;!((b=this.xtermOptions)===null||b===void 0)&&b.copyOnSelection&&this.raw.hasSelection()&&await this.copySelection()}async copySelection(){this.raw.hasSelection()?await this.clipboardService.writeText(this.raw.getSelection()):this.messageService.warning("The terminal has no selection to copy")}dispose(){this.raw.dispose(),this.container.remove()}};t.XTerm=f,n.__decorate([(0,m.Autowired)(m.INJECTOR_TOKEN),n.__metadata("design:type",m.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,m.Autowired)(s.MessageService),n.__metadata("design:type",s.MessageService)],f.prototype,"messageService",void 0),n.__decorate([(0,m.Autowired)(E.IClipboardService),n.__metadata("design:type",Object)],f.prototype,"clipboardService",void 0),n.__decorate([(0,m.Autowired)(h.IThemeService),n.__metadata("design:type",g.WorkbenchThemeService)],f.prototype,"themeService",void 0),n.__decorate([(0,m.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),t.XTerm=f=n.__decorate([(0,m.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],f)},78453:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalApiService=void 0,t.ITerminalApiService=Symbol("ITerminalApiService")},68830:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TERMINAL_ID_SEPARATOR=t.ITerminalClientFactory2=void 0,t.ITerminalClientFactory2=Symbol("ITerminalClientFactory2"),t.TERMINAL_ID_SEPARATOR="|"},7473:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalHoverManagerService=t.ITerminalGroupViewService=t.ITerminalSearchService=t.ITerminalController=void 0,t.ITerminalController=Symbol("ITerminalController"),t.ITerminalSearchService=Symbol("ITerminalSearchService"),t.ITerminalGroupViewService=Symbol("ITerminalGroupViewService"),t.ITerminalHoverManagerService=Symbol("ITerminalHoverManagerService")},94620:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentVariableMutatorType=t.EnvironmentVariableServiceToken=void 0,t.mutatorTypeLabel=e,t.serializeEnvironmentVariableCollection=r,t.deserializeEnvironmentVariableCollection=o,t.EnvironmentVariableServiceToken=Symbol("EnvironmentVariableServiceToken");function e(l,m,E){switch(l){case n.Prepend:return`${E}=${m}\${env:${E}}`;case n.Append:return`${E}=\${env:${E}}${m}`;default:return`${E}=${m}`}}var n;(function(l){l[l.Replace=1]="Replace",l[l.Append=2]="Append",l[l.Prepend=3]="Prepend"})(n||(t.EnvironmentVariableMutatorType=n={}));function r(l){return[...l.entries()]}function o(l){return new Map(l)}},12404:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergedEnvironmentVariableCollection=void 0;const n=e(43718),r=e(94620);class o{constructor(p){this.map=new Map,p.forEach((_,s)=>{const g=_.map.entries();let c=g.next();for(;!c.done;){const h=c.value[0];let u=this.map.get(h);if(u||(u=[],this.map.set(h,u)),u.length>0&&u[0].type===r.EnvironmentVariableMutatorType.Replace){c=g.next();continue}const d=c.value[1];u.unshift({extensionIdentifier:s,value:d.value,type:d.type,options:d.options}),c=g.next()}})}async applyToProcessEnvironment(p,_,s){let g;_===n.OperatingSystem.Windows&&(g={},Object.keys(p).forEach(c=>g[c.toLowerCase()]=c)),this.map.forEach((c,h)=>{const u=_===n.OperatingSystem.Windows&&g[h.toLowerCase()]||h;c.forEach(async d=>{var v,f;if(!((f=(v=d.options)===null||v===void 0?void 0:v.applyAtProcessCreation)!==null&&f!==void 0)||f){const a=s?await s(d.value):d.value;switch(d.type){case r.EnvironmentVariableMutatorType.Append:p[u]=(p[u]||"")+a;break;case r.EnvironmentVariableMutatorType.Prepend:p[u]=a+(p[u]||"");break;case r.EnvironmentVariableMutatorType.Replace:p[u]=a;break}}})})}diff(p){const _=new Map,s=new Map,g=new Map;if(p.map.forEach((c,h)=>{const u=this.map.get(h),d=l(c,u);d&&_.set(h,d)}),this.map.forEach((c,h)=>{const u=p.map.get(h),d=l(c,u);d&&g.set(h,d)}),this.map.forEach((c,h)=>{const u=p.map.get(h),d=m(c,u);d&&s.set(h,d)}),!(_.size===0&&s.size===0&&g.size===0))return{added:_,changed:s,removed:g}}}t.MergedEnvironmentVariableCollection=o;function l(E,p){if(!p)return E;const _=new Set;p.forEach(g=>_.add(g.extensionIdentifier));const s=[];return E.forEach(g=>{_.has(g.extensionIdentifier)||s.push(g)}),s.length===0?void 0:s}function m(E,p){if(!p)return;const _=new Map;p.forEach(g=>_.set(g.extensionIdentifier,g));const s=[];return E.forEach(g=>{const c=_.get(g.extensionIdentifier);c&&(g.type!==c.type||g.value!==c.value)&&s.push(c)}),s.length===0?void 0:s}},19599:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalErrorService=t.ETerminalErrorType=void 0,t.isTerminalError=n;var e;(function(r){r[r.CREATE_FAIL=0]="CREATE_FAIL"})(e||(t.ETerminalErrorType=e={}));function n(r){return r.message!==void 0}t.ITerminalErrorService=Symbol("ITerminalErrorService")},84876:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalLocation=t.TerminalDataBufferer=void 0;class e{constructor(o){this._callback=o,this._terminalBufferMap=new Map}dispose(){for(const o of this._terminalBufferMap.values())o.dispose()}startBuffering(o,l,m=5){let E;return E=l(p=>{const _=typeof p=="string"?p:p.data;let s=this._terminalBufferMap.get(o);if(s){s.data.push(_);return}const g=setTimeout(()=>this._flushBuffer(o),m);s={data:[_],timeoutId:g,dispose:()=>{clearTimeout(g),this._flushBuffer(o),E.dispose()}},this._terminalBufferMap.set(o,s)}),E}stopBuffering(o){const l=this._terminalBufferMap.get(o);l&&l.dispose()}_flushBuffer(o){const l=this._terminalBufferMap.get(o);l&&(this._terminalBufferMap.delete(o),this._callback(o,l.data.join("")))}}t.TerminalDataBufferer=e;var n;(function(r){r[r.Panel=1]="Panel",r[r.Editor=2]="Editor"})(n||(t.TerminalLocation=n={}))},26405:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(7473),t),n.__exportStar(e(59381),t),n.__exportStar(e(18171),t),n.__exportStar(e(19599),t),n.__exportStar(e(30354),t),n.__exportStar(e(38022),t),n.__exportStar(e(68830),t),n.__exportStar(e(78453),t),n.__exportStar(e(30076),t),n.__exportStar(e(16992),t),n.__exportStar(e(2853),t),n.__exportStar(e(84876),t),n.__exportStar(e(27155),t),n.__exportStar(e(15432),t),n.__exportStar(e(85504),t),n.__exportStar(e(38352),t)},15432:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkComputer=t.StateMachine=t.Uint8Matrix=void 0,t.computeLinks=s;const n=e(43718);class r{constructor(c,h,u){const d=new Uint8Array(c*h);for(let v=0,f=c*h;v<f;v++)d[v]=u;this._data=d,this.rows=c,this.cols=h}get(c,h){return this._data[c*this.cols+h]}set(c,h,u){this._data[c*this.cols+h]=u}}t.Uint8Matrix=r;class o{constructor(c){let h=0,u=0;for(let v=0,f=c.length;v<f;v++){const[a,b,y]=c[v];b>h&&(h=b),a>u&&(u=a),y>u&&(u=y)}h++,u++;const d=new r(u,h,0);for(let v=0,f=c.length;v<f;v++){const[a,b,y]=c[v];d.set(a,b,y)}this._states=d,this._maxCharCode=h}nextState(c,h){return h<0||h>=this._maxCharCode?0:this._states.get(c,h)}}t.StateMachine=o;let l=null;function m(){return l===null&&(l=new o([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}let E=null;function p(){if(E===null){E=new n.CharacterClassifier(0);const g=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u3011\u300F\u300D\u300B\u3009\u201D\u2019\uFF40\uFF5E\u2026`;for(let h=0;h<g.length;h++)E.set(g.charCodeAt(h),1);const c=".,;";for(let h=0;h<c.length;h++)E.set(c.charCodeAt(h),2)}return E}class _{static _createLink(c,h,u,d,v){let f=v-1;do{const a=h.charCodeAt(f);if(c.get(a)!==2)break;f--}while(f>d);if(d>0){const a=h.charCodeAt(d-1),b=h.charCodeAt(f);(a===40&&b===41||a===91&&b===93||a===123&&b===125)&&f--}return{range:{startLineNumber:u,startColumn:d+1,endLineNumber:u,endColumn:f+2},url:h.substring(d,f+1)}}static computeLinks(c,h=m()){const u=p(),d=[];for(let v=1,f=c.getLineCount();v<=f;v++){const a=c.getLineContent(v),b=a.length;let y=0,S=0,A=0,T=1,w=!1,D=!1,I=!1,O=!1;for(;y<b;){let P=!1;const R=a.charCodeAt(y);if(T===13){let M;switch(R){case 40:w=!0,M=0;break;case 41:M=w?0:1;break;case 91:I=!0,D=!0,M=0;break;case 93:I=!1,M=D?0:1;break;case 123:O=!0,M=0;break;case 125:M=O?0:1;break;case 39:M=A===34||A===96?0:1;break;case 34:M=A===39||A===96?0:1;break;case 96:M=A===39||A===34?0:1;break;case 42:M=A===42?1:0;break;case 124:M=A===124?1:0;break;case 32:M=I?0:1;break;default:M=u.get(R)}M===1&&(d.push(_._createLink(u,a,v,S,y)),P=!0)}else if(T===12){let M;R===91?(D=!0,M=0):M=u.get(R),M===1?P=!0:T=13}else T=h.nextState(T,R),T===0&&(P=!0);P&&(T=1,w=!1,D=!1,O=!1,S=y+1,A=R),y++}T===13&&d.push(_._createLink(u,a,v,S,b))}return d}}t.LinkComputer=_;function s(g){return!g||typeof g.getLineCount!="function"||typeof g.getLineContent!="function"?[]:_.computeLinks(g)}},27155:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNetworkStatus=t.ITerminalNetwork=void 0,t.ITerminalNetwork=Symbol("ITerminalNetwork");var e;(function(n){n[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTED=1]="CONNECTED"})(e||(t.TerminalNetworkStatus=e={}))},3276:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.terminalPreferenceSchema=t.TerminalCursorStyle=t.SupportedOptionsName=t.ITerminalPreference=void 0;const n=e(43718),r=e(25655);t.ITerminalPreference=Symbol("ITerminalPreference"),t.SupportedOptionsName={type:"type",fontFamily:"fontFamily",fontSize:"fontSize",fontWeight:"fontWeight",lineHeight:"lineHeight",cursorBlink:"cursorBlink",scrollback:"scrollback",copyOnSelection:"copyOnSelection",cursorStyle:"cursorStyle"},t.TerminalCursorStyle={BLOCK:"block",LINE:"line",UNDERLINE:"underline"};const o=(0,n.localize)("terminal.integrated.shell.linux.deprecation","This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in {0} and setting its profile name as the default in {1}. This will currently take priority over the new profiles settings but that will change in the future.","`#terminal.integrated.profiles.linux#`"),l=(0,n.localize)("terminal.integrated.shell.osx.deprecation","This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in {0} and setting its profile name as the default in {1}. This will currently take priority over the new profiles settings but that will change in the future.","`#terminal.integrated.profiles.osx#`"),m=(0,n.localize)("terminal.integrated.shell.windows.deprecation","This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in {0} and setting its profile name as the default in {1}. This will currently take priority over the new profiles settings but that will change in the future.","`#terminal.integrated.profiles.windows#`");t.terminalPreferenceSchema={type:"object",properties:{"terminal.type":{type:"string",enum:["zsh","bash","sh","default"],default:"default",description:"%preference.terminal.typeDesc%"},"terminal.fontFamily":{type:"string"},"terminal.fontSize":{type:"number",default:12},"terminal.fontWeight":{type:"string",enum:["normal","bold"],default:400},"terminal.lineHeight":{type:"number",default:1},"terminal.cursorBlink":{type:"boolean",default:!1},"terminal.scrollback":{type:"number",default:1e3},"terminal.integrated.shellArgs.linux":{type:"array",default:[],description:"%preference.terminal.integrated.shellArgs.linuxDesc%",markdownDeprecationMessage:o},"terminal.integrated.shellArgs.osx":{type:"array",default:[],markdownDeprecationMessage:l},"terminal.integrated.shellArgs.windows":{type:"array",default:[],markdownDeprecationMessage:m},"terminal.integrated.profiles.windows":{restricted:!0,markdownDescription:(0,n.localize)("terminal.integrated.profiles.windows",'The Windows profiles to present when creating a new terminal via the terminal dropdown. Use the `path` property to automatically detect the shell\'s location. Or set the {1} property manually with an optional `args`.\n\nSet an existing profile to `null` to hide the profile from the list, for example: `"Ubuntu-20.04 (WSL)": null`.'),type:"object",default:{}},"terminal.integrated.profiles.osx":{restricted:!0,markdownDescription:(0,n.localize)("terminal.integrated.profile.osx",'The macOS profiles to present when creating a new terminal via the terminal dropdown. Set the `path` property manually with an optional `args`.\n\nSet an existing profile to `null` to hide the profile from the list, for example: `"bash": null`.'),type:"object",default:{bash:{path:"bash",args:["-l"]},zsh:{path:"zsh",args:["-l"]},fish:{path:"fish",args:["-l"]},tmux:{path:"tmux"},pwsh:{path:"pwsh"}}},"terminal.integrated.profiles.linux":{restricted:!0,markdownDescription:(0,n.localize)("terminal.integrated.profile.linux",'The Linux profiles to present when creating a new terminal via the terminal dropdown. Set the `path` property manually with an optional `args`.\n\nSet an existing profile to `null` to hide the profile from the list, for example: `"bash": null`.'),type:"object",default:{bash:{path:"bash",icon:"terminal-bash"},zsh:{path:"zsh"},fish:{path:"fish"},tmux:{path:"tmux",icon:"terminal-tmux"},pwsh:{path:"pwsh",icon:"terminal-powershell"}}},"terminal.integrated.defaultProfile.linux":{restricted:!0,markdownDescription:(0,n.localize)("terminal.integrated.defaultProfile.linux","The default profile used on Linux. This setting will currently be ignored if either {0} or {1} are set."),type:["string","null"],default:null},"terminal.integrated.defaultProfile.osx":{restricted:!0,markdownDescription:(0,n.localize)("terminal.integrated.defaultProfile.osx","The default profile used on macOS. This setting will currently be ignored if either {0} or {1} are set."),type:["string","null"],default:null},"terminal.integrated.defaultProfile.windows":{restricted:!0,markdownDescription:(0,n.localize)("terminal.integrated.defaultProfile.windows","The default profile used on Windows. This setting will currently be ignored if either {0} or {1} are set."),type:["string","null"],default:null},"terminal.integrated.copyOnSelection":{type:"boolean",description:"%preference.terminal.integrated.copyOnSelectionDesc%",default:!1},"terminal.integrated.localEchoEnabled":{type:"boolean",description:"%preference.terminal.integrated.localEchoDesc%",default:!0},"terminal.integrated.localEchoLatencyThreshold":{type:"number",description:"%preference.terminal.integrated.localEchoLatencyThresholdDesc%",default:30},"terminal.integrated.localEchoExcludePrograms":{type:"array",description:"%preference.terminal.integrated.localEchoExcludeProgramsDesc%",default:["vim","vi","nano","tmux"]},"terminal.integrated.localEchoStyle":{type:"string",description:"%preference.terminal.integrated.localEchoStyleDesc%",enum:["bold","dim","italic","underlined","inverted"],default:"dim"},"terminal.integrated.cursorStyle":{type:"string",description:"%preference.terminal.integrated.cursorStyleDesc%",enum:[t.TerminalCursorStyle.BLOCK,t.TerminalCursorStyle.LINE,t.TerminalCursorStyle.UNDERLINE],default:t.TerminalCursorStyle.BLOCK},"terminal.integrated.xtermRenderType":{type:"string",description:"%preference.terminal.integrated.xtermRenderTypeDesc%",enum:[r.RenderType.WebGL,r.RenderType.Canvas,r.RenderType.Dom],default:r.RenderType.WebGL},"terminal.integrated.enablePersistentSessions":{type:"boolean",description:"%preference.terminal.integrated.enablePersistentSessionDesc%",default:!0}}}},38352:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85504:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalProfileInternalService=t.ITerminalProfileService=void 0,t.terminalProfileArgsMatch=e,t.ITerminalProfileService=Symbol("ITerminalProfileService"),t.ITerminalProfileInternalService=Symbol("ITerminalProfileInternalService");function e(n,r){if(!n&&!r)return!0;if(typeof n=="string"&&typeof r=="string")return n===r;if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(n[o]!==r[o])return!1;return!0}return!1}},30354:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPtyService=t.IExternalTerminalService=t.ITerminalServiceClient=t.ITerminalProcessService=t.ITerminalNodeService=t.PTY_SERVICE_PROXY_SERVER_PORT=t.PTY_SERVICE_PROXY_CALLBACK_PROTOCOL=t.PTY_SERVICE_PROXY_PROTOCOL=t.ITerminalProcessPath=t.ITerminalServicePath=void 0,t.asTerminalIcon=e,t.ITerminalServicePath="ITerminalServicePath",t.ITerminalProcessPath="ITerminalProcessPath",t.PTY_SERVICE_PROXY_PROTOCOL="PTY_SERVICE_PROXY_PROTOCOL",t.PTY_SERVICE_PROXY_CALLBACK_PROTOCOL="PTY_SERVICE_PROXY_CALLBACK_PROTOCOL",t.PTY_SERVICE_PROXY_SERVER_PORT=10111,t.ITerminalNodeService=Symbol("ITerminalNodeService"),t.ITerminalProcessService=Symbol("ITerminalProcessService"),t.ITerminalServiceClient=Symbol("ITerminalServiceClient"),t.IExternalTerminalService=Symbol("IExternalTerminalService");function e(n){if(!(!n||typeof n=="string"))return"id"in n?{id:n.id,color:n.color}:n}t.IPtyService=Symbol("IPtyService")},2853:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalRenderProvider=t.ItemType=void 0;var e;(function(n){n[n.info=0]="info",n[n.add=1]="add"})(e||(t.ItemType=e={})),t.ITerminalRenderProvider=Symbol("TerminalRenderProvider")},59381:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},18171:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalRestore=void 0,t.ITerminalRestore=Symbol("ITerminalRestore")},38022:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalInternalService=t.ITerminalService=void 0,t.ITerminalService=Symbol("ITerminalService"),t.ITerminalInternalService=Symbol("ITerminalInternalService")},30076:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITerminalTheme=void 0,t.ITerminalTheme=Symbol("ITerminalTheme")},16992:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateSessionId=t.apiActionViewUuid=t.userActionViewUuid=void 0;const n=e(43718);let r=0;function o(){return r++}const l=()=>`UI_View_${(0,n.uuid)()}${o()}`;t.userActionViewUuid=l;const m=()=>`API_View_${(0,n.uuid)()}${o()}`;t.apiActionViewUuid=m;const E=()=>(0,n.uuid)();t.generateSessionId=E},25655:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderType=void 0;var e;(function(n){n.Canvas="canvas",n.WebGL="webgl",n.Dom="dom"})(e||(t.RenderType=e={}))},6487:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(26405),t)},92297:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingExplorerTree=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(91416),l=e(41869),m=e(52416),E=e(72383),p=e(85941),_=e(95381),s=e(16558),g=e(97581),c=n.__importDefault(e(30272)),h=()=>{const u=(0,l.useInjectable)(s.TestTreeViewModelToken),d=(0,l.useInjectable)(E.TestServiceToken),v=(0,l.useInjectable)(l.CommandService),f=(0,l.useInjectable)(m.IIconService),[a,b]=(0,r.useState)([]),y=r.default.useCallback(D=>(0,g.getIconWithColor)(D.state),[]),S=r.default.useCallback(D=>({label:D.label,renderLabel:(0,l.transformLabelWithCodicon)(D.label,{verticalAlign:"middle",marginRight:"4px",marginLeft:"4px"},f.fromString.bind(f)),icon:"",get iconClassName(){return y(D)},expandable:D.test.expand!==0,rawItem:D,sortText:D.sortText,get children(){if(D.test.expand===1||D.children){const I=u.getTestTreeItem(D.test.item.extId);return Array.from((0,l.map)(I?.children||[],S))}return null}}),[]);(0,r.useEffect)(()=>l.Event.debounce(u.onUpdate,()=>{},500)(()=>{for(const I of u.roots)if(I.depth===0&&I.children.size>0){let O=[];for(const P of I.children)O.push(S(P));O=O.sort((P,R)=>(P.sortText||P.label).localeCompare(R.sortText||R.label)),b(O)}}).dispose,[u]),(0,r.useEffect)(()=>{var D;if(u.treeHandlerApi){const I=u.treeHandlerApi.getModel();((D=I.root.children)===null||D===void 0?void 0:D.length)===0&&I.root.refresh()}},[a]);const A=r.default.useCallback(D=>D?D.children&&D.children.length>0?D.children:[]:null,[]),T=r.default.useCallback((D,I)=>{const{rawItem:O}=D.raw;switch(I.command){case p.RuntTestCommand.id:d.runTests({tests:O.tests,group:2});break;case p.DebugTestCommand.id:d.runTests({tests:O.tests,group:4});break;case p.GoToTestCommand.id:v.executeCommand(p.GoToTestCommand.id,O.test.item.extId);break}},[]),w=D=>{u.setTreeHandlerApi(D)};return r.default.createElement("div",{className:"monaco-workbench monaco-component"},a.length>0&&r.default.createElement(o.BasicRecycleTree,{treeData:a,onReady:w,itemClassname:c.default.item_label,height:900,resolveChildren:A,inlineMenus:_.TestingExplorerInlineMenus,inlineMenuActuator:T}))};t.TestingExplorerTree=h},76028:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingView=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),l=e(25918),m=e(1149),E=e(93899),p=e(91527),_=e(92297),s=n.__importDefault(e(30272)),g=()=>{const c=(0,o.useInjectable)(E.AbstractContextMenuService),h=(0,o.useInjectable)(o.ViewContextKeyRegistry),u=(0,o.useInjectable)(m.LayoutViewSizeConfig),[d,v]=(0,r.useState)();return(0,r.useEffect)(()=>{const f=c.createMenu({id:E.MenuId.ViewTitle,contextKeyService:h.getContextKeyService("workbench.view.testing")});v(f)},[]),r.default.createElement("div",{className:s.default.testing_container},r.default.createElement(p.TitleBar,{title:(0,o.localize)("test.title"),height:u.panelTitleBarHeight,menubar:d?r.default.createElement(l.InlineMenuBar,{menus:d}):null}),r.default.createElement(_.TestingExplorerTree,null))};t.TestingView=g},97581:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconWithColor=t.testingRefreshTests=t.testingRunAllIcon=t.testingRunIcon=t.testingStatesToIcons=t.testStatesToIconColors=t.defaultIconColor=void 0;const n=e(41869);t.defaultIconColor="testing_icon_iconPassed",t.testStatesToIconColors={6:"testing_icon_iconFailed",4:"testing_icon_iconErrored",3:t.defaultIconColor,1:"testing_icon_iconQueued",0:"testing_icon_iconUnset",5:"testing_icon_iconUnset"},t.testingStatesToIcons=new Map([[6,(0,n.getExternalIcon)("issues")],[4,(0,n.getExternalIcon)("error")],[3,(0,n.getExternalIcon)("pass")],[1,(0,n.getExternalIcon)("history")],[2,(0,n.getExternalIcon)("loading")+" kt-icon-loading"],[5,(0,n.getExternalIcon)("debug-step-over")],[0,(0,n.getExternalIcon)("circle-outline")]]),t.testingRunIcon=(0,n.getExternalIcon)("run"),t.testingRunAllIcon=(0,n.getExternalIcon)("run-all"),t.testingRefreshTests=(0,n.getExternalIcon)("refresh");const r=o=>`${t.testingStatesToIcons.get(o)} ${t.testStatesToIconColors[o]}`||"";t.getIconWithColor=r},26874:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingModule=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(72383),m=e(20215),E=e(48385),p=e(57879),_=e(16558),s=e(43122),g=e(89872),c=e(80162),h=e(66724),u=e(4836),d=e(86457),v=e(76388);e(8758),e(11009),e(61164);let f=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[v.TestingContribution,{token:l.TestServiceToken,useClass:d.TestServiceImpl},{token:_.TestTreeViewModelToken,useClass:h.TestTreeViewModelImpl},{token:m.TestProfileServiceToken,useClass:c.TestProfileServiceImpl},{token:E.TestResultServiceToken,useClass:u.TestResultServiceImpl},{token:p.TestingPeekOpenerServiceToken,useClass:g.TestingPeekOpenerServiceImpl},{token:l.TestPeekMessageToken,useClass:s.TestingPeekMessageServiceImpl}]}};t.TestingModule=f,t.TestingModule=f=n.__decorate([(0,r.Injectable)()],f)},23993:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestMessageContainer=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(43144)),l=e(41869),m=e(43718),E=e(57517),p=e(93374),_=e(72383),s=n.__importDefault(e(30272));var g;(function(b){b[b.DIFF=0]="DIFF",b[b.PLANTTEXT=1]="PLANTTEXT",b[b.MARKDOWN=2]="MARKDOWN"})(g||(g={}));const h={...{scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},fixedOverflowWidgets:!0,readOnly:!0,minimap:{enabled:!1}},enableSplitViewResizing:!0,renderOverviewRuler:!1,ignoreTrimWhitespace:!1,renderSideBySide:!0},u=b=>b?b.messages[b.messageIndex]:{message:"",actual:"",expected:""},d=({root:b,children:y})=>o.default.createPortal(y,b),v=b=>{const y=(0,l.useInjectable)(l.IOpenerService),S=(0,r.useRef)(null),[A,T]=(0,r.useState)(""),[w,D]=(0,r.useState)(null),I=O=>{O&&O.scheme===m.Schemes.command&&y.open(O)};return r.default.useEffect(()=>{if(S.current){const{dto:O}=b;let P=S.current.shadowRoot;P||(P=S.current.attachShadow({mode:"open"})),w||D(P);const R=u(O).message,M=R?R.value.replace(/\t/g,""):"";T(M)}},[b.dto]),r.default.createElement("div",{ref:S,className:s.default.preview_markdown},w&&r.default.createElement(d,{root:w},r.default.createElement(p.Markdown,{content:A,onLinkClick:I})))},f=r.default.memo(b=>{const{dto:y}=b,S=(0,l.useInjectable)(E.IEditorDocumentModelService),A=(0,l.useInjectable)(E.EditorCollectionService),T=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!y)return;let w;const{expectedUri:D,actualUri:I}=y;return Promise.all([S.createModelReference(D),S.createModelReference(I)]).then(O=>{const[P,R]=O,{actual:M,expected:k}=u(y);w=A.createDiffEditor(T.current,{...(0,E.getSimpleEditorOptions)(),...h});const B=P.instance.getMonacoModel(),x=R.instance.getMonacoModel();B.setValue(k),x.setValue(M),w.compare(P,R),w.originalEditor.monacoEditor.setModel(B),w.modifiedEditor.monacoEditor.setModel(x)}),()=>{w&&w.dispose()}},[]),r.default.createElement("div",{ref:T,style:{height:"inherit"}})}),a=()=>{const b=(0,l.useInjectable)(_.TestPeekMessageToken),[y,S]=(0,r.useState)(),[A,T]=(0,r.useState)();(0,r.useEffect)(()=>{const D=new m.Disposable;return D.addDispose(b.onDidReveal(async I=>{T(I);const O=u(I);I.isDiffable?S(g.DIFF):I.isDiffable||typeof O.message=="string"?S(g.PLANTTEXT):S(g.MARKDOWN)})),()=>{D.dispose()}},[]);const w=r.default.useCallback(()=>{if(!A)return null;if(y===g.DIFF)return r.default.createElement(f,{dto:A});if(y===g.MARKDOWN)return r.default.createElement(v,{dto:A});{const D=u(A).message;return r.default.createElement("div",{className:s.default.preview_text},typeof D=="string"?D:D.value)}},[A]);return r.default.createElement("div",{className:s.default.test_output_peek_message_container,style:{height:"100%"}},w())};t.TestMessageContainer=a},1031:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestOutputPeekContribution=t.TestDto=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(43718),m=e(44781),E=e(48385),p=e(57879),_=e(92597),s=e(65482),g=e(4836),c=e(33429),h=e(89872),u=e(33218);class d{get isDiffable(){const a=this.messages[this.messageIndex];return a.type===0&&(0,_.isDiffable)(a)}constructor(a,b,y,S){var A;this.resultId=a,this.taskIndex=y,this.messageIndex=S,this.test=b.item,this.messages=b.tasks[y].messages,this.messageIndex=S;const T={messageIndex:S,resultId:a,taskIndex:y,testExtId:b.item.extId};this.expectedUri=(0,c.buildTestUri)({...T,type:2}),this.actualUri=(0,c.buildTestUri)({...T,type:1}),this.messageUri=(0,c.buildTestUri)({...T,type:0});const w=this.messages[this.messageIndex];this.revealLocation=(A=w.location)!==null&&A!==void 0?A:b.item.uri&&b.item.range?{uri:b.item.uri,range:m.Range.lift(b.item.range)}:void 0}}t.TestDto=d;let v=class{constructor(a){this.editor=a,this.disposer=new l.Disposable,this.peekView=new l.MutableDisposable,this.testContextKey=this.injector.get(s.TestContextKey,[this.editor.monacoEditor._contextKeyService])}allMessages(a){const b=[];for(const y of a)for(const S of y.tests)for(let A=0;A<S.tasks.length;A++)for(let T=0;T<S.tasks[A].messages.length;T++)b.push({result:y,test:S,taskIndex:A,messageIndex:T});return b}contribute(){return this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModel(a=>{var b;((b=a.newModelUrl)===null||b===void 0?void 0:b.scheme)===o.Schemes.file&&this.testingPeekOpenerService.setPeekContrib(a.newModelUrl,this)})),this.disposer.addDispose(l.Disposable.create(()=>{this.editor.currentUri&&this.testingPeekOpenerService.delPeekContrib(this.editor.currentUri)})),this.disposer}toggle(a){var b;((b=this.currentPeekUri)===null||b===void 0?void 0:b.toString())===a.toString()?this.peekView.clear():this.show(a)}openCurrentInEditor(){var a;const b=(a=this.peekView.value)===null||a===void 0?void 0:a.current;b&&(b.isDiffable?this.commandService.executeCommand(o.EDITOR_COMMANDS.API_OPEN_DIFF_EDITOR_COMMAND_ID,b.expectedUri,b.actualUri,"Expected <-> Actual"):this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,b.messageUri,{preview:!1,focus:!0}))}removePeek(){var a;(a=this.peekView.value)===null||a===void 0||a.hide(),this.peekView.clear()}async show(a){const b=this.testResultService.retrieveTest(a);b&&(this.peekView.value||(this.peekView.value=this.injector.get(u.TestingOutputPeek,[this.editor.monacoEditor,this.contextKeyService]),this.disposer.addDispose(this.peekView.value.onDidClose(()=>{this.testContextKey.contextTestingIsPeekVisible.set(!1),this.currentPeekUri=void 0,this.peekView.value=void 0})),this.testContextKey.contextTestingIsPeekVisible.set(!0),this.peekView.value.create()),this.peekView.value.setModel(b),this.currentPeekUri=a)}async openAndShow(a){var b;const y=this.testResultService.retrieveTest(a);if(!y)return;if(!y.revealLocation||y.revealLocation.uri.toString()===((b=this.editor.currentUri)===null||b===void 0?void 0:b.toString()))return this.show(a);const S=this.testingPeekOpenerService.peekControllerMap.get(a.toString());S&&(this.removePeek(),await this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,l.URI.parse(a.toString()),{preview:!0,focus:!0}),S.show(a))}next(){var a;const b=(a=this.peekView.value)===null||a===void 0?void 0:a.current;if(!b)return;let y=!1;const S=this.allMessages(this.testResultService.results);for(const{messageIndex:A,taskIndex:T,result:w,test:D}of S)if(y){this.openAndShow((0,c.buildTestUri)({type:0,messageIndex:A,taskIndex:T,resultId:w.id,testExtId:D.item.extId}));return}else b.test.extId===D.item.extId&&b.messageIndex===A&&b.taskIndex===T&&b.resultId===w.id&&(y=!0)}previous(){var a;const b=(a=this.peekView.value)===null||a===void 0?void 0:a.current;if(!b)return;let y;const S=this.allMessages(this.testResultService.results);for(const A of S){if(b.test.extId===A.test.item.extId&&b.messageIndex===A.messageIndex&&b.taskIndex===A.taskIndex&&b.resultId===A.result.id){if(!y)return;this.openAndShow((0,c.buildTestUri)({type:0,messageIndex:y.messageIndex,taskIndex:y.taskIndex,resultId:y.result.id,testExtId:y.test.item.extId}));return}y=A}}};t.TestOutputPeekContribution=v,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(E.TestResultServiceToken),n.__metadata("design:type",g.TestResultServiceImpl)],v.prototype,"testResultService",void 0),n.__decorate([(0,r.Autowired)(p.TestingPeekOpenerServiceToken),n.__metadata("design:type",h.TestingPeekOpenerServiceImpl)],v.prototype,"testingPeekOpenerService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],v.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(l.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),t.TestOutputPeekContribution=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],v)},43122:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingPeekMessageServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(43718);let l=class extends o.Disposable{constructor(){super(...arguments),this._didReveal=new o.Emitter,this._visibilityChange=new o.Emitter,this.onDidReveal=this._didReveal.event,this.onVisibilityChange=this._visibilityChange.event}};t.TestingPeekMessageServiceImpl=l,t.TestingPeekMessageServiceImpl=l=n.__decorate([(0,r.Injectable)()],l)},89872:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingPeekOpenerServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(43718),l=e(54414),m=e(48385),E=e(33429),p=e(4836),_=(g,c)=>{for(let h=0;h<g.tasks.length;h++){const u=g.tasks[h];for(let d=0;d<u.messages.length;d++){const v=c(u,u.messages[d],d,h);if(v!==void 0)return v}}};let s=class extends o.Disposable{constructor(){super(...arguments),this.peekControllerMap=new Map}get currentUri(){var c;return(c=this.editorService.currentEditor)===null||c===void 0?void 0:c.currentUri}async showPeekFromUri(c,h){const u=this.editorService.currentEditor;this.lastUri=c;const d=(0,E.buildTestUri)(this.lastUri),v=this.peekControllerMap.get(u?.currentUri.toString());return v?.show(d),!0}getAnyCandidateMessage(){const c=new Set;for(const h of this.testResultService.results)for(const u of h.tests){if(c.has(u.item.extId))continue;c.add(u.item.extId);const d=_(u,(v,f,a,b)=>f.location&&{type:0,testExtId:u.item.extId,resultId:h.id,taskIndex:b,messageIndex:a,documentUri:f.location.uri});if(d)return d}}setPeekContrib(c,h){const u=c.toString();return this.peekControllerMap.has(u)||this.peekControllerMap.set(u,h),this}delPeekContrib(c){const h=c.toString();return this.peekControllerMap.delete(h),this}tryPeekFirstError(c,h,u){throw new Error("Method not implemented.")}async open(){let c;return c||(c=this.getAnyCandidateMessage()),c?this.showPeekFromUri(c):!1}closeAllPeeks(){for(const c of this.peekControllerMap.values())c.removePeek()}};t.TestingPeekOpenerServiceImpl=s,n.__decorate([(0,r.Autowired)(l.WorkbenchEditorService),n.__metadata("design:type",l.WorkbenchEditorService)],s.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(m.TestResultServiceToken),n.__metadata("design:type",p.TestResultServiceImpl)],s.prototype,"testResultService",void 0),t.TestingPeekOpenerServiceImpl=s=n.__decorate([(0,r.Injectable)()],s)},33218:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingOutputPeek=t.TestResultPanel=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(43144)),l=n.__importDefault(e(25873)),m=e(76003),E=e(41869),p=e(81878),_=e(25918),s=e(93899),g=e(48327),c=e(55666),h=e(72383),u=e(92597),d=e(23993),v=e(43122),f=e(3700);e(11009);const a=({viewState:y})=>r.default.createElement(p.SplitPanel,{overflow:"hidden",id:"testing-message-horizontal",flex:1,style:{height:"100%"}},r.default.createElement(d.TestMessageContainer,null),r.default.createElement(f.TestTreeContainer,{viewState:y}));t.TestResultPanel=a;let b=class extends g.PeekViewWidget{constructor(S,A){super(S,{isResizeable:!0}),this.editor=S,this.contextKeyService=A}_fillBody(S){this.setCssClass("testing-output-peek-container"),l.default.createRoot(S).render(r.default.createElement(E.ConfigProvider,{value:this.configContext},r.default.createElement(p.SplitPanel,{overflow:"hidden",id:"testing-message-horizontal",flex:1},r.default.createElement(d.TestMessageContainer,null),r.default.createElement(f.TestTreeContainer,null))))}async _fillActionBarOptions(S){const A=this.menuService.createMenu(s.MenuId.TestPeekTitleContext,this.contextKeyService);return new Promise(T=>{var w;l.default.createRoot(S).render(r.default.createElement(E.ConfigProvider,{value:this.configContext},r.default.createElement(_.InlineActionBar,{menus:A,type:"icon",context:[(w=this.editor.getModel())===null||w===void 0?void 0:w.uri.toString()]}))),T()})}applyClass(){}applyStyle(){}async showInPlace(S){const A=S.messages[S.messageIndex];this.setTitle((0,u.firstLine)(typeof A.message=="string"?A.message:(0,c.renderMarkdown)(A.message).element.outerText),S.test.label),setTimeout(()=>{this.testingPeekMessageService._didReveal.fire(S),this.testingPeekMessageService._visibilityChange.fire(!0)})}hide(){super.dispose(),this._bodyElement&&o.default.unmountComponentAtNode(this._bodyElement)}setModel(S){const A=S.messages[S.messageIndex],T=this.current;return A.type!==0||!S.revealLocation&&!T?Promise.resolve():(this.current=S,S.revealLocation?(this.show(S.revealLocation.range,(0,u.hintMessagePeekHeight)(A)),this.editor.focus(),this.showInPlace(S)):this.showInPlace(S))}};t.TestingOutputPeek=b,n.__decorate([(0,m.Autowired)(h.TestPeekMessageToken),n.__metadata("design:type",v.TestingPeekMessageServiceImpl)],b.prototype,"testingPeekMessageService",void 0),n.__decorate([(0,m.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],b.prototype,"menuService",void 0),n.__decorate([(0,m.Autowired)(E.AppConfig),n.__metadata("design:type",Object)],b.prototype,"configContext",void 0),t.TestingOutputPeek=b=n.__decorate([(0,m.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],b)},3700:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTreeContainer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),l=e(97267),m=e(41869),E=e(43718),p=e(42912),_=e(41682),s=e(72383),g=e(48385),c=e(92597),h=e(33429),u=n.__importDefault(e(30272)),d=e(97581),v=e(1031);var f;(function(b){b.RESULT="result",b.TEST="test",b.TASK="task",b.MESSAGE="message"})(f||(f={}));const a=({viewState:b})=>{const y=(0,m.useInjectable)(g.TestResultServiceToken),S=(0,m.useInjectable)(s.TestPeekMessageToken),A=(0,m.useInjectable)(p.IIconService),[T,w]=(0,o.useState)([]);(0,o.useEffect)(()=>{const k=new E.Disposable;k.addDispose(S.onDidReveal(N=>{}));const B=y.results.map(N=>M(N));w(B);const x=y.onResultsChanged(N=>{const j=y.results.map(K=>M(K));w(j)});return k.addDispose(x),y.onTestChanged(N=>{const j=y.results.map(K=>M(K));w(j)}),k.dispose.bind(k)},[]);const D=o.default.useCallback(k=>k?k.children&&k.children.length>0?k.children:[]:null,[]),I=o.default.useCallback(k=>{const B=k.completedAt===void 0?2:(0,g.maxCountPriority)(k.counts);return(0,d.getIconWithColor)(B)},[]),O=o.default.useCallback((k,B,x)=>_.Iterable.map(B.tasks[0].messages,(N,j)=>{const{message:K,location:U}=B.tasks[x].messages[j],Y=(0,h.buildTestUri)({type:0,messageIndex:j,resultId:k.id,taskIndex:x,testExtId:B.item.extId}),z=new v.TestDto(k.id,B,x,j);return{type:f.MESSAGE,context:Y,label:(0,c.firstLine)(typeof K=="string"?K:(0,c.parseMarkdownText)(K.value)),id:Y.toString(),icon:"",notExpandable:!1,location:U,rawItem:{...N,dto:z}}}),[]),P=o.default.useCallback((k,B)=>{const x=_.Iterable.filter(B.tasks,N=>N.messages.length>0);return _.Iterable.map(x,(N,j)=>{var K;const U=k.tasks[j];return{type:f.TASK,context:String(j),label:(K=U.name)!==null&&K!==void 0?K:(0,E.localize)("test.task.unnamed"),id:`${k.id}/${B.item.extId}/${j}`,icon:"",task:U,notExpandable:!1,rawItem:N,get children(){return Array.from(O(k,B,j))}}})},[]),R=o.default.useCallback(k=>{const B=_.Iterable.filter(k.tests,x=>x.tasks.some(N=>N.messages.length>0||N.state>=2));return _.Iterable.map(B,x=>{let N="";for(const G of(0,g.resultItemParents)(k,x))G!==x&&(N=N?G.item.label+" \u203A "+N:G.item.label);N=(0,m.transformLabelWithCodicon)(N,{},A.fromString.bind(A));const j=(0,m.transformLabelWithCodicon)(x.item.label,{verticalAlign:"middle",marginRight:"4px"},A.fromString.bind(A)),Y=x.tasks.filter(G=>G.messages.length>0).length>1?Array.from(P(k,x)):Array.from(O(k,x,0)),z=Y.length>0;return{type:f.TEST,context:x.item.extId,id:`${k.id}/${x.item.extId}`,renderLabel:j,label:x.item.label,icon:"",get iconClassName(){return(0,d.getIconWithColor)(x.computedState)},notExpandable:!1,expandable:z,description:"",rawItem:x,get children(){return Y}}})},[]),M=o.default.useCallback(k=>{const B={messages:[{location:void 0,message:{value:k.getOutput(),uris:{},isTrusted:!0,supportThemeIcons:!0},type:0}],messageIndex:0};return{type:f.RESULT,context:k.id,id:k.id,label:k.name,icon:"",get iconClassName(){return I(k)},expandable:!0,rawItem:{...k,dto:B},get children(){return Array.from(R(k))}}},[]);return o.default.createElement("div",{className:(0,r.default)(u.default.test_output_peek_tree,"monaco-editor")},o.default.createElement(l.BasicRecycleTree,{treeData:T,height:b?.height||500,resolveChildren:D,onClick:(k,B)=>{if(!B)return;const N=B.raw.rawItem;N.dto&&S._didReveal.fire(N.dto)}}))};t.TestTreeContainer=a},65482:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(12288);let m=class{constructor(p){this._contextKeyService=this.globalContextKeyService.createScoped(p),this.contextTestingIsPeekVisible=l.TestingIsPeekVisible.bind(this.contextKeyScoped)}get contextKeyScoped(){return this._contextKeyService}};t.TestContextKey=m,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],m.prototype,"globalContextKeyService",void 0),t.TestContextKey=m=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],m)},17482:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestDecorationsContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(93899),m=e(43718),E=n.__importStar(e(20868)),p=e(90684),_=e(19582),s=e(31324),g=e(72383),c=e(57879),h=e(33429),u=e(61090),d=e(48385),v=e(92597),f=e(97581),a=e(89872),b=e(4836),y=e(86457),{removeAnsiEscapeCodes:S}=m.strings,A="--testMessageDecorationFontFamily",T=(k,B)=>{var x;return((x=B.location)===null||x===void 0?void 0:x.uri.toString())===k.toString()},w=k=>({startLineNumber:k.startLineNumber,endLineNumber:k.startLineNumber,startColumn:0,endColumn:1}),D=(k,B)=>{var x,N;const j=(x=k[0])===null||x===void 0?void 0:x.item.range;if(!j)throw new Error("Test decorations can only be created for tests with a range");let K=0;const U=[];let Y,z=!1;for(let H=0;H<k.length;H++){const X=k[H],J=B[H],re=(N=J?.computedState)!==null&&N!==void 0?N:0;U.push((0,u.labelForTestInState)(X.item.label,re)),K=(0,v.maxPriority)(K,re),z=z||!!J?.retired,!Y&&J?.tasks.some(ce=>ce.messages.length)&&(Y=X.item.extId)}const G=k.length>1||k[0].children.size>0,Q=K===0?G?f.testingRunAllIcon:f.testingRunIcon:f.testingStatesToIcons.get(K),Z=K===0?f.defaultIconColor:f.testStatesToIconColors[K];let $=`${Q} ${Z} testing-run-glyph`;return z&&($+=" retired"),{range:w(j),options:{description:"run-test-decoration",isWholeLine:!0,glyphMarginClassName:$,stickiness:E.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}};class I extends m.Disposable{get line(){return this.editorDecoration.range.startLineNumber}constructor(B,x){super(),this.editorDecoration=B,this.editor=x,this.id=""}click(B){var x;return((x=B.target.position)===null||x===void 0?void 0:x.lineNumber)!==this.line||B.target.type!==_.MouseTargetType.GUTTER_GLYPH_MARGIN?!1:B.event.rightButton?(this.showContextMenu(B),!0):(this.defaultRun(),!0)}getContextMenuActions(B){return this.menuService.createMenu(l.MenuId.TestingGlyphMarginContext,this.contextKeyService)}showContextMenu(B){const x=this.getContextMenuActions(B),N=(0,l.generateMergedCtxMenu)({menus:x});x.dispose(),setTimeout(()=>{this.ctxMenuRenderer.show({anchor:B.event.browserEvent,menuNodes:N,args:this.getContextMenuArgs()})})}getGutterLabel(){}}n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],I.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(l.AbstractMenuService),n.__metadata("design:type",l.AbstractMenuService)],I.prototype,"menuService",void 0),n.__decorate([(0,r.Autowired)(l.ICtxMenuRenderer),n.__metadata("design:type",l.ICtxMenuRenderer)],I.prototype,"ctxMenuRenderer",void 0);class O extends I{constructor(B,x){super(D(B.map(N=>N.test),B.map(N=>N.resultItem)),x),this.tests=B}merge(B,x){return this.tests.push({test:B,resultItem:x}),this.editorDecoration=D(this.tests.map(N=>N.test),this.tests.map(N=>N.resultItem)),this}getContextMenuArgs(){return this.tests.map(B=>B.test.item.extId)}defaultRun(){return this.testService.runTests({tests:this.tests.map(({test:B})=>B),group:2})}defaultDebug(){return this.testService.runTests({tests:this.tests.map(({test:B})=>B),group:4})}}n.__decorate([(0,r.Autowired)(g.TestServiceToken),n.__metadata("design:type",y.TestServiceImpl)],O.prototype,"testService",void 0);let P=class extends I{constructor(B,x,N){super(D([B],[N]),x),this.test=B,this.resultItem=N}merge(B,x){return this.injector.get(O,[[{test:this.test,resultItem:this.resultItem},{test:B,resultItem:x}],this.editor])}getContextMenuArgs(){return[this.test.item.extId]}defaultRun(){return this.testService.runTests({tests:[this.test],group:2})}defaultDebug(){return this.testService.runTests({tests:[this.test],group:4})}};n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],P.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(g.TestServiceToken),n.__metadata("design:type",y.TestServiceImpl)],P.prototype,"testService",void 0),P=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object,Object])],P);let R=class{get monacoEditor(){return this.editor.monacoEditor}constructor(B,x,N,j){this.testMessage=B,this.messageUri=x,this.location=N,this.editor=j,this.decorationId=`testmessage-${(0,m.uuid)()}`,this.id="",this.codeEditorService=this.overrideServicesRegistry.getRegisteredService(o.ServiceNames.CODE_EDITOR_SERVICE);const K=B.type,U=typeof B.message=="string"?S(B.message):(0,v.parseMarkdownText)(B.message.value);this.codeEditorService.registerDecorationType("test-message-decoration",this.decorationId,{after:{contentText:U,color:`${u.testMessageSeverityColors[K]}`,fontSize:`${this.monacoEditor.getOption(s.EditorOption.fontSize)}px`,fontFamily:`var(${A})`,padding:"0px 12px 0px 24px"}},void 0,this.monacoEditor);const Y=this.codeEditorService.resolveDecorationOptions(this.decorationId,!0);Y.hoverMessage=typeof U=="string"?new p.MarkdownString().appendText(U):U,Y.afterContentClassName=`${Y.afterContentClassName} testing-inline-message-content`,Y.zIndex=10,Y.className=`testing-inline-message-margin testing-inline-message-severity-${K}`,Y.isWholeLine=!0,Y.stickiness=E.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,Y.collapseOnReplaceEdit=!0,this.editorDecoration={range:w(N.range),options:Y}}click(B){var x,N;if(B.event.rightButton||!this.messageUri)return!1;if(!((x=B.target.element)===null||x===void 0)&&x.className.includes(this.decorationId)){const j=this.testingPeekOpenerService.peekControllerMap.get((N=this.editor.currentUri)===null||N===void 0?void 0:N.toString());j&&j.toggle(this.messageUri)}return!1}dispose(){this.codeEditorService.removeDecorationType(this.decorationId)}};n.__decorate([(0,r.Autowired)(o.MonacoOverrideServiceRegistry),n.__metadata("design:type",o.MonacoOverrideServiceRegistry)],R.prototype,"overrideServicesRegistry",void 0),n.__decorate([(0,r.Autowired)(c.TestingPeekOpenerServiceToken),n.__metadata("design:type",a.TestingPeekOpenerServiceImpl)],R.prototype,"testingPeekOpenerService",void 0),R=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object,Object,Object])],R);let M=class{get currentUri(){return this.editor.currentUri}constructor(B){this.editor=B,this.disposer=new m.Disposable,this.invalidatedMessages=new WeakSet,this.lastDecorations=[]}contribute(){return this.setDecorations(this.currentUri),this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModel(B=>{this.setDecorations(B.newModelUrl||void 0)})),this.disposer.addDispose(this.editor.monacoEditor.onDidChangeModelContent(B=>{if(!this.currentUri)return;let x=!1;for(const N of B.changes)for(const j of this.lastDecorations)j instanceof R&&j.location.range.startLineNumber>=N.range.startLineNumber&&j.location.range.endLineNumber<=N.range.endLineNumber&&(this.invalidatedMessages.add(j.testMessage),x=!0);x&&this.setDecorations(this.currentUri)})),this.disposer.addDispose(this.editor.monacoEditor.onContextMenu(B=>(B.event.preventDefault(),B.event.stopPropagation(),!1))),this.disposer.addDispose(this.editor.monacoEditor.onMouseDown(B=>{for(const x of this.lastDecorations)if(x.click(B)){B.event.stopPropagation();return}})),this.disposer.addDispose(this.testResultService.onTestChanged(({item:B})=>{this.currentUri&&B.item.uri&&B.item.uri.toString()===this.currentUri.toString()&&this.setDecorations(this.currentUri)})),this.disposer.addDispose(o.Event.any(this.testResultService.onResultsChanged,this.testService.onDidProcessDiff)(()=>this.setDecorations(this.currentUri))),this.disposer}setDecorations(B){if(!B){this.clearDecorations();return}this.editor.monacoEditor.changeDecorations(x=>{var N;const j=[];for(const U of this.testService.collection.all){if(!U.item.range||((N=U.item.uri)===null||N===void 0?void 0:N.toString())!==B.toString())continue;const Y=this.testResultService.getStateById(U.item.extId),z=U.item.range.startLineNumber,G=Y?.[1],Q=j.findIndex(Z=>Z instanceof I&&Z.line===z);Q!==-1?j[Q]=j[Q].merge(U,G):j.push(this.injector.get(P,[U,this.editor.monacoEditor,Y?.[1]]))}const K=this.testResultService.results[0];if(K instanceof d.TestResultImpl)for(const U of K.tests)for(let Y=0;Y<U.tasks.length;Y++){const z=U.tasks[Y];for(let G=0;G<z.messages.length;G++){const Q=z.messages[G];if(!this.invalidatedMessages.has(Q)&&T(B,Q)){const Z=Q.type===1?void 0:(0,h.buildTestUri)({type:1,messageIndex:G,taskIndex:Y,resultId:K.id,testExtId:U.item.extId});j.push(this.injector.get(R,[Q,Z,Q.location,this.editor]))}}}x.deltaDecorations(this.lastDecorations.map(U=>U.id),j.map(U=>U.editorDecoration)).forEach((U,Y)=>j[Y].id=U),this.lastDecorations=j})}clearDecorations(){this.lastDecorations.length&&this.editor.monacoEditor.changeDecorations(B=>{for(const x of this.lastDecorations)B.removeDecoration(x.id);this.lastDecorations=[]})}};t.TestDecorationsContribution=M,n.__decorate([(0,r.Autowired)(g.TestServiceToken),n.__metadata("design:type",y.TestServiceImpl)],M.prototype,"testService",void 0),n.__decorate([(0,r.Autowired)(d.TestResultServiceToken),n.__metadata("design:type",b.TestResultServiceImpl)],M.prototype,"testResultService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],M.prototype,"injector",void 0),t.TestDecorationsContribution=M=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],M)},80162:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestProfileServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(20215);let m=class extends o.Disposable{constructor(){super(...arguments),this.testProfiles=new Map}removeProfile(p,_){const s=this.testProfiles.get(p);if(s)if(_){const g=s.profiles.findIndex(c=>c.profileId!==_);g>=0&&s.profiles.splice(g,1)}else this.testProfiles.delete(p)}addProfile(p,_){let s=this.testProfiles.get(_.controllerId);s?(s.profiles.push(_),s.profiles.sort(l.sorter)):(s={profiles:[_],controller:p},this.testProfiles.set(_.controllerId,s))}getBaseDefaultsProfile(p){const _=[];for(const{profiles:s}of this.testProfiles.values()){const g=s.find(c=>c.group===p);g&&_.push(g)}return _}getControllerProfiles(p){const _=this.testProfiles.get(p);return _?_.profiles:[]}};t.TestProfileServiceImpl=m,t.TestProfileServiceImpl=m=n.__decorate([(0,r.Injectable)()],m)},66724:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTreeViewModelImpl=t.TestTreeItem=void 0;const n=e(85608),r=e(76003),o=e(97267),l=e(41869),m=e(41682),E=e(72383),p=e(82423),_=e(48385),s=e(68755),g=e(4836),c={getOwnState:d=>d instanceof h?d.ownState:0,getCurrentComputedState:d=>d.state,setComputedState:(d,v)=>d.state=v,getCurrentComputedDuration:d=>d.duration,getOwnDuration:d=>d instanceof h?d.ownDuration:void 0,setComputedDuration:(d,v)=>d.duration=v,getChildren:d=>m.Iterable.filter(d.children.values(),v=>v instanceof h),*getParents(d){for(let v=d.parent;v;v=v.parent)yield v}};class h{constructor(v,f){this.test=v,this.parent=f,this.children=new Set,this.state=0,this.ownState=0,this.depth=this.parent?this.parent.depth+1:0,this.update=a=>{(0,s.applyTestItemUpdate)(this.test,a)},this.retired=!1}get label(){return this.test.item.label}get sortText(){return this.test.item.sortText}get tests(){return[this.test]}}t.TestTreeItem=h;let u=class extends l.Disposable{constructor(){super(),this.items=new Map,this.updateEmitter=new l.Emitter,this.onUpdate=this.updateEmitter.event,this.addDispose(this.testService.onDidProcessDiff(v=>this.applyDiff(v)));for(const v of this.testService.collection.all)this.didUpdateItem(this.createItem(v))}get roots(){const v=(0,l.map)(this.testService.collection.rootItems,f=>this.items.get(f.item.extId));return(0,l.filter)(v,l.isDefined)}getRevealDepth(v){return v.depth===0?0:void 0}createItem(v){const f=v.parent?this.items.get(v.parent):void 0;return new h(v,f)}findTestTreeItemByExtId(v){if(!this.treeHandlerApi||!v)return;const f=this.treeHandlerApi.getModel();if(!f)return;const a=f.root.flattenedBranch.find(y=>f.root.getTreeNodeById(y).raw.rawItem.test.item.extId===v);return f.root.getTreeNodeById(a)}didUnStoreItem(v,f){const a=f.parent;return a?.children.delete(f),v.delete(f.test.item.extId),a instanceof h&&(0,p.refreshComputedState)(c,a),f.children}async didUpdateItem(v){var f,a;(f=v.parent)===null||f===void 0||f.children.add(v),this.items.set(v.test.item.extId,v);const b=this.getRevealDepth(v);b!==void 0&&await this.expandElement(v,b);const y=(a=this.testResultService.getStateById(v.test.item.extId))===null||a===void 0?void 0:a[1];y&&(v.retired=y.retired,v.ownState=y.computedState,v.ownDuration=y.ownDuration,(0,p.refreshComputedState)(c,v))}async applyDiff(v){var f;for(const a of v)switch(a[0]){case 0:{const b=this.createItem(a[1]);await this.didUpdateItem(b);const y=this.findTestTreeItemByExtId((f=b.parent)===null||f===void 0?void 0:f.test.item.extId);y&&y.refresh();break}case 1:{const b=a[1],y=this.items.get(b.extId);if(!y)break;y.update(b);break}case 2:{const b=this.items.get(a[1]);if(!b)break;const y=this.findTestTreeItemByExtId(b.test.item.extId);y&&y.parent.unlinkItem(y);const S=[[b]];for(;S.length;)for(const A of S.pop())A instanceof h&&S.push(this.didUnStoreItem(this.items,A));break}}v.length!==0&&this.updateEmitter.fire()}listenTreeHandlerEvent(){if(this.treeHandlerApi){const v=this.treeHandlerApi.getModel();this.addDispose(v.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,async f=>{if(f.expanded){const a=f.raw;if(a.rawItem.test.expand===0)return;await this.expandElement(a.rawItem,a.rawItem.depth),await f.refresh()}})),this.addDispose(this.testResultService.onTestChanged(({item:f})=>{if(f.ownComputedState===0){const y=this.testResultService.getStateById(f.item.extId);y&&(f=y[1])}const a=this.items.get(f.item.extId);if(!a)return;a.retired=f.retired,a.ownState=f.ownComputedState,a.ownDuration=f.ownDuration;const b=a.children.size?void 0:f.computedState;(0,p.refreshComputedState)(c,a,b),v.dispatchChange(),this.revealTreeById(f.item.extId,!1,!1),this.updateEmitter.fire()})),this.addDispose(this.testResultService.onResultsChanged(f=>{var a,b;if("removed"in f){for(const y of[...this.items.values()].sort((S,A)=>A.depth-S.depth)){const S=(a=this.testResultService.getStateById(y.test.item.extId))===null||a===void 0?void 0:a[1];y.ownDuration=S?.ownDuration,(0,p.refreshComputedState)(c,y,(b=S?.ownComputedState)!==null&&b!==void 0?b:0)}v.dispatchChange(),this.updateEmitter.fire()}}))}}revealTreeById(v,f=!0,a=!0){}getTestItem(v){return this.testService.collection.getNodeById(v)}getTestTreeItem(v){return this.items.get(v)}expandElement(v,f){return!(v instanceof h)||v.test.expand===0?Promise.resolve():this.testService.collection.expand(v.test.item.extId,f)}initTreeModel(){return Promise.resolve()}setTreeHandlerApi(v){this.treeHandlerApi=v,this.listenTreeHandlerEvent()}};t.TestTreeViewModelImpl=u,n.__decorate([(0,r.Autowired)(E.TestServiceToken),n.__metadata("design:type",Object)],u.prototype,"testService",void 0),n.__decorate([(0,r.Autowired)(_.TestResultServiceToken),n.__metadata("design:type",g.TestResultServiceImpl)],u.prototype,"testResultService",void 0),t.TestTreeViewModelImpl=u=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],u)},4836:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestResultServiceImpl=t.isRunningTests=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(12288),m=e(20215),E=e(48385),p=e(33429),_=e(1031),{findFirstInSorted:s}=o.arrays,g=h=>h.results.length>0&&h.results[0].completedAt===void 0;t.isRunningTests=g;let c=class{get results(){return this._results}constructor(){this.changeResultEmitter=new o.Emitter,this.testChangeEmitter=new o.Emitter,this._results=[],this.onResultsChanged=this.changeResultEmitter.event,this.onTestChanged=this.testChangeEmitter.event,this.hasAnyResults=l.TestingHasAnyResults.bind(this.contextKeyService),this.isRunning=l.TestingIsRunning.bind(this.contextKeyService)}onComplete(u){this.resort(),this.updateIsRunning(),this.changeResultEmitter.fire({completed:u})}resort(){this.results.sort((u,d)=>{var v,f;return((v=d.completedAt)!==null&&v!==void 0?v:Number.MAX_SAFE_INTEGER)-((f=u.completedAt)!==null&&f!==void 0?f:Number.MAX_SAFE_INTEGER)})}updateIsRunning(){this.isRunning.set((0,t.isRunningTests)(this))}retrieveTest(u){var d;const v=(0,p.parseTestUri)(u);if(!v)return;const{resultId:f,testExtId:a,taskIndex:b,messageIndex:y}=v,S=(d=this.getResult(v.resultId))===null||d===void 0?void 0:d.getStateById(a);if(!(!S||!S.tasks[v.taskIndex]))return new _.TestDto(f,S,b,y)}createTestResult(u){if("targets"in u){const a=(0,o.uuid)(),b=new E.TestResultImpl(a,u);return this.addTestResult(b),b}let d;u.profile&&(d=this.testProfiles.getControllerProfiles(u.controllerId).find(b=>b.profileId===u.profile.id));const v={targets:[],exclude:u.exclude,isAutoRun:!1};d&&v.targets.push({profileGroup:d.group,profileId:d.profileId,controllerId:u.controllerId,testIds:u.include});const f=new E.TestResultImpl(u.id,v);return this.addTestResult(f),f}getResult(u){return this.results.find(d=>d.id===u)}addTestResult(u){if(u.completedAt===void 0)this.results.unshift(u);else{const d=s(this.results,v=>v.completedAt!==void 0&&v.completedAt<=u.completedAt);this.results.splice(d,0,u)}if(this.hasAnyResults.set(!0),u instanceof E.TestResultImpl)u.onComplete(()=>this.onComplete(u)),u.onChange(this.testChangeEmitter.fire,this.testChangeEmitter),this.isRunning.set(!0),this.changeResultEmitter.fire({started:u});else{this.changeResultEmitter.fire({inserted:u});for(const d of u.tests)for(const v of this.results)if(v===u){this.testChangeEmitter.fire({item:d,result:u,reason:2});break}else if(v.getStateById(d.item.extId)!==void 0)break}return u}getStateById(u){for(const d of this.results){const v=d.getStateById(u);if(v&&v.computedState!==0)return[d,v]}}clear(){const u=[],d=[];for(const v of this.results)v.completedAt!==void 0?d.push(v):u.push(v);this._results=u,u.length===0&&this.hasAnyResults.set(!1),this.changeResultEmitter.fire({removed:d})}};t.TestResultServiceImpl=c,n.__decorate([(0,r.Autowired)(m.TestProfileServiceToken),n.__metadata("design:type",Object)],c.prototype,"testProfiles",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],c.prototype,"contextKeyService",void 0),t.TestResultServiceImpl=c=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],c)},86457:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(53736),m=e(12288),E=e(63067),p=e(72383),_=e(20215),s=e(48385),g=e(68755),c=e(95381),h=e(76028);let u=class extends o.Disposable{constructor(){super(),this.controllers=new Map,this.processDiffEmitter=new o.Emitter,this.viewId="",this.collection=new g.MainThreadTestCollection(this.expandTest.bind(this)),this.onDidProcessDiff=this.processDiffEmitter.event,this.controllerCount=m.TestingServiceProviderCount.bind(this.contextKeyService),this.canRefreshTests=m.TestingCanRefreshTests.bind(this.contextKeyService)}getTestController(v){return this.controllers.get(v)}async refreshTests(v){var f;const a=new o.CancellationTokenSource;try{v?await((f=this.controllers.get(v))===null||f===void 0?void 0:f.refreshTests(a.token)):await Promise.all([...this.controllers.values()].map(b=>b.refreshTests(a.token)))}finally{a.dispose(!0)}}registerTestingExplorerView(){return this.mainlayoutService.collectViewComponent,this.mainlayoutService.collectTabbarComponent([{id:c.TestingContainerId}],{iconClass:(0,o.getIcon)("test"),title:(0,o.localize)("test.title"),priority:1,containerId:"workbench.view.testing",component:h.TestingView,activateKeyBinding:"ctrlcmd+shift+t"},o.SlotLocation.left)}registerTestController(v,f){this.controllers.set(v,f),this.controllerCount.set(this.controllers.size),this.updateCanRefresh(),this.controllers.size>0&&!this.viewId&&(this.viewId=this.registerTestingExplorerView());const a=new o.Disposable;return a.addDispose(o.Disposable.create(()=>{const b=[];for(const y of this.collection.rootItems)y.controllerId===v&&b.push([2,y.item.extId]);this.publishDiff(v,b),this.controllers.delete(v)&&(this.controllerCount.set(this.controllers.size),this.updateCanRefresh(),this.controllers.size===0&&this.viewId&&this.mainlayoutService.disposeContainer(this.viewId))})),a.addDispose(f.canRefresh.onDidChange(this.updateCanRefresh,this)),a}updateCanRefresh(){this.canRefreshTests.set(Array.from(this.controllers.values()).some(v=>v.canRefresh))}async expandTest(v,f){var a;await((a=this.controllers.get(p.TestId.fromString(v).controllerId))===null||a===void 0?void 0:a.expandTest(v,f))}publishDiff(v,f){this.collection.apply(f),this.processDiffEmitter.fire(f)}runTests(v,f=o.CancellationToken.None){var a;const b={targets:[],exclude:(a=v.exclude)===null||a===void 0?void 0:a.map(S=>S.item.extId),isAutoRun:v.isAutoRun},y=this.testProfiles.getBaseDefaultsProfile(v.group);for(const S of y){const A=v.tests.filter(T=>(0,_.canUseProfileWithTest)(S,T)).map(T=>T.item.extId);b.targets.push({testIds:A,profileGroup:S.group,profileId:S.profileId,controllerId:S.controllerId})}return this.runResolvedTests(b,f)}async runResolvedTests(v,f){v.exclude||(v.exclude=[]);const a=this.resultService.createTestResult(v);try{const b=new o.CancellationTokenSource(f),y=v.targets.map(S=>{var A;return(A=this.controllers.get(S.controllerId))===null||A===void 0?void 0:A.runTests({runId:a.id,excludeExtIds:v.exclude.filter(T=>!S.testIds.includes(T)),profileId:S.profileId,controllerId:S.controllerId,testIds:S.testIds},b.token).catch(()=>{})});return await Promise.all(y),a}finally{a.markComplete()}}};t.TestServiceImpl=u,n.__decorate([(0,r.Autowired)(E.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainlayoutService",void 0),n.__decorate([(0,r.Autowired)(s.TestResultServiceToken),n.__metadata("design:type",Object)],u.prototype,"resultService",void 0),n.__decorate([(0,r.Autowired)(_.TestProfileServiceToken),n.__metadata("design:type",Object)],u.prototype,"testProfiles",void 0),n.__decorate([(0,r.Autowired)(l.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),t.TestServiceImpl=u=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],u)},76388:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingContribution=t.TestingOutputPeekDocumentProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),l=e(30144),m=e(12288),E=e(93899),p=e(43718),_=e(57517),s=e(14951),g=e(63067),c=e(93835),h=e(81001),u=e(72383),d=e(85941),v=e(48385),f=e(57879),a=e(16558),b=e(33429),y=e(1031),S=e(89872),A=e(33218),T=e(17482),w=e(4836),D=e(86457);let I=class{constructor(){this._onDidChangeContent=new p.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}provideEditorDocumentModelContent(R,M){const k=this.testResultService.retrieveTest(R);if(!k)return"";const B=k.messages[k.messageIndex];if(k.isDiffable||typeof B.message=="string")return"";const x=B.message;return x?x.value.replace(/\t/g,""):""}isReadonly(R){return!0}handlesScheme(R){return R===b.TEST_DATA_SCHEME}};t.TestingOutputPeekDocumentProvider=I,n.__decorate([(0,r.Autowired)(v.TestResultServiceToken),n.__metadata("design:type",w.TestResultServiceImpl)],I.prototype,"testResultService",void 0),t.TestingOutputPeekDocumentProvider=I=n.__decorate([(0,r.Injectable)()],I);let O=class{initialize(){this.testTreeViewModel.initTreeModel()}registerTestResultPanel(){if(this.layoutService.getTabbarHandler(l.TEST_RESULT_CONTAINER_ID))return;const R=this.layoutService.collectTabbarComponent([{id:l.TEST_RESULT_CONTAINER_ID,component:A.TestResultPanel}],{containerId:l.TEST_RESULT_CONTAINER_ID,title:(0,o.localize)("test.results"),hidden:!1},"bottom"),M=this.layoutService.getTabbarHandler(R);M?.activate()}onDidStart(){this.testResultService.onResultsChanged(()=>{this.registerTestResultPanel()}),this.testResultService.onTestChanged(()=>{this.registerTestResultPanel()})}registerCommands(R){R.registerCommand(d.RuntTestCommand,{execute:async B=>{const x=this.testTreeViewModel.getTestItem(B);x&&await this.testService.runTests({group:2,tests:[x]})}}),R.registerCommand(d.DebugTestCommand,{execute:async B=>{const x=this.testTreeViewModel.getTestItem(B);x&&await this.testService.runTests({group:4,tests:[x]})}}),R.registerCommand(d.GoToTestCommand,{execute:async B=>{const x=this.testTreeViewModel.getTestItem(B);if(!x)return;const{range:N,uri:j}=x.item;if(!j)return;const K=await this.filesystem.getFileStat(j.toString());if(K){if(K.type===o.FileType.Directory){this.commandService.executeCommand("revealInExplorer",j);return}K.type===o.FileType.File&&this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,o.URI.parse(j.toString()),{range:N,focus:!0})}},isVisible:()=>!1}),R.registerCommand(d.PeekTestError,{execute:async B=>{this.testingPeekOpenerService.open()},isVisible:()=>!1}),R.registerCommand(d.ClosePeekTest,{execute:async B=>{var x,N;if(B=B??((N=(x=this.editorService.currentEditor)===null||x===void 0?void 0:x.currentUri)===null||N===void 0?void 0:N.toString()),!B)return;const j=this.testingPeekOpenerService.peekControllerMap.get(B);j&&j.removePeek()},isVisible:()=>!1}),R.registerCommand(d.TestingRunCurrentFile,{execute:async()=>{M(2)}}),R.registerCommand(d.TestingDebugCurrentFile,{execute:async()=>{M(4)}});const M=B=>{var x;const N=this.editorService.currentEditor,j=N?.monacoEditor,K=j?.getPosition(),U=j?.getModel();if(!K||!U||!("uri"in U))return;const Y=U.uri.toString();for(const z of this.testService.collection.all)((x=z.item.uri)===null||x===void 0?void 0:x.toString())===Y&&this.testService.runTests({tests:[z],group:B})};R.registerCommand(d.GoToPreviousMessage,{execute:async B=>{var x,N;if(B=B??((N=(x=this.editorService.currentEditor)===null||x===void 0?void 0:x.currentUri)===null||N===void 0?void 0:N.toString()),!B)return;const j=this.testingPeekOpenerService.peekControllerMap.get(B);j&&j.previous()}}),R.registerCommand(d.GoToNextMessage,{execute:async B=>{var x,N;if(B=B??((N=(x=this.editorService.currentEditor)===null||x===void 0?void 0:x.currentUri)===null||N===void 0?void 0:N.toString()),!B)return;const j=this.testingPeekOpenerService.peekControllerMap.get(B);j&&j.next()}}),R.registerCommand(d.ClearTestResults,{execute:async B=>{this.testResultService.clear(),this.commandService.executeCommand(d.ClosePeekTest.id,B)}}),R.registerCommand(d.OpenMessageInEditor,{execute:async B=>{var x,N;if(B=B??((N=(x=this.editorService.currentEditor)===null||x===void 0?void 0:x.currentUri)===null||N===void 0?void 0:N.toString()),!B)return;const j=this.testingPeekOpenerService.peekControllerMap.get(B);j&&j.openCurrentInEditor()}});const k=async B=>{const x=[...this.testService.collection.rootItems];x.length&&await this.testService.runTests({tests:x,group:B})};R.registerCommand(d.RefreshTestsCommand,{execute:async()=>{await this.testService.refreshTests()}}),R.registerCommand(d.RuntAllTestCommand,{execute:async()=>{await k(2)}}),R.registerCommand(d.DebugAllTestCommand,{execute:async()=>{await k(4)}})}registerKeybindings(R){R.registerKeybinding({command:d.ClosePeekTest.id,keybinding:"esc",when:m.TestingIsPeekVisible.equalsTo(!0)})}registerMenus(R){R.registerMenuItem(E.MenuId.TestingGlyphMarginContext,{command:d.RuntTestCommand.id,group:"1_has_decoration",order:1}),R.registerMenuItem(E.MenuId.TestingGlyphMarginContext,{command:d.DebugTestCommand.id,group:"1_has_decoration",order:2}),R.registerMenuItem(E.MenuId.TestPeekTitleContext,{command:d.GoToPreviousMessage.id,iconClass:d.GoToPreviousMessage.iconClass,group:"navigation",order:5}),R.registerMenuItem(E.MenuId.TestPeekTitleContext,{command:d.GoToNextMessage.id,iconClass:d.GoToNextMessage.iconClass,group:"navigation",order:6}),R.registerMenuItem(E.MenuId.TestPeekTitleContext,{command:d.ClearTestResults.id,iconClass:d.ClearTestResults.iconClass,group:"navigation",order:7}),R.registerMenuItem(E.MenuId.TestPeekTitleContext,{command:d.OpenMessageInEditor.id,iconClass:d.OpenMessageInEditor.iconClass,group:"navigation",order:9})}registerToolbarItems(R){R.registerItem({id:d.RefreshTestsCommand.id,command:d.RefreshTestsCommand.id,viewId:"workbench.view.testing",when:m.TestingCanRefreshTests.equalsTo(!0)}),R.registerItem({id:d.RuntAllTestCommand.id,command:d.RuntAllTestCommand.id,viewId:"workbench.view.testing"}),R.registerItem({id:d.DebugAllTestCommand.id,command:d.DebugAllTestCommand.id,viewId:"workbench.view.testing"}),R.registerItem({id:d.ClearTestResults.id,command:d.ClearTestResults.id,viewId:"workbench.view.testing"})}registerEditorFeature(R){R.registerEditorFeatureContribution({contribute:M=>this.injector.get(T.TestDecorationsContribution,[M]).contribute()}),R.registerEditorFeatureContribution({contribute:M=>this.injector.get(y.TestOutputPeekContribution,[M]).contribute()})}registerEditorDocumentModelContentProvider(R){R.registerEditorDocumentModelContentProvider(this.testingOutputPeekDocumentProvider)}registerEditorComponent(R){R.registerEditorComponent({uid:c.MARKDOWN_EDITOR_COMPONENT_ID,component:h.MarkdownEditorComponent,scheme:b.TEST_DATA_SCHEME}),R.registerEditorComponentResolver(b.TEST_DATA_SCHEME,(M,k)=>{k.push({type:_.EditorOpenType.component,componentId:c.MARKDOWN_EDITOR_COMPONENT_ID,weight:10})})}registerResource(R){R.registerResourceProvider({scheme:b.TEST_DATA_SCHEME,provideResource:async M=>({uri:M,icon:(0,o.getIcon)("file-text"),name:`Preview ${M.displayName}`})})}};t.TestingContribution=O,n.__decorate([(0,r.Autowired)(a.TestTreeViewModelToken),n.__metadata("design:type",Object)],O.prototype,"testTreeViewModel",void 0),n.__decorate([(0,r.Autowired)(s.IFileServiceClient),n.__metadata("design:type",Object)],O.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],O.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],O.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(f.TestingPeekOpenerServiceToken),n.__metadata("design:type",S.TestingPeekOpenerServiceImpl)],O.prototype,"testingPeekOpenerService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",I)],O.prototype,"testingOutputPeekDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],O.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(u.TestServiceToken),n.__metadata("design:type",D.TestServiceImpl)],O.prototype,"testService",void 0),n.__decorate([(0,r.Autowired)(v.TestResultServiceToken),n.__metadata("design:type",w.TestResultServiceImpl)],O.prototype,"testResultService",void 0),n.__decorate([(0,r.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],O.prototype,"layoutService",void 0),t.TestingContribution=O=n.__decorate([(0,r.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.CommandContribution,_.BrowserEditorContribution,E.MenuContribution,o.KeybindingContribution,o.TabBarToolbarContribution)],O)},85941:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RefreshTestsCommand=t.DebugAllTestCommand=t.RuntAllTestCommand=t.OpenMessageInEditor=t.ClearTestResults=t.GoToNextMessage=t.GoToPreviousMessage=t.ClosePeekTest=t.PeekTestError=t.TestingDebugCurrentFile=t.TestingRunCurrentFile=t.GoToTestCommand=t.DebugTestCommand=t.RuntTestCommand=void 0;const n=e(41869);t.RuntTestCommand={id:"testing.run.test",label:"Run Test"},t.DebugTestCommand={id:"testing.debug.test",label:"Debug Test"},t.GoToTestCommand={id:"testing.goto.test",label:"Go To Test"},t.TestingRunCurrentFile={id:"testing.runCurrentFile",label:"Run Tests in Current File"},t.TestingDebugCurrentFile={id:"testing.debugCurrentFile",label:"Debug Tests in Current File"},t.PeekTestError={id:"testing.peek.test.error",label:"Peek Output"},t.ClosePeekTest={id:"testing.peek.test.close",label:"Close Peek Output"},t.GoToPreviousMessage={id:"testing.goToPreviousMessage",label:"Go to Previous Test Failure",iconClass:(0,n.getIcon)("arrowup")},t.GoToNextMessage={id:"testing.goToNextMessage",label:"Go to Next Test Failure",iconClass:(0,n.getIcon)("arrowdown")},t.ClearTestResults={id:"testing.clearTestResults",label:"Clear All Results",iconClass:(0,n.getExternalIcon)("clear-all")},t.OpenMessageInEditor={id:"testing.openMessageInEditor",label:"Open in Editor",iconClass:(0,n.getExternalIcon)("link-external")},t.RuntAllTestCommand={id:"testing.runAll",label:"Run All Test",iconClass:(0,n.getExternalIcon)("run-all")},t.DebugAllTestCommand={id:"testing.debugAll",label:"Debug All Test",iconClass:(0,n.getIcon)("debug-alt-small")},t.RefreshTestsCommand={id:"testing.refresshTests",label:"Refresh Tests",iconClass:(0,n.getIcon)("refresh")}},61090:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testMessageSeverityColors=t.testConfigurationGroupNames=t.labelForTestInState=t.testStateNames=void 0;const n=e(43718);t.testStateNames={6:(0,n.localize)("testState.errored","Errored"),4:(0,n.localize)("testState.failed","Failed"),3:(0,n.localize)("testState.passed","Passed"),1:(0,n.localize)("testState.queued","Queued"),2:(0,n.localize)("testState.running","Running"),5:(0,n.localize)("testState.skipped","Skipped"),0:(0,n.localize)("testState.unset","Not yet run")};const r=(o,l)=>'label then the unit tests state, for example "Addition Tests (Running)"';t.labelForTestInState=r,t.testConfigurationGroupNames={4:(0,n.localize)("testGroup.debug","Debug"),2:(0,n.localize)("testGroup.run","Run"),8:(0,n.localize)("testGroup.coverage","Coverage")},t.testMessageSeverityColors={0:"#F14C4C",1:"#33333380"}},82423:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refreshComputedState=t.getComputedDuration=t.getComputedState=t.isDurationAccessor=void 0;const n=e(41682),r=e(92597),o=p=>"getOwnDuration"in p;t.isDurationAccessor=o;const l=(p,_,s=!1)=>{var g;let c=p.getCurrentComputedState(_);if(c===void 0||s){c=(g=p.getOwnState(_))!==null&&g!==void 0?g:0;for(const h of p.getChildren(_))c=(0,r.maxPriority)(c,(0,t.getComputedState)(p,h));p.setComputedState(_,c)}return c};t.getComputedState=l;const m=(p,_,s=!1)=>{let g=p.getCurrentComputedDuration(_);if(g===void 0||s){const c=p.getOwnDuration(_);if(c!==void 0)g=c;else{g=void 0;for(const h of p.getChildren(_)){const u=(0,t.getComputedDuration)(p,h);u!==void 0&&(g=(g||0)+u)}}p.setComputedDuration(_,g)}return g};t.getComputedDuration=m;const E=(p,_,s)=>{const g=p.getCurrentComputedState(_),c=r.statePriority[g],h=s??(0,t.getComputedState)(p,_,!0),u=r.statePriority[h],d=new Set;if(u!==c){if(p.setComputedState(_,h),d.add(_),u>c)for(const v of p.getParents(_)){const f=p.getCurrentComputedState(v);if(f!==void 0&&r.statePriority[f]>=u)break;p.setComputedState(v,h),d.add(v)}else if(u<c)for(const v of p.getParents(_)){const f=p.getCurrentComputedState(v);if(f===void 0||r.statePriority[f]>c)break;p.setComputedState(v,(0,t.getComputedState)(p,v,!0)),d.add(v)}}if((0,t.isDurationAccessor)(p))for(const v of n.Iterable.concat(n.Iterable.single(_),p.getParents(_))){const f=p.getCurrentComputedDuration(v),a=(0,t.getComputedDuration)(p,v,!0);if(f===a)break;p.setComputedDuration(v,a),d.add(v)}return d};t.refreshComputedState=E},72383:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestPeekMessageToken=t.TestDecorationsToken=t.TestServiceToken=void 0,e(85608).__exportStar(e(87902),t),t.TestServiceToken=Symbol("TestService"),t.TestDecorationsToken=Symbol("TestDecorationsToken"),t.TestPeekMessageToken=Symbol("TestPeekMessageToken")},30005:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableValue=void 0;const n=e(43718);class r extends n.Disposable{get value(){return this._value}set value(l){l!==this._value&&(this._value=l,this.changeEmitter.fire(l))}constructor(l){super(),this._value=l,this.changeEmitter=this.registerDispose(new n.Emitter),this.onDidChange=this.changeEmitter.event}}t.ObservableValue=r},20215:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestProfileServiceToken=t.canUseProfileWithTest=t.sorter=void 0;const n=e(48465),r=(l,m)=>l.isDefault!==m.isDefault?l.isDefault?-1:1:l.label.localeCompare(m.label);t.sorter=r;const o=(l,m)=>l.controllerId===m.controllerId&&(n.TestId.isRoot(m.item.extId)||!l.tag||m.item.tags.includes(l.tag));t.canUseProfileWithTest=o,t.TestProfileServiceToken=Symbol("TestProfileService")},48385:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestResultImpl=t.resultItemParents=t.maxCountPriority=t.TestResultServiceToken=t.makeEmptyCounts=void 0;const n=e(43718),r=e(82423),o=e(92597),l=()=>{const s={};for(const g of o.statesInOrder)s[g]=0;return s};t.makeEmptyCounts=l,t.TestResultServiceToken=Symbol("TestResultService");const m=(s,g,c)=>({parent:c,controllerId:s,expand:0,item:{...g},children:[],tasks:[],ownComputedState:0,computedState:0,retired:!1}),E=s=>{for(const g of o.statesInOrder)if(s[g]>0)return g;return 0};t.maxCountPriority=E;const p=function*(s,g){let c=g;for(;c;)yield c,c=c.parent?s.getStateById(c.parent):void 0};t.resultItemParents=p;class _{get completedAt(){return this._completedAt}get tests(){return this.testById.values()}constructor(g,c){this.id=g,this.request=c,this.completeEmitter=new n.Emitter,this.changeEmitter=new n.Emitter,this.testById=new Map,this.name=(0,n.formatLocalize)("test.result.runFinished",new Date().toLocaleString()),this.tasks=[],this.onChange=this.changeEmitter.event,this.onComplete=this.completeEmitter.event,this.counts=(0,t.makeEmptyCounts)(),this.outputs=[],this.computedStateAccessor={getOwnState:h=>h.ownComputedState,getCurrentComputedState:h=>h.computedState,setComputedState:(h,u)=>h.computedState=u,getChildren:h=>h.children,getParents:h=>{const{testById:u}=this;return function*(){for(let d=h.parent;d;){const v=u.get(d);if(!v)break;yield v,d=v.parent}}()}}}setAllToState(g,c,h){const u=this.mustGetTaskIndex(c);for(const d of this.testById.values())h(d.tasks[u],d)&&this.fireUpdateAndRefresh(d,u,g)}addTestToRun(g,c,h){var u;const d=m(g,c,h);return this.testById.set(c.extId,d),this.counts[0]++,h&&((u=this.testById.get(h))===null||u===void 0||u.children.push(d)),this.tasks.length&&this.tasks.forEach(()=>{d.tasks.push({duration:void 0,messages:[],state:1})}),d}mustGetTaskIndex(g){const c=this.tasks.findIndex(h=>h.id===g);if(c===-1)throw new Error(`Unknown task ${g} in updateState`);return c}fireUpdateAndRefresh(g,c,h){const u=g.ownComputedState;g.tasks[c].state=h;const d=(0,o.maxPriority)(...g.tasks.map(v=>v.state));d!==u&&(g.ownComputedState=d,this.counts[u]--,this.counts[d]++,(0,r.refreshComputedState)(this.computedStateAccessor,g).forEach(v=>this.changeEmitter.fire(v===g?{item:g,result:this,reason:3,previous:u}:{item:v,result:this,reason:2})))}getStateById(g){return this.testById.get(g)}getOutput(){return this.outputs.join("")}toJSON(){throw new Error("Method not implemented.")}updateState(g,c,h,u){const d=this.testById.get(g);if(!d)return;const v=this.mustGetTaskIndex(c);u!==void 0&&(d.tasks[v].duration=u,d.ownDuration=Math.max(d.ownDuration||0,u)),this.fireUpdateAndRefresh(d,v,h)}appendMessage(g,c,h){const u=this.testById.get(g);u&&(u.tasks[this.mustGetTaskIndex(c)].messages.push(h),this.changeEmitter.fire({item:u,result:this,reason:3,previous:u.ownComputedState}))}appendOutput(g,c,h,u){this.outputs.push(g)}addTestChainToRun(g,c){let h=this.testById.get(c[0].extId);h||(h=this.addTestToRun(g,c[0],null));for(let u=1;u<c.length;u++)h=this.addTestToRun(g,c[u],h.item.extId);for(let u=0;u<this.tasks.length;u++)this.fireUpdateAndRefresh(h,u,1)}addTask(g){const c=this.tasks.length;this.tasks.push({...g,coverage:void 0,otherMessages:[]});for(const h of this.tests)h.tasks.push({duration:void 0,messages:[],state:0}),this.fireUpdateAndRefresh(h,c,1)}markTaskComplete(g){this.tasks[this.mustGetTaskIndex(g)].running=!1,this.setAllToState(0,g,c=>c.state===1||c.state===2)}markComplete(){if(this._completedAt!==void 0)throw new Error("cannot complete a test result multiple times");for(const g of this.tasks)g.running&&this.markTaskComplete(g.id);this._completedAt=Date.now(),this.completeEmitter.fire()}}t.TestResultImpl=_},68755:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTestCollection=t.AbstractIncrementalTestCollection=t.IncrementalChangeCollector=t.applyTestItemUpdate=t.testRunProfileBitsetList=void 0;const n=e(43718);t.testRunProfileBitsetList=[2,4,8,16];const r=(E,p)=>{p.expand!==void 0&&(E.expand=p.expand),p.item!==void 0&&(E.item=E.item?Object.assign(E.item,p.item):p.item)};t.applyTestItemUpdate=r;class o{add(p){}update(p){}remove(p,_){}complete(){}}t.IncrementalChangeCollector=o;class l{constructor(){this._tags=new Map,this.items=new Map,this.roots=new Set,this.busyControllerCount=0,this.pendingRootCount=0,this.tags=this._tags}apply(p){const _=this.createChangeCollector();for(const s of p)switch(s[0]){case 0:{const g=s[1];if(g.parent){if(this.items.has(g.parent)){const c=this.items.get(g.parent);c.children.add(g.item.extId);const h=this.createItem(g,c);this.items.set(g.item.extId,h),_.add(h)}}else{const c=this.createItem(g);this.roots.add(c),this.items.set(g.item.extId,c),_.add(c)}g.expand===2&&this.busyControllerCount++;break}case 1:{const g=s[1],c=this.items.get(g.extId);if(!c)break;g.expand!==void 0&&(c.expand===2&&this.busyControllerCount--,g.expand===2&&this.busyControllerCount++),(0,t.applyTestItemUpdate)(c,g),_.update(c);break}case 2:{const g=this.items.get(s[1]);if(!g)break;g.parent?this.items.get(g.parent).children.delete(g.item.extId):this.roots.delete(g);const c=[[s[1]]];for(;c.length;)for(const h of c.pop()){const u=this.items.get(h);u&&(c.push(u.children),this.items.delete(h),_.remove(u,u!==g),u.expand===2&&this.busyControllerCount--)}break}case 4:this.retireTest(s[1]);break;case 3:this.updatePendingRoots(s[1]);break;case 5:this._tags.set(s[1].id,s[1]);break;case 6:this._tags.delete(s[1]);break}_.complete()}retireTest(p){}updatePendingRoots(p){this.pendingRootCount+=p}createChangeCollector(){return new o}}t.AbstractIncrementalTestCollection=l;class m extends l{get busyProviders(){return this.busyControllerCount}get rootItems(){return this.roots}get all(){return this.getIterator()}get rootIds(){return(0,n.map)(this.roots.values(),p=>p.item.extId)}constructor(p){super(),this.expandActual=p,this.busyProvidersChangeEmitter=new n.Emitter,this.retireTestEmitter=new n.Emitter,this.expandPromises=new WeakMap,this.onBusyProvidersChange=this.busyProvidersChangeEmitter.event,this.onDidRetireTest=this.retireTestEmitter.event}expand(p,_){const s=this.items.get(p);if(!s)return Promise.resolve();const g=this.expandPromises.get(s);if(g&&g.pendingLvl>=_)return g.prom;const c=this.expandActual(s.item.extId,_),h={doneLvl:g?g.doneLvl:-1,pendingLvl:_,prom:c};return this.expandPromises.set(s,h),c.then(()=>{h.doneLvl=_})}getNodeById(p){return this.items.get(p)}getReviverDiff(){const p=[[3,this.pendingRootCount]],_=[this.rootIds];for(;_.length;)for(const s of _.pop()){const g=this.items.get(s);p.push([0,{controllerId:g.controllerId,expand:g.expand,item:g.item,parent:g.parent}]),_.push(g.children)}return p}apply(p){const _=this.busyControllerCount;super.apply(p),_!==this.busyControllerCount&&this.busyProvidersChangeEmitter.fire(this.busyControllerCount)}clear(){const p=[];for(const _ of this.roots)p.push([2,_.item.extId]);return this.roots.clear(),this.items.clear(),p}createItem(p){return{...p,children:new Set}}retireTest(p){this.retireTestEmitter.fire(p)}*getIterator(){const p=[this.rootIds];for(;p.length;)for(const _ of p.pop()){const s=this.getNodeById(_);yield s,p.push(s.children)}}}t.MainThreadTestCollection=m},87902:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestId=void 0;class e{static fromExtHostTestItem(r,o,l=r.parent){if(r.id===o)return new e([o]);const m=[r.id];for(let E=l;E&&E.id!==o;E=E.parent)m.push(E.id);return m.push(o),new e(m.reverse())}static isRoot(r){return!r.includes("\0")}static fromString(r){return new e(r.split("\0"))}static join(r,o){return new e([...r.path,o])}static joinToString(r,o){return r.toString()+"\0"+o}static compare(r,o){return r===o?0:o.startsWith(r+"\0")?2:r.startsWith(o+"\0")?3:1}constructor(r,o=r.length){if(this.path=r,this.viewEnd=o,r.length===0||o<1)throw new Error("cannot create test with empty path")}get parentId(){return this.viewEnd>1?new e(this.path,this.viewEnd-1):this}get localId(){return this.path[this.viewEnd-1]}get controllerId(){return this.path[0]}get isRoot(){return this.viewEnd===1}*idsFromRoot(){for(let r=1;r<=this.viewEnd;r++)yield new e(this.path,r)}compare(r){if(typeof r=="string")return e.compare(this.toString(),r);for(let o=0;o<r.viewEnd&&o<this.viewEnd;o++)if(r.path[o]!==this.path[o])return 1;return r.viewEnd>this.viewEnd?2:r.viewEnd<this.viewEnd?3:0}toJSON(){return this.toString()}toString(){if(!this.stringifed){this.stringifed=this.path[0];for(let r=1;r<this.viewEnd;r++)this.stringifed+="\0",this.stringifed+=this.path[r]}return this.stringifed}}t.TestId=e},95381:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingExplorerInlineMenus=t.TestingContainerId=t.TestingViewId=void 0;const n=e(97267),r=e(85941);t.TestingViewId="@opensumi/ide-testing",t.TestingContainerId="testing",t.TestingExplorerInlineMenus=[{icon:"start",title:"Run Test",command:r.RuntTestCommand.id,position:n.IBasicInlineMenuPosition.TREE_CONTAINER},{icon:"debug-alt-small",title:"Debug Test",command:r.DebugTestCommand.id,position:n.IBasicInlineMenuPosition.TREE_CONTAINER},{icon:"openfile",title:"Go To Test",command:r.GoToTestCommand.id,position:n.IBasicInlineMenuPosition.TREE_CONTAINER}]},57879:(L,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingPeekOpenerServiceToken=void 0,t.TestingPeekOpenerServiceToken=Symbol("TestingPeekOpenerService")},92597:(L,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hintMessagePeekHeight=t.isDiffable=t.parseMarkdownText=t.firstLine=t.isRunningState=t.statesInOrder=t.maxPriority=t.cmpPriority=t.stateNodes=t.isStateWithResult=t.isFailedState=t.statePriority=void 0;const n=e(84605),r=e(43718),{count:o}=r.strings;t.statePriority={2:6,6:5,4:4,1:3,3:2,0:1,5:0};const l=v=>v===6||v===4;t.isFailedState=l;const m=v=>v===6||v===4||v===3;t.isStateWithResult=m,t.stateNodes=Object.entries(t.statePriority).reduce((v,[f,a])=>{const b=Number(f);return v[b]={statusNode:!0,state:b,priority:a},v},{});const E=(v,f)=>t.statePriority[f]-t.statePriority[v];t.cmpPriority=E;const p=(...v)=>{switch(v.length){case 0:return 0;case 1:return v[0];case 2:return t.statePriority[v[0]]>t.statePriority[v[1]]?v[0]:v[1];default:{let f=v[0];for(let a=1;a<v.length;a++)t.statePriority[f]<t.statePriority[v[a]]&&(f=v[a]);return f}}};t.maxPriority=p,t.statesInOrder=Object.keys(t.statePriority).map(v=>Number(v)).sort(t.cmpPriority);const _=v=>v===1||v===2;t.isRunningState=_;const s=v=>{const f=v.indexOf(`