All files / output zcl_abapgit_flow_page_utils.clas.mjs

9.64% Statements 22/228
100% Branches 2/2
7.14% Functions 1/14
9.64% Lines 22/228

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 2281x 1x 1x 1x 1x 1x 1x 1x       1x     1x     1x 1x   1x 1x             1x       1x     1x                                                                                                                                             1x     1x                                                                                                                                                                                                                                       1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_flow_page_utils.clas.abap
class zcl_abapgit_flow_page_utils {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_FLOW_PAGE_UTILS';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"RENDER_TABLE": {"visibility": "U", "parameters": {"RI_HTML": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});}, "is_optional": " "}, "IT_FILES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
  "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt");}, "is_optional": " "}, "IT_TRANSPORT_DUPLICATES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "obj_type": new abap.types.Character(4, {}),
  "obj_name": new abap.types.Character(40, {}),
  "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_definitions=>ty_item_signature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_transport_duplicates_tt");}, "is_optional": " "}, "IS_USER_SETTINGS": {"type": () => {return new abap.types.Structure({
  "only_my_transports": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "hide_full_matches": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "hide_matching_files": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_persist_user=>ty_flow_settings", undefined, {}, {});}, "is_optional": " "}, "IV_REPO_KEY": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"});}, "is_optional": " "}}},
  "CALL_DIFF": {"visibility": "U", "parameters": {"RS_HANDLED": {"type": () => {return new abap.types.Structure({
  "page": new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"}),
  "state": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT_HANDLER=>TY_HANDLING_RESULT-STATE"})}, "zif_abapgit_gui_event_handler=>ty_handling_result", undefined, {}, {});}, "is_optional": " "}, "II_EVENT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_EVENT"});}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async render_table(INPUT) {
    return zcl_abapgit_flow_page_utils.render_table(INPUT);
  }
  static async render_table(INPUT) {
    let ri_html = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_HTML", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_HTML"});
    let it_files = INPUT?.it_files;
    if (it_files?.getQualifiedName === undefined || it_files.getQualifiedName() !== "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME_TT") { it_files = undefined; }
    if (it_files === undefined) { it_files = abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt").set(INPUT.it_files); }
    let it_transport_duplicates = abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_definitions=>ty_item_signature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_transport_duplicates_tt");
    if (INPUT && INPUT.it_transport_duplicates) {it_transport_duplicates.set(INPUT.it_transport_duplicates);}
    let is_user_settings = new abap.types.Structure({
    "only_my_transports": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "hide_full_matches": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "hide_matching_files": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_persist_user=>ty_flow_settings", undefined, {}, {});
    if (INPUT && INPUT.is_user_settings) {is_user_settings.set(INPUT.is_user_settings);}
    let iv_repo_key = INPUT?.iv_repo_key;
    if (iv_repo_key?.getQualifiedName === undefined || iv_repo_key.getQualifiedName() !== "ZIF_ABAPGIT_PERSISTENCE=>TY_VALUE") { iv_repo_key = undefined; }
    if (iv_repo_key === undefined) { iv_repo_key = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}).set(INPUT.iv_repo_key); }
    let ls_path_name = new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {});
    let lv_status = new abap.types.String({qualifiedName: "STRING"});
    let lv_param = new abap.types.String({qualifiedName: "STRING"});
    let li_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});
    let ls_item = new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {});
    let lv_duplicate = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    abap.statements.assert(abap.compare.initial(iv_repo_key) === false);
    li_repo.set((await (await abap.Classes['ZCL_ABAPGIT_REPO_SRV'].get_instance()).get().zif_abapgit_repo_srv$get({iv_key: iv_repo_key})));
    ri_html.set(await (new abap.Classes['ZCL_ABAPGIT_HTML']()).constructor_());
    await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`<table>`)});
    await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`<tr><td><u>Filename</u></td><td><u>Remote</u></td><td><u>Local</u></td><td></td><td></td></tr>`)});
    for await (const unique740 of abap.statements.loop(it_files)) {
      ls_path_name.set(unique740);
      lv_status.clear();
      if (abap.compare.eq(ls_path_name.get().remote_sha1, ls_path_name.get().local_sha1)) {
        if (abap.compare.eq(is_user_settings.get().hide_matching_files, abap.builtin.abap_true)) {
          continue;
        }
        lv_status.set(abap.CharacterFactory.get(5, 'Match'));
      } else if (abap.compare.initial(ls_path_name.get().remote_sha1) === false && abap.compare.initial(ls_path_name.get().local_sha1) === false) {
        lv_param.set((await abap.Classes['ZCL_ABAPGIT_HTML_ACTION_UTILS'].file_encode({iv_key: iv_repo_key, ig_file: ls_path_name})));
        lv_status.set((await ri_html.get().zif_abapgit_html$a({iv_txt: abap.CharacterFactory.get(4, 'Diff'), iv_act: new abap.types.String().set(`${abap.templateFormatting(abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_action.get().go_file_diff)}?${abap.templateFormatting(lv_param)}&remote_sha1=${abap.templateFormatting(ls_path_name.get().remote_sha1)}`)})));
      }
      await abap.Classes['ZCL_ABAPGIT_FILENAME_LOGIC'].file_to_object({iv_filename: ls_path_name.get().filename, iv_path: ls_path_name.get().path, iv_devclass: (await li_repo.get().zif_abapgit_repo$get_package()), io_dot: (await li_repo.get().zif_abapgit_repo$get_dot_abapgit()), es_item: ls_item});
      abap.statements.readTable(it_transport_duplicates,{withKey: (i) => {return abap.compare.eq(i.obj_type, ls_item.get().obj_type) && abap.compare.eq(i.obj_name, ls_item.get().obj_name);},
        withKeyValue: [{key: (i) => {return i.obj_type}, value: ls_item.get().obj_type},{key: (i) => {return i.obj_name}, value: ls_item.get().obj_name}],
        usesTableLine: false,
        withKeySimple: {"obj_type": ls_item.get().obj_type,"obj_name": ls_item.get().obj_name}});
      lv_duplicate.set(abap.builtin.boolc(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))));
      await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`<tr><td><tt>${abap.templateFormatting(ls_path_name.get().path)}${abap.templateFormatting(ls_path_name.get().filename)}</tt></td><td>${abap.templateFormatting(ls_path_name.get().remote_sha1.getOffset({length: 7}))}</td><td>${abap.templateFormatting(ls_path_name.get().local_sha1.getOffset({length: 7}))}</td><td>${abap.templateFormatting(lv_status)}</td><td>`)});
      if (abap.compare.eq(lv_duplicate, abap.builtin.abap_true)) {
        await ri_html.get().zif_abapgit_html$add_icon({iv_name: abap.CharacterFactory.get(24, 'exclamation-triangle/red'), iv_hint: abap.CharacterFactory.get(23, 'In duplicate transports')});
      }
      await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`</td></tr>`)});
    }
    await ri_html.get().zif_abapgit_html$add({ig_chunk: new abap.types.String().set(`</table>`)});
    return ri_html;
  }
  async call_diff(INPUT) {
    return zcl_abapgit_flow_page_utils.call_diff(INPUT);
  }
  static async call_diff(INPUT) {
    let rs_handled = new abap.types.Structure({
    "page": new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_RENDERABLE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_RENDERABLE"}),
    "state": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT_HANDLER=>TY_HANDLING_RESULT-STATE"})}, "zif_abapgit_gui_event_handler=>ty_handling_result", undefined, {}, {});
    let ii_event = INPUT?.ii_event;
    if (ii_event?.getQualifiedName === undefined || ii_event.getQualifiedName() !== "ZIF_ABAPGIT_GUI_EVENT") { ii_event = undefined; }
    if (ii_event === undefined) { ii_event = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_GUI_EVENT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_GUI_EVENT"}).set(INPUT.ii_event); }
    let lv_key = new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"});
    let lv_remote_sha1 = new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"});
    let ls_file = new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {});
    let li_repo_online = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"});
    let li_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});
    let lv_blob = new abap.types.XString({qualifiedName: "XSTRING"});
    let ls_local = new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {});
    let ls_remote = new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {});
    let lt_filter = abap.types.TableFactory.construct(new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_tadir_tt");
    let lo_filter = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_OBJECT_FILTER_OBJ", RTTIName: "\\CLASS=ZCL_ABAPGIT_OBJECT_FILTER_OBJ"});
    let lt_files_item = abap.types.TableFactory.construct(new abap.types.Structure({
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}),
    "item": new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt");
    let ls_file_item = new abap.types.Structure({
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}),
    "item": new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {});
    let ls_item = new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {});
    let fs_ls_filter_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "pgmid": new abap.types.Character(4, {}),
    "object": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "korrnum": new abap.types.Character(10, {}),
    "delflag": new abap.types.Character(1, {}),
    "genflag": new abap.types.Character(1, {}),
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_TADIR-PATH"}),
    "srcsystem": new abap.types.Character(5, {}),
    "masterlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_tadir", undefined, {}, {}));
    lv_key.set((await (await ii_event.get().zif_abapgit_gui_event$query()).get().get({iv_key: abap.CharacterFactory.get(3, 'KEY')})));
    await abap.statements.cast(li_repo_online, (await (await abap.Classes['ZCL_ABAPGIT_REPO_SRV'].get_instance()).get().zif_abapgit_repo_srv$get({iv_key: lv_key})));
    await abap.statements.cast(li_repo, li_repo_online);
    lv_remote_sha1.set((await (await ii_event.get().zif_abapgit_gui_event$query()).get().get({iv_key: abap.CharacterFactory.get(11, 'REMOTE_SHA1')})));
    ls_file.get().path.set((await (await ii_event.get().zif_abapgit_gui_event$query()).get().get({iv_key: abap.CharacterFactory.get(4, 'PATH')})));
    ls_file.get().filename.set((await (await ii_event.get().zif_abapgit_gui_event$query()).get().get({iv_key: abap.CharacterFactory.get(8, 'FILENAME')})));
    await abap.Classes['ZCL_ABAPGIT_FILENAME_LOGIC'].file_to_object({iv_filename: ls_file.get().filename, iv_path: ls_file.get().path, iv_devclass: (await li_repo.get().zif_abapgit_repo$get_package()), io_dot: (await li_repo.get().zif_abapgit_repo$get_dot_abapgit()), es_item: ls_item});
    fs_ls_filter_.assign(lt_filter.appendInitial());
    fs_ls_filter_.get().object.set(ls_item.get().obj_type);
    fs_ls_filter_.get().obj_name.set(ls_item.get().obj_name);
    lo_filter.set(await (new abap.Classes['ZCL_ABAPGIT_OBJECT_FILTER_OBJ']()).constructor_({it_filter: lt_filter}));
    lt_files_item.set((await li_repo_online.get().zif_abapgit_repo$get_files_local_filtered({ii_obj_filter: lo_filter})));
    abap.statements.readTable(lt_files_item,{into: ls_file_item,
      withKey: (i) => {return abap.compare.eq(i.file.get().path, ls_file.get().path) && abap.compare.eq(i.file.get().filename, ls_file.get().filename);},
      withKeyValue: [{key: (i) => {return i.file.get().path}, value: ls_file.get().path},{key: (i) => {return i.file.get().filename}, value: ls_file.get().filename}],
      usesTableLine: false,
      withKeySimple: {"file.get().path": ls_file.get().path,"file.get().filename": ls_file.get().filename}});
    lv_blob.set((await (await abap.Classes['ZCL_ABAPGIT_GIT_FACTORY'].get_v2_porcelain()).get().zif_abapgit_gitv2_porcelain$fetch_blob({iv_url: (await li_repo_online.get().zif_abapgit_repo_online$get_url()), iv_sha1: lv_remote_sha1})));
    ls_remote.get().path.set(ls_file.get().path);
    ls_remote.get().filename.set(ls_file.get().filename);
    ls_remote.get().sha1.set(lv_remote_sha1);
    ls_remote.get().data.set(lv_blob);
    ls_local.get().path.set(ls_remote.get().path);
    ls_local.get().filename.set(ls_remote.get().filename);
    ls_local.get().sha1.set(ls_file_item.get().file.get().sha1);
    ls_local.get().data.set(ls_file_item.get().file.get().data);
    rs_handled.get().page.set((await abap.Classes['ZCL_ABAPGIT_GUI_PAGE_DIFF_FILE'].create({iv_obj_type: ls_item.get().obj_type, iv_obj_name: ls_item.get().obj_name, is_local: ls_local, is_remote: ls_remote})));
    rs_handled.get().state.set(abap.Classes['ZCL_ABAPGIT_GUI'].c_event_state.get().new_page_w_bookmark);
    return rs_handled;
  }
}
abap.Classes['ZCL_ABAPGIT_FLOW_PAGE_UTILS'] = zcl_abapgit_flow_page_utils;
export {zcl_abapgit_flow_page_utils};