(function(I){typeof define=="function"&&define.amd?define(I):I()})(function(){"use strict";function I(i,e,u,t){if(e===!1||e==null||!e&&(i==="class"||i==="style"))return"";if(e===!0)return" "+(t?i:i+'="'+i+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),u||e.indexOf('"')===-1)?(u&&(e=t0(e))," "+i+'="'+e+'"'):" "+i+"='"+e.replace(/'/g,"&#39;")+"'"}function t0(i){var e=""+i,u=r0.exec(e);if(!u)return i;var t,r,p,c="";for(t=u.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:p="&quot;";break;case 38:p="&amp;";break;case 60:p="&lt;";break;case 62:p="&gt;";break;default:continue}r!==t&&(c+=e.substring(r,t)),r=t+1,c+=p}return r!==t?c+e.substring(r,t):c}var r0=/["&<>]/;function Y(i,e,u,t){if(!(i instanceof Error))throw i;if(!(typeof window>"u"&&e||t))throw i.message+=" on line "+u,i;var r,p,c,l;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,p=t.split(`
`),c=Math.max(u-r,0),l=Math.min(p.length,u+r)}catch(m){return i.message+=" - could not read from "+e+" ("+m.message+")",void Y(i,null,u)}r=p.slice(c,l).map(function(m,y){var k=y+c+1;return(k==u?"  > ":"    ")+k+"| "+m}).join(`
`),i.path=e;try{i.message=(e||"Pug")+":"+u+`
`+r+`

`+i.message}catch{}throw i}function u0(i){var e="",u,t;try{var r=i||{};(function(p){t=1,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/assetstoreButtonsExtension.pug",e=e+'<div class="g-assetstore-button-container">',t=2,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/assetstoreButtonsExtension.pug",e=e+"<a"+(' class="g-view-imports btn btn-sm btn-primary"'+I("href",p,!0,!1))+">",t=3,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/assetstoreButtonsExtension.pug",e=e+'<i class="icon-link-ext"></i>',t=4,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/assetstoreButtonsExtension.pug",e=e+" View past imports</a></div>"}).call(this,"importsPageLink"in r?r.importsPageLink:typeof importsPageLink<"u"?importsPageLink:void 0)}catch(p){Y(p,u,t)}return e}function o(i,e,u,t){if(e===!1||e==null||!e&&(i==="class"||i==="style"))return"";if(e===!0)return" "+(t?i:i+'="'+i+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),u||e.indexOf('"')===-1)?(u&&(e=s(e))," "+i+'="'+e+'"'):" "+i+"='"+e.replace(/'/g,"&#39;")+"'"}function s(i){var e=""+i,u=i0.exec(e);if(!u)return i;var t,r,p,c="";for(t=u.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:p="&quot;";break;case 38:p="&amp;";break;case 60:p="&lt;";break;case 62:p="&gt;";break;default:continue}r!==t&&(c+=e.substring(r,t)),r=t+1,c+=p}return r!==t?c+e.substring(r,t):c}var i0=/["&<>]/;function V(i,e,u,t){if(!(i instanceof Error))throw i;if(!(typeof window>"u"&&e||t))throw i.message+=" on line "+u,i;var r,p,c,l;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,p=t.split(`
`),c=Math.max(u-r,0),l=Math.min(p.length,u+r)}catch(m){return i.message+=" - could not read from "+e+" ("+m.message+")",void V(i,null,u)}r=p.slice(c,l).map(function(m,y){var k=y+c+1;return(k==u?"  > ":"    ")+k+"| "+m}).join(`
`),i.path=e;try{i.message=(e||"Pug")+":"+u+`
`+r+`

`+i.message}catch{}throw i}function F0(i){var e="",u,t,r;try{var p=i||{};(function(c,l,C,w,j,E,R,X,e0,A,h,L,C0){r=1,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<div class="it-controls">',r=2,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",C0?(r=12,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",R?(r=17,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<a"+(' class="g-view-imports btn btn-sm btn-primary"'+o("href",`#assetstore/${R}/imports`,!0,!1))+">",r=18,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-link-ext"></i>',r=19,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"View all past Imports</a>"):(r=13,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<a class="g-view-imports btn btn-sm btn-primary" href="#assetstore/all_imports">',r=14,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-link-ext"></i>',r=15,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"View all past Imports</a>")):(r=3,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",R?(r=8,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<a"+(' class="g-view-imports btn btn-sm btn-primary"'+o("href",`#assetstore/${R}/unique_imports`,!0,!1))+">",r=9,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-link-ext"></i>',r=10,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"View unique past Imports</a>"):(r=4,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<a class="g-view-imports btn btn-sm btn-primary" href="#assetstore/all_unique_imports">',r=5,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-link-ext"></i>',r=6,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"View unique past Imports</a>")),e=e+"</div>",r=20,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<table class="g-imports-list-table">',r=21,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug";var E=!1,w=!1,C=!1,j=!1,h=[],L=!1;r=28,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(function(){var n=e0;if(typeof n.length=="number")for(var a=0,d=n.length;a<d;a++){var F=n[a];r=29,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(F.get("params").fileIncludeRegex||F.get("params").fileExcludeRegex)&&(r=30,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",E=l),r=31,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("params").leafFoldersAsItems&&F.get("params").leafFoldersAsItems!=="false"&&(r=32,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",w=!0),r=33,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("params").progress||(r=34,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",j=!0),r=35,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",c.keys(F.get("params")).forEach(_=>{["importPath","destinationId","leafFoldersAsItems","progress","fileIncludeRegex","fileExcludeRegex"].indexOf(_)<0&&h.indexOf(_)<0&&h.push(_)}),r=36,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("_count")&&(r=37,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",L=!0),r=38,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("params").importPath&&(r=39,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",C=!0)}else{var d=0;for(var a in n){d++;var F=n[a];r=29,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(F.get("params").fileIncludeRegex||F.get("params").fileExcludeRegex)&&(r=30,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",E=l),r=31,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("params").leafFoldersAsItems&&F.get("params").leafFoldersAsItems!=="false"&&(r=32,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",w=!0),r=33,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("params").progress||(r=34,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",j=!0),r=35,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",c.keys(F.get("params")).forEach(g=>{["importPath","destinationId","leafFoldersAsItems","progress","fileIncludeRegex","fileExcludeRegex"].indexOf(g)<0&&h.indexOf(g)<0&&h.push(g)}),r=36,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("_count")&&(r=37,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",L=!0),r=38,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",F.get("params").importPath&&(r=39,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",C=!0)}}}).call(this),r=40,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<thead>",r=41,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<tr>",r=42,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=42,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Actions</th>",r=43,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",L&&(r=44,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=44,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Repeats</th>"),r=45,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=45,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Started</th>",r=46,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=46,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Ended</th>",r=47,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=47,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Assetstore Name</th>",r=48,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",C&&(r=49,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=49,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Import Path</th>"),r=51,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=51,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Destination Path</th>",r=52,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",w&&(r=53,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=53,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Leafed Folders</th>"),r=54,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",j&&(r=55,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=55,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"Progress</th>"),r=56,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",E&&(r=57,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=57,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"File Include Regex</th>",r=58,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=58,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"File Exclude Regex</th>"),r=59,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(function(){var n=h;if(typeof n.length=="number")for(var a=0,d=n.length;a<d;a++){var F=n[a];r=60,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=60,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.replace(/([A-Z])/g," $1").replace(/^./,_=>_.toUpperCase()))==null?"":u)+"</th>"}else{var d=0;for(var a in n){d++;var F=n[a];r=60,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<th>",r=60,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.replace(/([A-Z])/g," $1").replace(/^./,g=>g.toUpperCase()))==null?"":u)+"</th>"}}}).call(this),e=e+"</tr></thead>",r=61,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<tbody>",r=62,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(function(){var n=e0;if(typeof n.length=="number")for(var a=0,d=n.length;a<d;a++){var F=n[a];r=63,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<tr>",r=64,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=65,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",X.includes(F.get("assetstoreId"))&&(r=66,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<div class="g-imports-buttons">',r=67,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<button"+(' class="re-import-btn btn btn-sm btn-success"'+o("index",a,!0,!1)+o("disabled",F.get("_destinationPath")=="does not exist",!0,!1))+">",r=68,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-cw"></i>',r=69,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+" Re-Import</button>",r=70,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<button"+(' class="re-import-edit-btn btn btn-sm btn-primary"'+o("index",a,!0,!1)+' data-toggle="tooltip" title="Edit Import Parameters"')+">",r=71,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-pencil"></i></button></div>'),e=e+"</td>",r=72,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",L&&(r=73,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("_count"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("_count")!==1?`Imported ${F.get("_count")} times`:"Imported once",!0,!1))+">",r=74,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=74,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("_count"))==null?"":u)+"</span></td>"),r=75,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("started"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("started"),!0,!1))+">",r=76,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=76,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=A(F.get("started")).format("YYYY-MM-DD HH:mm:ss.SSS"))==null?"":u)+"</span></td>",r=77,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("ended"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("ended")||"",!0,!1))+">",r=78,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=78,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("ended")?A(F.get("ended")).format("YYYY-MM-DD HH:mm:ss.SSS"):"")==null?"":u)+"</span></td>",r=79,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("_assetstoreName"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("_assetstoreName"),!0,!1))+">",r=80,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=80,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("_assetstoreName"))==null?"":u)+"</span></td>",r=81,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",C&&(r=82,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("params").importPath,!0,!1)+' data-toggle="tooltip"'+o("title",F.get("params").importPath,!0,!1))+">",r=83,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=83,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=(F.get("params").importPath||"").replaceAll(/(?!^)\//g,"/­"))==null?"":u)+"</span></td>"),r=84,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("params").destinationId,!0,!1)+' data-toggle="tooltip"'+o("title",F.get("_destinationPath")+`
`+F.get("params").destinationId,!0,!1))+">",r=85,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=85,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=(F.get("_destinationPath")||"").replaceAll(/(?!^)\//g,"/­"))==null?"":u)+"</span></td>",r=86,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",w&&(r=87,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=88,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=88,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").leafFoldersAsItems)==null?"":u)+"</span></td>"),r=89,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",j&&(r=90,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=91,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=91,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").progress)==null?"":u)+"</span></td>"),r=92,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",E&&(r=93,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=94,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=94,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").fileIncludeRegex)==null?"":u)+"</span></td>",r=95,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=96,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=96,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").fileExcludeRegex)==null?"":u)+"</span></td>"),r=97,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(function(){var _=h;if(typeof _.length=="number")for(var $=0,T=_.length;$<T;$++){var g=_[$];r=98,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params")[g])==null?"":u)+"</span></td>"}else{var T=0;for(var $ in _){T++;var g=_[$];r=98,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params")[g])==null?"":u)+"</span></td>"}}}).call(this),e=e+"</tr>"}else{var d=0;for(var a in n){d++;var F=n[a];r=63,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<tr>",r=64,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=65,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",X.includes(F.get("assetstoreId"))&&(r=66,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<div class="g-imports-buttons">',r=67,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<button"+(' class="re-import-btn btn btn-sm btn-success"'+o("index",a,!0,!1)+o("disabled",F.get("_destinationPath")=="does not exist",!0,!1))+">",r=68,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-cw"></i>',r=69,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+" Re-Import</button>",r=70,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<button"+(' class="re-import-edit-btn btn btn-sm btn-primary"'+o("index",a,!0,!1)+' data-toggle="tooltip" title="Edit Import Parameters"')+">",r=71,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<i class="icon-pencil"></i></button></div>'),e=e+"</td>",r=72,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",L&&(r=73,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("_count"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("_count")!==1?`Imported ${F.get("_count")} times`:"Imported once",!0,!1))+">",r=74,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=74,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("_count"))==null?"":u)+"</span></td>"),r=75,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("started"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("started"),!0,!1))+">",r=76,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=76,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=A(F.get("started")).format("YYYY-MM-DD HH:mm:ss.SSS"))==null?"":u)+"</span></td>",r=77,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("ended"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("ended")||"",!0,!1))+">",r=78,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=78,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("ended")?A(F.get("ended")).format("YYYY-MM-DD HH:mm:ss.SSS"):"")==null?"":u)+"</span></td>",r=79,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("_assetstoreName"),!0,!1)+' data-toggle="tooltip"'+o("title",F.get("_assetstoreName"),!0,!1))+">",r=80,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=80,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("_assetstoreName"))==null?"":u)+"</span></td>",r=81,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",C&&(r=82,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("params").importPath,!0,!1)+' data-toggle="tooltip"'+o("title",F.get("params").importPath,!0,!1))+">",r=83,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=83,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=(F.get("params").importPath||"").replaceAll(/(?!^)\//g,"/­"))==null?"":u)+"</span></td>"),r=84,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td"+(o("data-id",F.get("params").destinationId,!0,!1)+' data-toggle="tooltip"'+o("title",F.get("_destinationPath")+`
`+F.get("params").destinationId,!0,!1))+">",r=85,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=85,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=(F.get("_destinationPath")||"").replaceAll(/(?!^)\//g,"/­"))==null?"":u)+"</span></td>",r=86,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",w&&(r=87,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=88,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=88,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").leafFoldersAsItems)==null?"":u)+"</span></td>"),r=89,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",j&&(r=90,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=91,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=91,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").progress)==null?"":u)+"</span></td>"),r=92,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",E&&(r=93,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=94,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=94,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").fileIncludeRegex)==null?"":u)+"</span></td>",r=95,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=96,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=96,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params").fileExcludeRegex)==null?"":u)+"</span></td>"),r=97,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",(function(){var g=h;if(typeof g.length=="number")for(var x=0,D=g.length;x<D;x++){var M=g[x];r=98,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params")[M])==null?"":u)+"</span></td>"}else{var D=0;for(var x in g){D++;var M=g[x];r=98,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<td>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+"<span>",r=99,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+s((u=F.get("params")[M])==null?"":u)+"</span></td>"}}}).call(this),e=e+"</tr>"}}}).call(this),e=e+"</tbody></table>",r=101,t="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/importList.pug",e=e+'<div class="g-imports-pagination"></div>'}).call(this,"Object"in p?p.Object:typeof Object<"u"?Object:void 0,"True"in p?p.True:typeof True<"u"?True:void 0,"anyImportPath"in p?p.anyImportPath:typeof anyImportPath<"u"?anyImportPath:void 0,"anyLeafed"in p?p.anyLeafed:typeof anyLeafed<"u"?anyLeafed:void 0,"anyNoProgress"in p?p.anyNoProgress:typeof anyNoProgress<"u"?anyNoProgress:void 0,"anyRegex"in p?p.anyRegex:typeof anyRegex<"u"?anyRegex:void 0,"assetstoreId"in p?p.assetstoreId:typeof assetstoreId<"u"?assetstoreId:void 0,"assetstores"in p?p.assetstores:typeof assetstores<"u"?assetstores:void 0,"imports"in p?p.imports:typeof imports<"u"?imports:void 0,"moment"in p?p.moment:typeof moment<"u"?moment:void 0,"otherParams"in p?p.otherParams:typeof otherParams<"u"?otherParams:void 0,"showCount"in p?p.showCount:typeof showCount<"u"?showCount:void 0,"unique"in p?p.unique:typeof unique<"u"?unique:void 0)}catch(c){V(c,t,r)}return e}const j0="",J=girder.$,p0=girder.views.widgets.PaginateWidget,c0=girder.collections.Collection,U=girder.models.AssetstoreModel,{SORT_DESC:o0}=girder.constants,s0=girder.moment,a0=girder.views.View,B=girder.router,{restRequest:l0}=girder.rest;var P=a0.extend({events:{"click .re-import-btn":function(i){const e=Number(J(i.currentTarget).attr("index")),u=this.imports[e];if(u===void 0)return;const t=new U({_id:u.get("assetstoreId")}),r=u.get("params").destinationType,p=u.get("params").destinationId;t.off("g:imported").on("g:imported",function(){B.navigate(r+"/"+p,{trigger:!0})},this).on("g:error",function(c){this.$(".g-validation-failed-message").text(c.responseJSON.message)},this),t.once("g:fetched",()=>{t.import(u.get("params"))}).fetch()},"click .re-import-edit-btn":function(i){const e=Number(J(i.currentTarget).attr("index")),u=this.imports[e];if(u===void 0)return;const t=(c,l)=>{new U({_id:c}).once("g:fetched",()=>{B.navigate(`assetstore/${c}/re-import/${l}`,{trigger:!0})}).fetch()},r=u.get("assetstoreId"),p=u.get("_id");t(r,p)}},initialize({id:i,unique:e}){this._unique=e,this._assetstoreId=i,this.imports=[];const u=i?`${i}/imports`:"all_imports";this.collection=new c0,this.collection.altUrl=`assetstore/${u}`,this.collection.sortField="started",this.collection.sortDir=o0,this.collection.params={unique:e||!1},this.listenTo(this.collection,"update reset",this._updateData),this.paginateWidget=new p0({collection:this.collection,parentView:this}),l0({url:"assetstore",data:{limit:0}}).done(t=>{this.assetstores=t.map(r=>r._id),this.collection.fetch({},!0)})},_updateData(){this.imports=this.collection.toArray(),this.render()},render(){return this.$el.html(F0({imports:this.imports,assetstores:this.assetstores,moment:s0,unique:this._unique,assetstoreId:this._assetstoreId})),this.$el.tooltip(),this.paginateWidget.setElement(this.$(".g-imports-pagination")).render(),this}});const m0=girder.models.AssetstoreModel,n0=girder.views.View,{AssetstoreType:S}=girder.constants,g0=girder.router,d0=girder.events,{restRequest:H}=girder.rest,N=(i,e)=>{d0.trigger("g:alert",{icon:"cancel",text:`Could not re-import: ${e}`,type:"danger"}),g0.navigate(`assetstore/${i}/import`,{trigger:!0,replace:!0})};var _0=n0.extend({initialize({assetstoreId:i,importId:e}){this.importId=e,this.assetstoreId=i,this.type="",H({url:`assetstore/import/${e}`,error:null}).done(u=>{if(!u){N(this.assetstoreId,`Unable to find import ${e}`);return}this.import=u;const t=new m0({_id:i});t.once("g:fetched",()=>{const r=t.get("type");r===S.FILESYSTEM?this.type="filesystem":r===S.S3?this.type="s3":r===S.DICOMWEB?this.type="dwas":r===S.GIRDER?this.type="gas":N(this.assetstoreId,`Unsupported assetstore type '${r}'`),this.render()}).fetch()}).fail(()=>{N(this.assetstoreId,"Unable to fetch base import information")})},render(){const i=this.import.params,e=i.destinationId,u=i.destinationType,t=i.excludeExisting?"true":"false";return this.$(`#g-${this.type}-import-path`).val(i.importPath),this.$(`#g-${this.type}-import-dest-type`).val(u),this.$(`#g-${this.type}-import-dest-id`).val(e),this.$(`#g-${this.type}-import-leaf-items`).val(i.leafFoldersAsItems),this.$(`#g-${this.type}-import-exclude-existing`).val(t),this.type==="dwas"&&(this.$(`#g-${this.type}-import-filters`).val(i.filters),this.$(`#g-${this.type}-import-limit`).val(i.limit)),H({url:`resource/${e}/path`,method:"GET",data:{type:u},error:null}).done(r=>{this.$(`#g-${this.type}-import-dest-id`).val(`${e} (${r})`)}).fail(()=>{this.$(`#g-${this.type}-import-dest-id`).val("")}),this}});function W(i,e,u,t){if(e===!1||e==null||!e&&(i==="class"||i==="style"))return"";if(e===!0)return" "+(t?i:i+'="'+i+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),u||e.indexOf('"')===-1)?(u&&(e=k0(e))," "+i+'="'+e+'"'):" "+i+"='"+e.replace(/'/g,"&#39;")+"'"}function k0(i){var e=""+i,u=h0.exec(e);if(!u)return i;var t,r,p,c="";for(t=u.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:p="&quot;";break;case 38:p="&amp;";break;case 60:p="&lt;";break;case 62:p="&gt;";break;default:continue}r!==t&&(c+=e.substring(r,t)),r=t+1,c+=p}return r!==t?c+e.substring(r,t):c}var h0=/["&<>]/;function z(i,e,u,t){if(!(i instanceof Error))throw i;if(!(typeof window>"u"&&e||t))throw i.message+=" on line "+u,i;var r,p,c,l;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,p=t.split(`
`),c=Math.max(u-r,0),l=Math.min(p.length,u+r)}catch(m){return i.message+=" - could not read from "+e+" ("+m.message+")",void z(i,null,u)}r=p.slice(c,l).map(function(m,y){var k=y+c+1;return(k==u?"  > ":"    ")+k+"| "+m}).join(`
`),i.path=e;try{i.message=(e||"Pug")+":"+u+`
`+r+`

`+i.message}catch{}throw i}function G(i){var e="",u,t;try{var r=i||{};(function(p){t=1,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+'<div class="form-group">',t=2,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+"<label"+W("for","g-"+p+"-import-exclude-existing",!0,!1)+">",t=2,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+"Exclude Existing Files</label>",t=3,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+"<select"+(' class="form-control"'+W("id","g-"+p+"-import-exclude-existing",!0,!1))+">",t=4,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+'<option value="false">',t=4,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+"False</option>",t=5,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+'<option value="true">',t=5,u="/home/circleci/project/girder/plugins/import_tracker/girder_import_tracker/web_client/templates/excludeExistingInput.pug",e=e+"True</option></select></div>"}).call(this,"type"in r?r.type:typeof type<"u"?type:void 0)}catch(p){z(p,u,t)}return e}girder.events.on("g:appload.before",()=>{const i=girder.plugins.jobs.JobStatus,e=i.isCancelable;i.isCancelable=function(u){return["assetstore_import","folder_move"].includes(u.get("type"))?![i.CANCELED,i.SUCCESS,i.ERROR].includes(u.get("status")):e(u)}});const f0=girder.$,{AssetstoresView:Z,FilesystemImportView:q,S3ImportView:O}=girder.views.body,{CollectionModel:b0,FolderModel:E0,UserModel:w0}=girder.models,{wrap:v}=girder.utilities.PluginUtils,f=girder.events,b=girder.router;v(Z,"render",function(i){i.call(this),window.setTimeout(()=>{this.$el.find(".g-current-assetstores-container .g-body-title").after('<a class="g-view-imports btn btn-sm btn-primary" href="#assetstore/all_unique_imports"><i class="icon-link-ext"></i>View all past Imports</a>');const e=this.collection;this.$(".g-assetstore-import-button-container").after(function(){const u=e.get(f0(this).closest(".g-assetstore-buttons").find("[cid]").attr("cid"));return u0({importsPageLink:`#assetstore/${u.id}/unique_imports`})})},0)}),v(q,"render",function(i){i.call(this),this.$(".form-group").last().after(G({type:"filesystem"}))}),v(O,"render",function(i){i.call(this),this.$(".form-group").last().after(G({type:"s3"}))});const K=(i,e)=>{const u=i._browserWidgetView,t=i.$(`#g-${e}-import-dest-type`).val(),p=i.$(`#g-${e}-import-dest-id`).val().trim().split(/\s/)[0],c={collection:b0,folder:E0,user:w0};if(p&&t in c){const l=new c[t]({_id:p});l.once("g:fetched",()=>{(!u.root||u.root.id!==l.id)&&(u.root=l,u._renderRootSelection())}).on("g:error",m=>{m.status===400&&f.trigger("g:alert",{icon:"cancel",text:`No ${t.toUpperCase()} with ID ${p} found.`,type:"danger",timeout:4e3})}).fetch({ignoreError:!0})}};v(q,"_openBrowser",function(i){K(this,"filesystem"),i.call(this)}),v(O,"_openBrowser",function(i){K(this,"s3"),i.call(this)});const Q=(i,e)=>{const u=i.$(`#g-${e}-import-dest-id`).val().trim().split(/\s/)[0],t=i.$(`#g-${e}-import-dest-type`).val(),r=i.$(`#g-${e}-import-exclude-existing`).val(),p={destinationId:u,destinationType:t,excludeExisting:r,progress:!0};e==="filesystem"&&(p.leafFoldersAsItems=i.$(`#g-${e}-import-leaf-items`).val()),e==="dwas"?(p.filters=i.$(`#g-${e}-import-filters`).val().trim(),p.limit=i.$(`#g-${e}-import-limit`).val().trim()):p.importPath=i.$(`#g-${e}-import-path`).val().trim(),i.$(".g-validation-failed-message").empty(),i.$(`.g-submit-${e}-import`).addClass("disabled");let c=i.assetstore;c=c.off().on("g:imported",function(){b.navigate(t+"/"+u,{trigger:!0})},i).on("g:error",function(l){i.$(`.g-submit-${e}-import`).removeClass("disabled"),i.$(".g-validation-failed-message").html(l.responseJSON.message)},i),c.import(p)};q.prototype.events["submit .g-filesystem-import-form"]=function(i){i.preventDefault(),Q(this,"filesystem")},O.prototype.events["submit .g-s3-import-form"]=function(i){i.preventDefault(),Q(this,"s3")},b.route("assetstore/:id/imports","importsPage",function(i){f.trigger("g:navigateTo",P,{id:i})}),b.route("assetstore/:id/unique_imports","importsPage",function(i){f.trigger("g:navigateTo",P,{id:i,unique:!0})}),b.route("assetstore/all_imports","importsPage",function(){f.trigger("g:navigateTo",P)}),b.route("assetstore/all_unique_imports","importsPage",function(){f.trigger("g:navigateTo",P,{unique:!0})}),b.route("assetstore/:id/re-import/:prev","assetstoreImport",function(i,e){f.trigger("g:navigateTo",_0,{assetstoreId:i,importId:e}),Z.import(i)})});
