"+l+"
");var c=$("#pathRenameTextarea");"split"==G.userConfig.listType&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=i.length;"folder"!=s&&-1!=i.indexOf(".")&&(d=i.length-s.length-1),s||0!=i.indexOf(".")?c.textSelect(0,d):c.textSelect(0,i.length);var p=function(o){if("oexe"==s&&(o+=".oexe"),o!=i)e=n+i,o=n+o,t.rname(e,o,function(e){e===!1?$(a).removeClass("file-icon-edit").find(".title").html(htmlEncode(i)):v(e)});else{var r=i;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(a).removeClass("file-icon-edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(i=i.replace(".oexe","")),$(a).removeClass("file-icon-edit").find(".title").html(i))}).unbind("blur").blur(function(){p(c.val())})}},v=function(e){ui.fileLight.clear(),ui.f5Callback(function(){l(e),core.isApp("explorer")&&ui.tree.checkIfChange(G.thisPath)})},g=function(e){var t={},a=[];e.sort(function(e,t){return e.path==t.path?0:e.path>t.path?1:-1});for(var i=function(e){for(var a=e;""!=e;){if(t[e]!==void 0)return 1==t[e]?!0:a==e?(t[e]=1,!1):!0;e=core.pathFather(e)}return!1},n=0;e.length>n;n++)if("folder"==e[n].type){var o=rtrim(e[n].path,"/")+"/";t[o]||i(o)||(t[o]=0)}for(var n=0;e.length>n;n++){var o=e[n].path;"folder"==e[n].type?o=rtrim(o,"/")+"/":e[n].type="file",i(o)||a.push(e[n])}return a},b=function(e){var t=[];return ShareData.data("FILE_SELECT_ARRAY")?(t=ShareData.data("FILE_SELECT_ARRAY"),ShareData.remove("FILE_SELECT_ARRAY")):ui.fileLight.fileListSelect().each(function(){t.push({path:ui.fileLight.path($(this)),type:ui.fileLight.type($(this))})}),e?g(t):1!=t.length?{path:"",type:""}:t[0]},y=function(e,t){for(var a in G.jsonData)if("fileList"==a||"folderList"==a)for(var i=0;G.jsonData[a].length>i;i++)if(G.jsonData[a][i][e]==t)return G.jsonData[a][i]};return{search:i,makeParam:b,refreshCallback:v,history:r,getJsondataCell:y,checkSystemPath:o,pathOperate:t,appList:function(){t.appList(b().path)},appInstall:function(){t.appInstall(b().path)},openWindow:function(){var e=b();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(kodApp.openWindow(e.path),void 0)},open:function(e){var t=ui.fileLight.fileListSelect();if(void 0!=e||core.isApp("editor"))return kodApp.setLastOpenTarget($(".curSelectedNode").parent()),kodApp.open(e),void 0;if(0!=t.length){var a=b();if(0!=$(t).find(".file-not-exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("split"!=G.userConfig.listType||"folder"!=a.type){if("oexe"==a.type){var i=t.attr("data-app");if(i){var n=jsonDecode(base64Decode(i));return core.openApp(n),void 0}}kodApp.setLastOpenTarget(t),kodApp.open(a.path,a.type)}}},share:function(){t.share(b())},setBackground:function(){var e=core.path2url(b().path);ShareData.frameTop("",function(t){t.ui.setWall(e)}),ui.setWall(e),t.setBackground(e)},createLink:function(e){var a=b(),i=ui.fileLight.fileListSelect().last();a.name=trim(i.find(".filename").text()),t.createLink(a.path,a.name,a.type,e,v)},createProject:function(){t.createProject(b().path,v)},download:function(){var e=b(!0),a=!1;$.each(e,function(){"folder"==this.type&&(a=!0)}),a||e.length>1?t.zipDownload(e):$.each(e,function(){kodApp.download(this.path)})},shareEdit:function(){var e=y("path",b().path);try{var a=G.jsonData.shareList[e.sid];t.shareBox(a)}catch(i){}},shareOpenWindow:function(){var e=y("path",b().path),t="file";"folder"==e.type&&(t=1==e.codeRead?"codeRead":"folder");var a=G.appHost+"share/"+t+"&user="+G.jsonData.info.id+"&sid="+e.sid;window.open(a)},shareOpenPath:function(){var e=b(),t=y("path",e.path);if(!t||!G.jsonData.shareList)return kodApp.open(e.path,e.type),void 0;var a=G.jsonData.shareList[t.sid],i=core.pathFather(a.path),n=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(i,"",function(){l(n)})},explorer:function(){core.explorer(b().path)},explorerNew:function(){window.open(G.appHost+"explorer&path="+b().path)},openProject:function(){core.explorerCode(b().path)},search:function(e,t){return e?(i(e,t),void 0):(i("",b().path),void 0)},fav:function(){var e=b(),a=ui.fileLight.fileListSelect().last();e.name=trim(a.find(".filename").text()),t.fav(e)},recycleClear:function(){t.remove([{type:"recycle-clear",path:""}],function(){ui.f5()})},remove:function(e,a,i){if(G.jsonData.info&&o()){var n=b(!0);G.jsonData.info&&G.jsonData.info.pathType==G.KOD_USER_SHARE&&G.jsonData.info.id==G.userID&&-1==trim(G.thisPath,"/").indexOf("/")&&$.each(n,function(e){var t=y("path",n[e].path);void 0!=t&&(n[e].type="share",n[e].path=t.sid)}),i?t.remove(n,i,e,a):t.remove(n,v,e,a)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(a){var i=trim($(this).text());a!=e.length-1?t.favRemove(i,"",!0):t.favRemove(i,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},clipboard:function(){a.clipboard()},copy:function(){o()&&a.copy(b(!0))},cute:function(){o()&&a.cute(b(!0),ui.f5)},cuteDrag:function(e){a.cuteDrag(b(!0),e,v)},copyDrag:function(e,t){a.copyDrag(b(!0),e,v,t)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){a.copyDrag(b(!0),e,v,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){a.cuteDrag(b(!0),e,v)})},past:function(){var e=G.thisPath;"split"==G.userConfig.listType&&($containBox=$(".split-box.split-select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),a.past(e,v)},info:function(){t.info(b(!0))},newFile:function(e){void 0==e&&(e="txt"),h("file",u("newfile",e),e)},newFolder:function(){h("folder",u(LNG.newfolder),"")},shareFile:function(){var e=G.appHost+"share/file&sid="+G.sid+"&user="+G.user+"&path="+urlEncode(b().path);window.open(e)},rname:m,list:s,setSearchByStr:d,setSelectByChar:c,setSelectByFilename:l}}),define("app/path/tpl/file/create.html",[],"
\n {{if listType=='list'}}
{{/if}}\n
\n
\n {{if type=='folder'}}\n {{\"folder\" | kod.core.icon}}
\n {{else}}\n {{ext | kod.core.icon}}
\n {{/if}}\n \n {{if listType=='icon'}}\n \n {{else}}\n \n {{/if}}\n
\n \n
\n
\n
\n"),define("app/src/explorer/fileLight",[],function(){var e=$(),t=$(),a=function(){var e;e="split"!=G.userConfig.listType?$(".bodymain .file-continer .file"):$(".bodymain .file-continer .split-select .file"),t=e,f("clear"),Hook.trigger("explorer.fileSelect.init",this)},i=function(){var t=$(Config.SelectClass);e=t,t.length>1&&c(t),f("menu-file"),Hook.trigger("explorer.fileSelect.change",this)},n=function(){if(G.jsonData&&G.jsonData.fileList){var e=G.jsonData.fileList.length+G.jsonData.folderList.length;$(".file-select-info .item-num").html(e+LNG.folder_info_item)}},o=function(){var t="",a=0,i=e;0!=i.length&&(t=i.length+LNG.folder_info_item_select,i.each(function(){a+=parseInt($(this).attr("data-size"))}),0!=a&&(t=t+" ("+pathTools.fileSize(a)+")")),$(".file-select-info .item-select").html(t)},s=function(t){var a=e;if(void 0==t&&a&&a.length>=1&&(t=$(a[a.length-1])),void 0!=t&&!t.inScreen()){var i=$(".bodymain");"split"==G.userConfig.listType&&(i=t.parent());var n=t.offset().top-i.offset().top-i.height()/2+i.scrollTop();i.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(h(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.jsonData.info)switch(G.jsonData.info.pathType){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menu-fav-path").addClass("menu-fav-path-more"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.thisPath,"/").search("/"))return e.removeClass("menu-share-path").addClass("menu-share-path-more"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menu-group-root").addClass("menu-group-root-more"),void 0;default:}e.removeClass("menu-file menu-folder").addClass("menu-more"),f()},d=function(e){var t={"file-box":"menu-file","folder-box":"menu-folder","menu-recycle-path":"menu-recycle-path","menu-share-path-more":"menu-share-path","menu-fav-path-more":"menu-fav-path","menu-group-root-more":"menu-group-root","menu-default":"menu-default"};e.removeClass("menu-more");for(var a in t)e.hasClass(a)&&e.addClass(t[a]);f()},p=function(){var t=[];if(0!=e.length)return e.each(function(){t.push(h($(this)))}),t},u=function(){if(0!=e.length){var t=e;t.removeClass(Config.SelectClassName),t.each(function(){d($(this))}),e=$(),f(),Hook.trigger("explorer.fileSelect.change",this)}},f=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled")):$(".drop-menu-action li").removeClass("disabled")},h=function(e,t){return void 0==t&&(t="data-path"),void 0!=e.attr("data-path-children")&&(t="data-path-children"),pathHashDecode(e.attr(t))};return{init:a,name:r,path:h,type:l,fileListSelect:function(t){return t&&(e=t),e},fileListAll:function(e){return e&&(t=e),t},select:i,setInView:s,listNumberSet:n,selectNumSet:o,setMenu:c,resumeMenu:d,getAllName:p,clear:u,menuAction:f}}),define("app/src/explorer/fileSelect",[],function(){var e,t=!1,a=!1,i=!1,n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(e){var t=$(e.target);t.hasClass("item-menu")||t.parent().hasClass("item-menu")||t.hasClass("item-select")||t.parent().hasClass("item-select")||t.parents(".children-more").exists()||($(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select()))}),$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){a&&r(!0,$(this)),t||a||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),$.contextMenu.hidden(),$(e.target).parents(".children-more").exists())return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if($(e.target).hasClass("item-menu")||$(e.target).parent().hasClass("item-menu"))return $(this).hasClass(Config.SelectClassName)?void 0:(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0);if(!$(e.target).hasClass("item-select")&&!$(e.target).parent().hasClass("item-select")){if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?i=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var t=k.fileListAll($(this)),a=k.fileListSelect($(this)),n=t.index($(this));if(0==a.length)T(0,n,t);else{var o=t.index(a.first()),s=t.index(a.last());o>n?T(n,s,t):n>s?T(o,n,t):T(o,n,t)}}return!0}}).unbind("mouseup").bind("mouseup",function(){return $(".file-select-drag-temp").removeClass("file-select-drag-temp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),a&&r(!1,$(this))}).die("click").live("click",function(e){if(stopPP(e),a)return!1;if($(e.target).hasClass("item-menu")||$(e.target).parent().hasClass("item-menu")){var t=$(this).find(".item-menu");return $(this).contextMenu({x:t.offset().left+t.width(),y:t.offset().top}),!0}return $(e.target).hasClass("item-select")||$(e.target).parent().hasClass("item-select")?($(this).toggleClass(Config.SelectClassName),ui.fileLight.select(),!0):0!=$(this).find(".textarea").length?!0:0!=$(".file-draging-box").length?!0:(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&i&&(i=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),u($(this))),void 0)}),$(Config.FileBoxClass).myDbclick(function(e){var t=$(e.target);if(t.is("textarea")||t.is("input")||t.hasClass("children-more")||t.hasClass("children-more-cert")||t.hasClass("item-menu")||t.parent().hasClass("item-menu")||t.hasClass("item-select")||t.parent().hasClass("item-select"))return!0;if(t.hasClass("db-click-rename")){var a=t.parents(".file");return a.hasClass("systemBox"),ui.path.rname(),!0}if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return!0;if("split"==G.userConfig.listType&&p($(this))){var i=ui.fileLight.path($(this));return G.thisPath="",$(".file-list-split .split-box").remove(),ui.path.list(i),!0}ui.path.open()}}),l(),c(),d()},o=1e3,s=function(e){$(".file-select-drag-temp").flash(2,100),setTimeout(function(){if("list"==G.userConfig.listType){if($(".file-select-drag-temp .children-more-cert").hasClass("cert-open"))return;ui.fileContent.pathChildrenTree(e)}else if("split"==G.userConfig.listType)u(e);else if("icon"==G.userConfig.listType){var t=ui.fileLight.path(e);ui.path.list(t)}},300)},r=function(t,a){var i="file-select-drag-temp";t?!a.hasClass(Config.TypeFolderClass)&&!a.hasClass("menu-recycle-button")||a.hasClass(Config.SelectClassName)||($("."+i).removeClass(i),a.addClass(i),$(".children-list-dropover").removeClass("children-list-dropover"),$(".file-select-over-temp").removeClass("file-select-over-temp"),e=setTimeout(function(){s(a)},o)):(a.removeClass(i),clearTimeout(e),e=!1)},l=function(){var e;$("#folder-list-tree a").die("mouseenter").live("mouseenter",function(){if(a){($(this).hasClass("menu-tree-folder")||$(this).hasClass("menu-tree-folder-fav"))&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),i=t.getNodeByTId($(this).parent().attr("id"));!i.open&&i.isParent&&(e=setTimeout(function(){t.expandNode(i,!0)},o))}}).die("mouseup").live("mouseup",function(){if(a){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var t=ui.tree.zTree(),i=t.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){i.isParent=!0,t.reAsyncChildNodes(i,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){a&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},c=function(){var e;$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){a&&($(this).addClass("curDropToPath"),e=setTimeout(function(){var e=$(".curDropToPath");e.flash(2,100),setTimeout(function(){ui.path.list(e.attr("data-path"))},300)},o))}).die("mouseup mouseleave").live("mouseup mouseleave",function(){a&&($(this).removeClass("curDropToPath"),clearTimeout(e),e=!1)})},d=function(){var e=function(e,t){if(a&&"list"==G.userConfig.listType){$(".file-select-over-temp").removeClass("file-select-over-temp");var i="children-list-dropover";if(t){if($(".file-select-drag-temp").exists())return $("."+i).removeClass(i),void 0;$("."+i).not(e).removeClass(i),e.addClass(i),e.prev().hasClass("file")&&e.prev().addClass("file-select-over-temp")}else e.removeClass(i)}};$(".menu-body-main").bind("mouseover",function(t){e($(this),!0,t)}).bind("mouseup mouseleave",function(t){e($(this),!1,t)}),$(".children-list").die("mouseover").live("mouseover",function(t){e($(this),!0,t),stopPP(t)}).die("mouseup mouseleave").live("mouseup mouseleave",function(t){e($(this),!1,t)})},p=function(e){return"icon"==G.userConfig.listType?e.hasClass("folder-box")||e.hasClass("menu-recycle-button")?!0:!1:"list"==G.userConfig.listType?e.hasClass("folder-box")||e.hasClass("menu-recycle-button")||0!=e.find(".children-more-cert").length?!0:!1:"split"==G.userConfig.listType?e.hasClass("folder-box")||e.hasClass("menu-recycle-button")||0!=e.find(".children-more-cert").length?!0:!1:void 0},u=function(e){if("split"==G.userConfig.listType&&p(e)){var t=ui.fileLight.path(e);ui.path.history.add(t),ui.fileContent.pathChildrenSplit(t,function(){h(t)})}},f=function(){var e=".file-list-split .split-box",t="split-hover";$(e).live("mouseenter",function(){$(e).removeClass(t),$(this).addClass(t)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(t)}).die("click").live("click",function(){h(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var t=$(e.target).parents(".file");(0==t.length||0==t.find(".children-open").length)&&h(ui.fileLight.path($(this)))})},h=function(e){var t=$(".file-list-split .split-box"),a=$('.file-list-split .split-box[data-path="'+pathHashEncode(e)+'"]'),i=$('.file-list-split .split-box .file[data-path="'+pathHashEncode(e)+'"]'),n="split-select";0==a.length&&(a=t.last()),t.removeClass(n),a.addClass(n),0==ui.fileLight.fileListSelect().length&&i.addClass("select"),ui.fileLight.select();var o=a.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.thisPath=e,G.jsonData=o,ui.headerAddress.addressSet()),ui.fileLight.init()},m=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},v=function(e){$("body").removeClass("cursor-mouse cursor-warning cursor-move cursor-down cursor-add"),e&&$("body").addClass("cursor-mouse cursor-"+e)},g=function(){var i,n,o,s=150,r=!1,l=!1,c=0,d=!1,p=-15,u=10,f=0,h=0,g="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(e){if(!e.shiftKey){if(ui.isEdit())return!0;if(1!=e.which||t)return!0;i=$(this),k(e),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){x(e)}),$(document).keydown(function(e){x(e)}),$(document).keyup(function(e){x(e)}),$(document).one("mouseup",function(e){L(e),this.releaseCapture&&this.releaseCapture()}),$(document).one("keyup",function(e){27==e.which&&L(!1)})}});var b,y,k=function(e){$.contextMenu.hidden(),a=!0,c=$.now(),f=e.pageY,h=e.pageX,n=$(document).height(),o=$(document).width(),l=$(e.target).parents(".file")},x=function(e){if(!a)return!0;if(!m(i))return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-c>s&&!d&&(N(),r=$(".draggable-dragging"),r.attr("data-beforeInfo",r.find("span").html())),d){var t=e.clientX>=o-50?o-50:e.clientX,l=e.clientY>=n-50?n-50:e.clientY;return t=0>=t?0:t,l=0>=l?0:l,t-=p,l-=u,r.css({left:t,top:l}),w(e),z(t-h+p,l-f+u),!0}},w=function(e){clearTimeout(b),b=!1,b=setTimeout(function(){try{_(e)}catch(t){}},10)},_=function(e){var t=e.ctrlKey||e.metaKey,a=function(e,t){G.sid!==void 0&&(e="none"),void 0!=t&&0!==t.search(G.KOD_GROUP_PATH)&&0!==t.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(t)&&(e="clear");var a=htmlEncode(core.pathThis(t)),i=" "+r.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copyTo:'
'+LNG.copy_to+' "'+a+'"',moveTo:'
'+LNG.cute_to+' "'+a+'"',remove:'
'+LNG.remove+i+" ",share:'
'+LNG.share+i+" ",none:'
'+LNG.no_permission_write+" ",clear:r.attr("data-beforeInfo")};S(t)||(n.copyTo='
'+LNG.clone+" "),r.find("span").html(n[e]),r.attr("data-actionType",e),r.attr("data-actionPath",t),r.attr("id","drag-action-"+e);var n={copyTo:"add",moveTo:"move",remove:"move",share:"add",none:"default",clear:"default"};v(n[e])},i=G.thisPath,n="";if($(".curDropToPath").exists())i=$(".curDropToPath").attr("data-path");else if($(".curDropTreeNode").exists()){var o=$(".curDropTreeNode").parent().attr("id"),s=ui.tree.zTree().getNodeByTId(o);i=s.path}else if($(".file-select-drag-temp").exists())i=ui.fileLight.path($(".file-select-drag-temp")),$(".file-select-drag-temp").hasClass("menu-recycle-button")&&(n="remove");else if($(".children-list-dropover").exists()){var l=$(".children-list-dropover");i=l.hasClass("children-list")?pathHashDecode(l.attr("data-path-children")):G.thisPath}else $(".split-hover").exists()?i=ui.fileLight.path($(".split-hover")):n=$(".recycle-hover").exists()?"remove":$(".share-hover").exists()&&1==ui.fileLight.fileListSelect().length?"share":"clear";n&&!t||(n=t?"copyTo":S(i)?"moveTo":"clear"),a(n,i)},L=function(t){if(!a)return!1;if(clearTimeout(b),clearTimeout(e),a=!1,d=!1,$("body").removeClass(g),r){r.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){r.remove(),r=!1}),$(".curDropToPath,.curDropTreeNode,.curDropTreeNode,.file-select-drag-temp,.children-list-dropover").removeClass("curDropToPath curDropTreeNode curDropTreeNode file-select-drag-temp children-list-dropover");var i=r.attr("data-actionType");if(-1!=$.inArray(i,["copyTo","moveTo","remove","share"])?O(!1):O(!0),v(!1),t){var n=function(e,t){switch(ShareData.data("FILE_SELECT_ARRAY",C),e){case"copyTo":ui.path.copyDrag(t,!0);break;case"moveTo":ui.path.cuteDrag(t);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},o=r.attr("data-actionPath");n(i,o)}}},N=function(){$("body").addClass(g);var e=ui.fileLight.fileListSelect().length;$('
").appendTo("body"),d=!0,setTimeout(I,20),T()},C=[],T=function(){C=[],ui.fileLight.fileListSelect().each(function(){C.push({path:ui.fileLight.path($(this)),type:"folder"==ui.fileLight.type($(this))?"folder":"file"})})},S=function(e){for(var t=0;C.length>t;t++)if(core.pathFather(C[t].path)!=e)return!0;return!1},D=0,A=5,j=35,E=20,P=50,I=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"file-list-icon",list:"file-list-list",split:"file-list-split"},t=e[G.userConfig.listType];$("
").appendTo("body"),y=$(Config.SelectClass).filter("[data-path!='']");var a=y.clone();(y.length>=P||$.browser.msie)&&(a=l.clone()),a.appendTo(".file-draging"),a.each(function(e){var t=$(".bodymain .file-continer .file[data-path='"+$(this).attr("data-path")+"']"),i=t.offset();$(this).css({left:i.left,top:i.top,width:t.width()}),$(this).data({"data-left":i.left,"data-top":i.top,"data-animateTime":200+e*A,"data-sizeAdd":D*e}),$(this).attr("data-path")==l.attr("data-path")&&$(this).addClass("handle_target"),1==a.length&&($(this).data({"data-animateTime":0}),E=0)}),y.addClass("item-file-draging");var i=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");a.each(function(){var t=$(this),a=$(this).data("data-sizeAdd"),i=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:i,easing:"swing",progress:function(i,n){var o=t.offset(),s=e.offset(),r=(s.left+a-o.left)*n,l=(s.top+a+j-o.top)*n;t.css({left:o.left+r,top:o.top+l})},complete:function(){t.data("status","finished")}})})},E);$(".file-draging-box").data("dragDelay",i),$(".file-draging-box").data("animate","ready")},z=function(e,t){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+t})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),t=$(".draggable-dragging").offset();$(this).css({left:t.left+e,top:t.top+e+j})}}),void 0)},O=function(e){var t=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(t){var a=t*A,i=$(".bodymain .file-continer .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+a,function(){y.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(i.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+a,function(){$(this).remove()}))});var a=setTimeout(function(){$(".file-draging-box").remove()},400+A*t);$(".file-draging-box").data("removeDelay",a)}},b=function(){var e=null,i=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";core.isApp("desktop")&&(d="file-continer");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".file-continer").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||a)return!0;u(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,v(e),this.releaseCapture&&this.releaseCapture()})}});var u=function(a){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"split"==G.userConfig.listType&&(o+=$(a.target).parents(".split-box").scrollTop()),$(a.target).parent().hasClass(Config.FileBoxClassName)||$(a.target).parent().parent().hasClass(Config.FileBoxClassName)||$(a.target).hasClass("fix")||($.contextMenu.hidden(),a.ctrlKey||a.metaKey||a.shiftKey||ui.fileLight.clear(),$(a.target).hasClass("ico")||(e=a.pageX-s,i=a.pageY-o,c=setTimeout(function(){t=!0,0==$(".select-container").length&&$('
').appendTo(Config.FileBoxSelector),n=$(".select-container")},100)))},f=function(a){if(!t)return!0;var o=a.pageX-p.offset().left+p.scrollLeft(),s=a.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-e),d=Math.abs(s-i);s>i&&d>r-i&&r>l&&(d=r-i),h(s,i,d,p),n.css({left:Math.min(o,e)+2,top:Math.min(s,i)+2,width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&m()},h=function(e,t,a,i){var n=i.outerHeight(),o=i.scrollTop(),s=o;if(e>t){var r=t+a,l=n+o,c=r-l;c>0?s+=c:-n>c&&(s+=n-Math.abs(c))}else if(t>e){var d=t-a,p=o,c=d-p;0>c?s+=c:c>n&&(s+=Math.abs(c)-n)}s!==o&&i.stop(!0,!1).animate({scrollTop:s},100)},m=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),t=n.offset().top-p.offset().top+p.scrollTop(),a=e+n.width(),i=t+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,u=r.offsetTop-c,f=d+l.width(),h=u+l.height();if("split"==G.userConfig.listType&&(d+=l.parents(".split-box")[0].offsetLeft,f=d+l.width()),a-e+f-d>Math.abs(e+a-(d+f))&&i-t+h-u>Math.abs(t+i-(u+h))){if(!l.hasClass("file-select-drag-temp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("file-select-drag-temp")}}else l.removeClass("file-select-drag-temp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},v=function(){return t?(m(),n.remove(),$(".file-select-drag-temp").addClass(Config.SelectClassName).removeClass("file-select-drag-temp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),t=!1,e=null,i=null,void 0):!1
diff --git a/static/js/app/src/shareIndex/main.js b/static/js/app/src/shareIndex/main.js
index b7bc603e..b4c407c5 100755
--- a/static/js/app/src/shareIndex/main.js
+++ b/static/js/app/src/shareIndex/main.js
@@ -1,4 +1,4 @@
-/*! power by kodcloud ver4.25(2017-12-01) [build 1512126829474] */
+/*! power by kodcloud ver4.25(2017-12-04) [build 1512365183740] */
define("app/src/shareIndex/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","lib/contextMenu/jquery-contextMenu","../../common/core","../../common/rightMenuExtence","../../app/appBase","../../app/editor","../../app/openWith","../../app/html","../../shareCommon/topbar","./fileShow","../edit/previewMarkdownParse"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),e("lib/contextMenu/jquery-contextMenu"),core=e("../../common/core"),topbar=e("../../shareCommon/topbar"),fileShow=e("./fileShow"),window.require=e,$(document).ready(function(){if(core.init(),$(".init-loading").fadeOut(450).addClass("pop_fadeout"),"undefined"!=typeof G){fileShow.init();var e=function(){var e=$.getUrlParam(),t=e.url+"&password="+$(".form-control").val();$.get(t,function(e){1==e.code?window.location.reload():Tips.tips(e)})};$(".share-login").click(e),$(".form-control").keyEnter(e)}})}),define("app/common/core",["./rightMenuExtence","../app/appBase","../app/editor","../app/openWith","../app/html"],function(require,exports){tplUpload=require("./tpl/upload.html"),tplFormMake=require("./tpl/formMake.html");var tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),formMake=require("./core.formMake");require("./rightMenuExtence"),kodApp=require("../app/appBase"),require("../app/editor"),require("../app/openWith"),require("../app/html"),pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initTemplate=function(){window.require=require,template.config||(template.config=function(e,t){template.defaults[e]=t},template.helper=function(e,t){template.defaults.imports[e]=t}),template.config("escape",!1),template.config("compress",!0),template.helper("kod",{$:$,window:window,log:console.log,core:core,pathTools:window.pathTools,inArray:inArray}),template.defaults.imports.pathTools=window.pathTools,template.defaults.escape=!1,"_dev"==G.environment?(template.defaults.cache=!1,template.defaults.minimize=!1,template.defaults.compileDebug=!0):(template.defaults.cache=!0,template.defaults.minimize=!0,template.defaults.compileDebug=!1)},initFirst=function(){initTemplate(),"undefined"!=typeof G&&(1!=G.isRoot&&$(".menu-system-setting").remove(),G.isRoot||core.authCheck("systemMember.get")||1==core.authCheck("systemGroup.get")||$(".menu-system-group").remove(),G.userConfig&&"0"==G.userConfig.animateOpen&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{$.contextMenu.hidden()}catch(e){}}),$("body").click(function(){ShareData.frameTop("",function(e){self!=e&&e.$("body").trigger("click")})}),$.dialog.defaults.animate&&loadRipple(["a","button",".ripple-item",".context-menu-item","#picker",".menuShareButton",".menu-recycle-button",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common-footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init();for(var e=0;window.kodReady.length>e;e++)try{window.kodReady[e]()}catch(t){console.error("kodReady error:",t)}Hook.trigger("kodReady.end"),titleTips()},resetHost=function(){var e=window.location,t=e.port?":"+e.port:"";G.webHost=e.protocol+"//"+e.hostname+t+"/",G.appHost=rtrim(G.webHost,"/")+e.pathname.replace("index.php","")+"index.php?",G.appRoot=rtrim(G.webHost,"/")+e.pathname.replace("index.php",""),"1"==G.settings.paramRewrite&&(G.appHost=G.appHost.replace("index.php?","index.php/")),Cookie.set("HOST",G.webHost),Cookie.set("APP_HOST",G.appRoot),Cookie.set("kodUserLanguage",G.lang,8760)},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
")}}),$("body").bind("mousedown",function(){$(".ptips-skin").remove(),$.setStyle("body .ptips-skin{display:none !important;}","ptips-title")}).bind("mouseup",function(){$.setStyle("","ptips-title")}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e,t,a){console.log(e,t,a);var i=e.responseText,n=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),i='
'+i+"
",n?n.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t,a){var i="filename";"http"==e.substr(0,4)&&(i="fileUrl");var n=G.appHost+"editor/fileGet&"+i+"="+urlEncode(e);G.sharePage!==void 0&&(n=G.appHost+"share/fileGet&user="+G.user+"&sid="+G.sid+"&"+i+"="+urlEncode(e)),(e.indexOf("editor/fileGet&")>=0||e.indexOf("share/fileGet&")>=0)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,i){core.ajaxError(e,t,i),"function"==typeof a&&a()},success:function(e){e.code&&"function"==typeof t&&(1==e.data.base64&&(e.data.content=base64Decode(e.data.content)),t(e.data.content,e,n)),e.code||"function"==typeof a&&a(e.data)}})},fileInfo:function(e,t){var a=G.appHost+"explorer/pathInfo";G.sharePage!==void 0&&(a=G.appHost+"share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){if(e=this.pathClear(e),G.isRoot&&e.substring(0,G.webRoot.length)==G.webRoot){var a=G.webHost+this.pathUrlEncode(e.replace(G.webRoot,""));return"function"==typeof t&&t(a),void 0}var i='dataArr=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var a=e.code?e.data.downloadPath:!1;return a?("function"==typeof t&&t(a),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.isRoot?"system":"user");var t="85%",a="85%";isWap()&&(t="100%",a="100%"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open(G.appHost+"setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:t,height:t})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),a=ShareData.frameTop();a.art.dialog({id:"dialog-copyright",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about,width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),a.$(".dialog-copyright").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.appHost+e.substr(2));var a=G.appHost+"user/qrcode&url="+quoteHtml(urlEncode(e)),i="
";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="
",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua29kY2xvdWQuY29tL3VwZGF0ZS9tYWluNC5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
'+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+i);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+i)}if(1==e.length)var a=0,n=e[0],o=setInterval(function(){try{a++,100==Math.floor(n.PercentLoaded())?(e.next(".aui-loading").remove(),clearInterval(o),o=null):a>100&&(e.next(".aui-loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),a=parseFloat(t[0]),i=1073741824*parseFloat(t[1]),n=pathTools.fileSize(parseFloat(t[0])),o=pathTools.fileSize(i),s=n+"/",r=100*a/i;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==i||isNaN(i)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
"},dateTime:function(e){return date(LNG.time_type,e)},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.sharePage?"1"==G.shareInfo.canUpload:(void 0==e&&(e="explorer.fileUpload"),!G.isRoot&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.jsonData&&!G.jsonData.info.canUpload?(t&&(core.isSystemPath(G.thisPath)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/upload.html",[],'
\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n {{LNG.upload_clear_all}} \n {{LNG.upload_clear}} \n
\n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/tpl/formMake.html",[],'
\n \n <%\n var formTab = [];\n if(items.formStyle && kod.window.$.isArray(items.formStyle.tabs)){\n formTab = items.formStyle.tabs;\n }\n %>\n {{if formTab}}\n
\n {{/if}}\n\n
\n {{if formTab}}\n
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n {{/each}}\n
\n
\n {{/if}}\n\n {{each items item key}}\n <%\n var tabCurrent = 100;\n if(formTab){\n for(var i=0;i<=formTab.length;i++){\n if( formTab[i] && kod.window.inArray(formTab[i][\'field\'],key)){\n tabCurrent = i;\n break;\n }\n }\n }\n %>\n {{if typeof(item) == \'string\' }}\n
{{item}}
\n {{else if item.type == "html" || !item.type}}\n {{if key != \'formStyle\'}}\n
\n {{if item.value}}{{@item.value}}{{/if}}\n {{if item.display}}{{@item.display}}{{/if}}\n {{if item.desc}}{{@item.desc}}{{/if}}\n
\n {{/if}}\n {{else}}\n {{if item.value == undefined }}\n {{if item.value = \'\'}}{{/if}}\n {{/if}}\n
\n {{/if}}\n {{/each}}\n
\n
\n\n'),define("app/common/core.tools",[],function(e){var t=["A","versionHash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","R","S","T","inArray","./?user/versionInstall","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprb2RjbG91ZEBxcS5jb20_c","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrb2RjbG91ZEBxcS5jb20_c","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","2e58_39zGFQQvZkUjLjOxETXSuDqVatVhp88rJSmGpzzKi6SsasHHg","sa","b40aPuaqudWqmyWvpumbcMMGpVCdhjUCKq9oIN5G8o4yWb93Ww","#2","explorer","isApp","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common-footer","","toLowerCase","search","log","free","1","2","3","4","5","6","version_vip_",'
',"",".menu-system-about","insertAfter","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'
',"append",".aui-content","find","wrap","DOM","text","live","die",".version-vip","top","longPress","support-space-not","addClass","body","remove",".menu-system-about,.menu-left #about","#programs .setting_about,#programs .setting_homepage,#programs .home_page","icon","http","iconSrc",'
',"iconSmall",'
',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e
},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return $(document).ready(function(){window.onbeforeunload=function(){return $(".upload-loading,.download-loading").length>0?LNG.uploading+"...":void 0}}),{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='
'+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready).addClass("download-loading"),f=$('
').appendTo("#"+o).find(".progress-bar");$("#"+o+" .remove").bind("click",function(){clearInterval(r),r=!1,clearTimeout(l),l=!1,$.get(G.appHost+"explorer/serverDownload&type=remove&uuid="+o),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var h,m=function(e){clearTimeout(h),h=!1,h=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},v=function(){$.ajax({url:G.appHost+"explorer/serverDownload&type=download&savePath="+t+"&url="+urlEncode(e)+"&uuid="+o+"&time="+time(),dataType:"json",error:function(e,t,i){var n=p.data("progcess");return 200!=a.status&&n&&n.supportRange?(setTimeout(function(){v()},1e3),void 0):(core.ajaxError(e,t,i),200==a.status&&(clearInterval(r),r=!1,clearTimeout(l),l=!1,f.parent().remove(),u.removeClass("download-loading").addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){v()},1e3),void 0):(e.code?(m(e.info),u.removeClass("download-loading").text(LNG.download_success),$("#"+o+" .info .title").text(core.pathThis(e.info)),$("#"+o+" .info .title").attr("title",e.info),u.parent().parent().addClass("success")):(u.removeClass("download-loading").addClass("error").text(e.data),u.parent().parent().addClass("error")),clearInterval(r),r=!1,clearTimeout(l),l=!1,f.parent().remove(),void 0)}})};v();var g=function(){$.ajax({url:G.appHost+"explorer/serverDownload&type=percent&uuid="+o,dataType:"json",success:function(e){var t="",a=e.data;if(r){if(!e.code)return u.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),c){var i=a.size-c.size,n=i/(a.time-c.time);if(d>.2*n){var o=d;d=n,n=o}else d=n;var s=pathTools.fileSize(n);s=s?s:0,t=s+"/s"}if(p.data("progcess",a),0==a.length)p.find(".progress-bar").css("width","100%"),u.text(t),p.find(".size").text(pathTools.fileSize(a.size));else{var l=100*(a.size/a.length);p.find(".progress-bar").css("width",l+"%"),u.text(l.toFixed(1)+"%("+t+")"),p.find(".size").text(pathTools.fileSize(a.length))}p.find(".title").text(a.name),c=a}}}})};l=setTimeout(function(){g(),r=setInterval(function(){g()},1e3)},100)},upload:function(){$(".dialog-file-upload").show();var e=t();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog-file-upload").length)return $.dialog.list["dialog-file-upload"].display(!0),void 0;var a=template.compile(tplUpload);$.dialog({padding:5,width:430,height:450,resize:!0,ico:core.icon("upload"),id:"dialog-file-upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download-list .item"),function(){$(this).find(".remove").click()})}}),$(".file-upload-box .topbar-nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab-upload")?($(".file-upload-box .tab-upload").addClass("this"),$(".file-upload-box .tab-download").removeClass("this"),$(".file-upload-box .upload-box").removeClass("hidden"),$(".file-upload-box .download-box").addClass("hidden")):($(".file-upload-box .tab-upload").removeClass("this"),$(".file-upload-box .tab-download").addClass("this"),$(".file-upload-box .upload-box").addClass("hidden"),$(".file-upload-box .download-box").removeClass("hidden"))}),$(".download-box [name=url]").keyEnter(function(){core.serverDwonload($(".download-box input").val(),G.thisPath)}),$(".file-upload-box .download-box .download-start").unbind("click").bind("click",function(){core.serverDwonload($(".download-box input").val(),G.thisPath)}),$(".file-upload-box .download-box .download-start-all").unbind("click").bind("click",function(){$.dialog({id:"server-dwonload-textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"
",ok:function(){for(var e=$(".server-dwonload-textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.thisPath)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker-folder"}),$.supportUploadFolder()&&($(".upload-cert-box").removeClass("hidden"),$(".file-upload-box .drag-upload-folder").unbind("click").bind("click",function(){$("#picker-folder input").attr("webkitdirectory","").attr("directory",""),$("#picker-folder label").click()}))},init:function(){WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!$.supportCanvas()||"flash"==this.options.runtimeOrder)return $.Deferred().resolve(),void 0;var a=this.owner,i=(e.blob.getSource(),$.Deferred());return a.md5File(e.blob).fail(function(){i.resolve()}).then(function(a){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:t(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:a,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var n=e.file.checkChunk;if(n&&n["part_"+e.chunk]==a){var o=e.end/e.total;uploader.trigger("uploadProgress",e.file,o),i.reject()}else i.resolve()}}),i.promise()}});var a=["undefined","update-box","search","65bdTXJtziFGmtJThjdiGfXe-xr_UY8vIF3eoZ1sQ2AMtNBCquM-xT9DrLll2X_LtdUQkKIBYFzs-Ujf9ihGh6LUF4fo94c","_32@!A$","decode","1-2","todo","async","random"];setTimeout(function(){try{if(typeof tplDialogHtml==a[0]||-1==tplDialogHtml[a[2]](a[1])){var t=authCrypt[a[5]](a[3],a[4])+UUID();e[a[8]](t,function(e){try{e[a[7]](a[6])}catch(t){}})}}catch(i){}},1e3*parseInt(25*Math[a[9]]()+5)),uploader=WebUploader.create({swf:G.staticPath+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:G.settings.updloadThreads,sendAsBinary:G.settings.updloadBindary,chunkSize:G.settings.updloadChunkSize,chunked:!0,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&(core.isApp("explorer")?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");kodApp.open(t),stopPP(e)}),$(".upload-box-clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload-box-clear-all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var i,n=0,o=0,s="0B/s",r=0,l=function(e,t){if(.3>=timeFloat()-r)return s;r=timeFloat();var a=e.size*t,i=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),a]]:i>=e.speed.length?e.speed.push([timeFloat(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([timeFloat(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],l=(n[1]-o[1])/(n[0]-o[0]);0>=l&&(l=0);var c=pathTools.fileSize(l);return c=c?c:0,l=c+"/s",s=l,l},c=[],d=function(e){clearTimeout(i),i=!1,i=setTimeout(function(){var t=c;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(c=[],core.isApp("explorer"))){if("share"==G.sharePage)return;ui.tree.checkIfChange(G.thisPath)}})},600)};uploader.on("fileQueued",function(e){if($(".dialog-file-upload").show(),!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(a){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.path.pathOperate.newFolder(G.thisPath+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;var i=e.fullPath;e.finished=!1,e.upload_to=G.thisPath,(void 0==i||"undefined"==i)&&(i=e.name),n++;var s=$(".uploader-list"),r='
'+'
'+htmlEncode(core.pathThis(i))+" "+'
'+pathTools.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==n||2e3==n)&&Tips.tips(LNG.upload_tips_more,"warning");var l=function(){if(0==e.size&&i){ui.path.pathOperate.newFile(e.upload_to+i),uploader.skipFile(e),uploader.removeFile(e),o++,n++;var t=$("#"+e.id);t.addClass("success").find(".state").removeClass("upload-loading").text(LNG.upload_success).parent().find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")}},c=function(){uploader.upload(),setTimeout(function(){l()},200)};0==s.length?setTimeout(function(){$(".uploader-list").prepend(r),c()},200):(s.prepend(r),c())}).on("uploadBeforeSend",function(e,t,a){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to,a["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){var a=(100*t).toFixed(1)+"%";$(".dialog-file-upload .aui-title").text(LNG.uploading+": "+o+"/"+n+" ("+s+")"),Title.set(o+"/"+n+"("+a+","+s+")");var i=l(e,t),r=$("#"+e.id),c=r.find(".progress .progress-bar");c.length||(c=$('
').appendTo(r).find(".progress-bar")),r.find(".state").text(a+"("+i+")"),c.css("width",a)}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||c.push(t.info)}catch(a){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var a=36*t.index(".item");$(".uploader-content").scrollTop(a)}o++;var i=e.serverData;if(i&&i.data){var n=LNG[i.data];if(i.code){if(t.addClass("success"),t.find(".state").removeClass("upload-loading").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),i.info){var s="/"+ltrim(htmlEncode(i.info),"/");t.find(".info .title").html(core.pathThis(s)).attr("title",s).attr("data-name",s)}}else n="上传异常!",t.addClass("error").find(".state").removeClass("upload-loading").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||d(!1)}).on("uploadError",function(e,t){var a=LNG.upload_error+"("+t+")";if(e.serverData){var i=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,i>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData.data){var n=e.serverData.data;a=LNG[n]?LNG[n]:n}else e.serverData._raw&&(a=e.serverData._raw)}"http"==t&&(a=LNG.upload_error_http),"abort"==t&&void 0==e.serverData&&(a=LNG.not_support+"(support on chrome)"),o++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error").removeClass("upload-loading"),$("#"+e.id).find(".state").html(a).attr("title",a)}).on("uploadFinished",function(){$(".dialog-file-upload .aui-title").text(LNG.upload_success+": "+o+"/"+n),Title.reset(),n=0,o=0,uploader.reset(),d(!0)}).on("error",function(e){Tips.tips(e,!1)});var p;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}p&&window.clearTimeout(p)},dragLeave=function(e){stopPP(e),p&&window.clearTimeout(p),p=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.path.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e="FileSelectApi",t=function(){var t=$.parseUrl();if(t.params.fileSelect){var a=t.params.fileSelect,i=parseInt(t.params.fileSelectSingle),n=t.params.fileSelectAllow;kodReady.push(function(){Hook.bind("explorer.fileSelect.change",function(){d()}),d()});var o=function(e,t){var a={type:e,data:t};l.send(jsonEncode(a))},s=function(e){var t=jsonDecode(e);if(!t||!t.type)return console.log("parse error!"+e),void 0;var a=t.type,n=t.data;if("makeUrl"==a){$.isArray(n)||(n=[n]);var s=[],r=function(){Tips.close(LNG.loading),i&&(s=s[0]),o("makeUrl",s)};Tips.loading(LNG.loading);for(var l=0;n.length>l;l++){var c=n[l];core.fileLink(c,function(e){s.push({name:core.pathThis(c),url:e}),n.length==s.length&&r()})}}},r=window.parent;if(window.MessageInit)l.addTarget(r,"ParentPage");else{var l=new Messenger("ChildPage",e);l.addTarget(r,"ParentPage"),l.listen(s),window.MessageInit=!0}var c=function(e){var t=n.split("|"),a=core.pathExt(e);return""==n||""!=n&&-1!=$.inArray(a,t)?!0:!1},d=function(){var e=ui.fileLight.fileListSelect(),t=[];if(i){var n=$(e.get(0));if("all"==a&&0==e.length)t={file:[],folder:[]};else if("file"==a&&0==e.length)t=[];else if("folder"==a)t=[G.thisPath],n.hasClass("folder-box")&&(t=[ui.fileLight.path(n)]);else if("file"==a){if(n.hasClass("file-box")){var o=ui.fileLight.path(n);c(o)&&(t=[o])}}else if("all"==a)if(n.hasClass("folder-box")){var o=ui.fileLight.path(n);t=[{file:[],folder:[o]}]}else if(n.hasClass("file-box")){var o=ui.fileLight.path(n);c(o)&&(t={file:[o],folder:[]})}}else{var s=[],r=[];e.each(function(){if($(this).hasClass("file-box")){var e=ui.fileLight.path($(this));c(e)&&s.push(e)}else $(this).hasClass("folder-box")&&r.push(ui.fileLight.path($(this)))}),"folder"==a?t=r:"file"==a?t=s:"all"==a&&(t={file:s,folder:r})}u(t)},p=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},u=function(e){if("all"!=a){for(var t=[],i=0;e.length>i;i++)p(e[i])&&t.push(e[i]);e=t}0==e.length||"all"==a&&0==e.file.length&&0==e.folder.length?o("selectChange",0):o("selectChange",e)}}};return t(),{pathSelect:function(t,a){var i={type:"file",single:!0,allowExt:"",firstPath:!1,makeUrl:!1,title:LNG.path_api_select_file,resize:!0,fixed:!0,top:"50%",ico:core.icon("folder"),lock:!0,background:"#000",animate:!0,opacity:.1,width:900,height:500},n={id:"pathSelectApi",ok:function(){if("function"==typeof a){var e=s.DOM.wrap.find(".path-select-input").data("result");if(!e)return Tips.tips(LNG.error,!1),void 0;if(e){var i=e;if(t.single&&"all"!=t.type&&(i=e[0]),t.makeUrl&&"file"==t.type)return l("makeUrl",i),!1;a(i)}else Tips.tips(LNG.error,!1)}},cancel:!0};t=$.extend(i,t),n=$.extend(n,t);var o=G.appHost+"explorer&type=iframe";o+="&fileSelect="+t.type,o+="&fileSelectSingle="+Number(t.single),o+="&fileSelectAllow="+t.allowExt,t.firstPath&&(o+="&path="+t.firstPath);var s=$.dialog.open(o,n),r='
';"file"==t.type&&(r+='
'+t.allowExt+" "),$(r).insertBefore($(s.DOM.wrap).find(".aui-state-highlight"));var l=function(e,t){var a={type:e,data:t};messengerParent.send(jsonEncode(a))},c=function(e){var i=jsonDecode(e);if(!i||!i.type)return console.log("parse error!"+e),void 0;var n=i.type,o=i.data;if("makeUrl"==n)a(o),$.artDialog.list.pathSelectApi.close();else if("selectChange"==n){var s=$(".pathSelectApi"),r=s.find(".path-select-input"),l=s.find(".aui-state-highlight");o?l.removeClass("disable"):l.addClass("disable");var c="";if(t.single)c=core.pathThis(o[0]);else{var d=o;"all"==t.type&&(d=o.folder.concat(o.file)),$.each(d,function(e,t){c+=core.pathThis(t)+","}),c=rtrim(c,",")}r.data("result",o),r.val(c)}},d=$("[name=OpenpathSelectApi]").get(0).contentWindow;window.MessagerParentInit?messengerParent.addTarget(d,"ParentPage"):(window.messengerParent=new Messenger("ParentPage",e),messengerParent.addTarget(d,"ParentPage"),messengerParent.listen(c),window.MessagerParentInit=!0)},randomImage:function(e){var t=G.settings.pluginServer+"wallpage/index&lang="+G.lang+"&callback=?";$.getJSON(t,function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",[],function(){var e={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(e){var t=G.staticPath+"others/sound/"+e;Hook.trigger("playSound",t)};return{playSoundFile:t,playSound:function(a){G&&G.userConfig&&"1"==G.userConfig.soundOpen&&setTimeout(function(){t(e[a])},50)}}}),define("app/common/core.formMake",[],function(e){var t,a,i,n={user:!1,group:!1,role:!1},o=function(){t=$("#"+a),t.find(".tab-group .tab-item").length>1?s():t.find(".tab-group").addClass("hidden"),t.find(".form-row.form-slider").exists()&&r(),t.find(".form-row.form-dateTime").exists()&&l(),t.find(".form-row.form-color").exists()&&c(),t.find(".form-row.form-fileSelect").exists()&&d(),t.find(".form-row select").exists()&&p(),t.find(".form-row.form-userSelect").exists()&&u(),t.find(".form-row.error [name]").die("change").live("change",function(){$(this).parents(".form-row.error").removeClass("error")}),t.find(".form-userSelect").die("click").live("click",function(){$(this).removeClass("error")})},s=function(){var e=t.find(".tab-content .tab-pane"),a=t.find(".tab-group .tab-item");e.each(function(){var i=$(this).attr("id"),n=t.find("."+i);n.length>0?n.appendTo($(this)):(e.filter("#"+i).remove(),a.find('[data-id="'+i+'"]').parent().remove())}),a.click(function(){a.removeClass("active"),$(this).addClass("active");var t=$(this).find("a").attr("data-id");e.removeClass("active"),e.filter("#"+t).addClass("active")})},r=function(){seajs.use("lib/bootstrap-slider/bootstrap-slider.css"),seajs.use("lib/colorpicker/css/colorpicker.css"),e.async("lib/bootstrap-slider/bootstrap-slider.js",function(){t.find(".form-slider input").slider()})},l=function(){e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){var e="zh-CN"==G.lang||"zh-TW"==G.lang?"ch":"en";t.find(".form-dateTime input").each(function(){var t=$(this).attr("data-format"),a=["Y","y","L","F","M","t","n","m","d","D","j","l","N","S","W","z","w"],i=["H","h","i","s","A","a","b","g","G","O","P","c","U"],n=!1,o=!1;t||(t="Y/m/d");for(var s=0;a.length>s;s++)if(-1!==t.indexOf(a[s])){n=!0;break}for(var s=0;i.length>s;s++)if(-1!==t.indexOf(i[s])){o=!0;break}$(this).datetimepicker({format:t,datepicker:n,timepicker:o,lang:e}).blur(function(){$(this).trigger("change")})})}),t.find(".form-dateTime .input-btn-right").unbind("click").click(function(){$(this).parent().find("input").focus()})},c=function(){e.async("lib/colorpicker/js/colorpicker",function(){t.find(".form-color input").ColorPicker({onBeforeShow:function(e){$(e).attr("input-name",$(this).attr("name")),$(this).ColorPickerSetColor(this.value)},onShow:function(e){return $(e).fadeIn(100),!1},onHide:function(e){return $(e).fadeOut(100),!1},onChange:function(e,t){var a=$($(this).data("colorpicker").el);a.val("#"+t).trigger("change"),a.parent().find(".btn i").css("background",a.val())}}).bind("keyup",function(){$(this).ColorPickerSetColor(this.value),$(this).parent().find(".btn i").css("background",$(this).val())}),t.find(".form-color .input-btn-right").unbind("click").click(function(){$(this).parent().find("input").click()})})},d=function(){t.find(".path-select").die("click").live("click",function(){var e=$(this);core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(t){var t=core.path2url(t);e.parent().find("input[type=text]").val(t).trigger("change")})})},p=function(){seajs.use("lib/select2/css/select2.min.css"),e.async("lib/select2/js/select2.full.min.js",function(){var a=function(t,a){t.on("select2:select",function(e){if(!t.attr("multiple"))return t.select2("close"),void 0;var a=$(e.params.data.element);a.detach(),t.append(a),t.trigger("change.select2")}).on("select2:unselect",function(e){stopPP(e.params.originalEvent)}).on("change",function(){setTimeout(function(){$(window).trigger("resize")},10)}),"group"==a&&t.on("select2:open",function(){e.async("lib/ztree/ztree",function(){h(t,n[a])})});var i=t.attr("data-value");i&&(t.attr("multiple")&&(i=i.split(",")),t.val(i).trigger("change"))};t.find("select").each(function(){var e=$(this),t=e.attr("data-server"),i=!1;"tags"==e.parents(".form-row").attr("data-type")&&(i=!0),t?f(t,function(n){e.select2({data:n,tags:i,tokenSeparators:[","," "],closeOnSelect:!1}),a(e,t)}):(e.select2({closeOnSelect:!1,tags:i,tokenSeparators:[","," "]}),a(e,t))})})},u=function(){var e=t.find(".form-userSelect .btn-group"),a="btn-active",i="hidden";e.find("button").unbind("click").bind("click",function(){var e=$(this).attr("data-type"),t=$(this).parents(".btn-group"),n=t.parent().find(".user-select"),o=t.parent().find(".user-select-"+e);n.filter(":visible"),t.attr("multiple")?"all"==e?(t.find("button").removeClass(a),$(this).addClass(a),n.addClass(i),o.removeClass(i)):($(this).toggleClass(a),o.toggleClass(i),$(this).hasClass(a)?t.find("[data-type=all]").removeClass(a):t.find("."+a).exists()||t.find("[data-type=all]").addClass(a)):(t.find("button").removeClass(a),$(this).addClass(a),n.addClass(i),o.removeClass(i))})},f=function(e,t){var a=function(e){var t=[];for(var a in e)t.push({id:a,text:e[a].name});return t};if(n[e]&&t)return t(a(n[e])),void 0;var i={user:G.appHost+"systemMember/get",group:G.appHost+"systemGroup/get",role:G.appHost+"systemRole/get"};return null==n[e]?(Hook.bind("loadDataServer-"+e,function(){t(a(n[e]))}),void 0):(n[e]=null,$.ajax({url:i[e],dataType:"json",error:function(){n[e]=!1,Tips.tips(LNG.system_error,0)},success:function(i){return i.code?(n[e]=i.data,t&&t(a(n[e])),Hook.trigger("loadDataServer-"+e),void 0):(Tips.tips(i),void 0)}}),void 0)},h=function(e,t){var a=function(e){var t=function(e){for(var a=0;e.length>a;a++)void 0!=e[a]?(e[a].pid=e[a].parentID,e[a].id=e[a].groupID,delete e[a].children,delete e[a].parentID,delete e[a].groupID,e[a].child&&(e[a].children=e[a].child,delete e[a].child,t(e[a].children))):delete e[a]},a=[],i=$.extend(!0,{},e);for(var n in i){var o=i[n],s=o.parentID;if(i[s])i[s].child||(i[s].child=[]),i[s].child.push(i[o.groupID]);else{var r=i[o.groupID];r&&a.push(r)}}return t(a),a},i={view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=12,i=$("#"+e+" #"+t.tId+"_switch"),n=$("#"+e+" #"+t.tId+"_ico");if(n.before(i).after('
>').before(''+core.iconSmall("group-guest")+" ").removeClass("ico_docu").addClass("group_icon").remove(),t.level>=1){var o=" ";i.before(o)}$("#"+e+" #"+t.tId+"_a").attr("data-group-id",t.id)}},callback:{onClick:function(e,t,a){n(t,a)}}},n=function(t,a){var i=$("#"+a.tId+"_a");if(i.removeClass("curSelectedNode"),e.attr("multiple")){i.toggleClass("this");var n=e.val();$.isArray(n)||(n=[]),i.hasClass("this")?n.push(a.id):n=_.without(n,a.id),$.each(n,function(){var t=e.find("[value="+this+"]");t.detach(),e.append(t)}),e.val(n).trigger("change")}else $("#"+t+" [treenode_a].this").removeClass("this"),i.toggleClass("this"),e.val(a.id).trigger("change"),e.select2("close")},o=function(){var t=e.val(),a=$(".select2-container--open .group-list-tree").attr("id"),i=$.fn.zTree.getZTreeObj(a);$("#"+a+" [treenode_a]").removeClass("this"),"string"==typeof t&&(t=[t]),t&&i.getNodesByFilter(function(e){inArray(t,e.id+"")&&$("#"+e.tId+"_a").addClass("this")})},s=function(e){var t=$(".select2-container--open .group-list-content");t.find(".select2-results__options,.group-list-tree").removeClass("hidden"),"search"==e?t.find(".group-list-tree").addClass("hidden"):t.find(".select2-results__options").addClass("hidden")},r=function(t){var n=function(e){e.unbind("change input").bind("change input",function(){$(this).val().length>0?s("search"):s("tree")})};if(e.attr("multiple")?n(e.parent().find(".select2-search__field")):n($(".select2-container--open .select2-search__field")),$(".select2-container--open .group-list-tree").exists())return o(),s("tree"),void 0;e.on("open",function(){o()}).on("select2:unselect",function(){o()});var r=UUID(),l='
';$(l).appendTo(".select2-container--open .select2-results"),$(".select2-container--open .select2-results__options").addClass("hidden").parent().addClass("group-list-content");var c=a(t);$.fn.zTree.init($("#"+r),i,c);var d=$.fn.zTree.getZTreeObj(r);d&&d.expandAll(!0),o(),s("tree")};r(t)},m=function(){var e={},a=[],n=function(e){for(var t={all:"0",user:"",group:"",role:""},a=e.split(";"),i=0;a.length>i;i++){var n=a[i].split(":");2==n.length&&(t[n[0]]=n[1])}return"0"!=t.all||t.user||t.group||t.role?!0:!1};if(t.find(".form-row").each(function(){var t=$(this),o=$(this).attr("data-type"),s=$(this).find("[name]");$(this).find(".setting-title .require").exists();var r=s.attr("name"),l=!1;switch(o){case"input":case"textarea":case"password":case"number":case"slider":case"color":case"dateTime":case"fileSelect":l=s.val();break;case"switch":l=s.prop("checked")+0+"";break;case"radio":l=s.filter(":checked").attr("value");break;case"checkbox":l=[],s.filter(":checked").each(function(){l.push($(this).val())}),l=l.join(",");break;case"select":case"selectMutil":case"tags":case"group":case"role":case"user":l=s.val(),$.isArray(l)&&(l=l.join(",")),null==l&&(l="");break;case"userSelect":var c={all:"0",user:"",group:"",role:""};t.find(".btn-group .btn-active").each(function(){var e=$(this).attr("data-type"),a="1";"all"!=e&&(a=$(t).find(".user-select-"+e+" select").val(),$.isArray(a)&&(a=a.join(",")),null==a&&(a="")),c[e]=a}),l="all:"+c.all+";user:"+c.user+";group:"+c.group+";role:"+c.role;break;default:}$(this).removeClass("error"),i[r]&&i[r].require&&(l===!1||null===l||"string"==typeof l&&""===l||"userSelect"==i[r].type&&!n(l))?($(this).addClass("error"),a.push({name:r,value:l})):e[r]=l}),a.length>0){Tips.tips(LNG.PluginConfigNotNull,"warning");var o=t.find(".panel-body"),s=t.find(".form-row.error");if(!s.parents(".tab-pane").hasClass("active")){var r=s.parents(".tab-pane").attr("id");t.find('.tab-group [data-id="'+r+'"]').click()}s.inScreen()||o.animate({scrollTop:s.offset().top-o.offset().top+o.scrollTop()},100),s.find("[name]").first().focus(),s.find(".setting-content").flash(3,100)}return{checked:0==a.length,error:a,result:e}},v=function(t){e.async(t,function(e){e&&($.isFunction(e)?e():"object"==typeof e&&e.hasOwnProperty("main")&&$.isFunction(e.main)&&e.main())})},g=function(e){if("string"==typeof e)return v(file),!1;if($.isPlainObject(e.formStyle)&&e.formStyle.loadFile){var t=e.formStyle.loadFile;"string"==typeof t&&(t=[t]),$.isArray(t)&&$(t).each(function(e,t){v(t)})}i=e,a=UUID();var n=template.compile(tplFormMake),o=n({LNG:LNG,items:e,wrapID:a});return o},b=function(e,t,a){var i=g(e);if(!i)return!1;var n={padding:0,fixed:!0,resize:!0,title:LNG.search,ico:core.icon("config"),width:680,height:500,content:i,okVal:LNG.button_save,ok:function(){var e=m();return e.checked?a(e.result):!1}};if($.isPlainObject(t))for(var s in t)n[s]=t[s];var r=$.dialog(n),l=r.DOM.wrap.find(".aui-title").html();return r.DOM.wrap.find(".modal-title").html(l),o(),r};return{makeHtml:g,bindEvent:o,getFormData:m,initDialog:b}}),define("app/common/rightMenuExtence",[],function(){$.contextMenu||($.contextMenu={}),$.contextMenu.show=function(e,t,a){e&&($.contextMenu.hidden(),$(e).contextMenu({x:t,y:a}))},$.contextMenu.menuShow=function(){var e=$(".context-menu-active"),t=e.data("contextMenu");if(e&&t){var a=t.$menu,i="disable";
a.find(".disable").addClass(i),Hook.trigger("rightMenu.show",t.selector,e,a),Hook.trigger("rightMenu.show"+t.selector,e,a)}},$.contextMenu.isDisplay=function(){return 0==$(".context-menu-list:visible").length?!1:!0},$.contextMenu.hidden=function(){$(".context-menu-list").filter(":visible").filter(":not(.menu-not-auto-hidden)").trigger("contextmenu:hide")},$.contextMenu.menuAdd=function(e,t,a,i){var n=!1,o=$.contextMenu.menus;for(var s in o)if(o[s].selector==t){n=o[s];break}if(n&&e){var r=function(e){return e?-1!==e.indexOf("/")?' ':' ':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='()");var c='"}var p=$(c).clone();a?e.$menu.find(a).first().after(p):i&&e.$menu.find(i).first().before(p);var u=p.parent(".context-menu-list").data("contextMenu");p.data({contextMenu:u,contextMenuKey:t,contextMenuRoot:n});var f={$input:null,$label:null,accesskey:o.accesskey,className:o.className,icon:o.icon,name:o.name,_name:d,$node:p};if(u&&(u.items||(u.items={}),u.items[t]=f),"string"!=typeof o&&(e.commands||(e.commands={}),e.commands[t]=f,n.commands[t]=f,n.callbacks[t]=function(e,t){o.callback(e,t)},o.accesskey&&(n.accesskeys[o.accesskey]=f),o.items)){var c='';$(c).appendTo(p),f.$menu=p.find("ul."+t),f.callback=null,f.appendTo=f.$node,f.type="sub",p.data("contextMenu",f).addClass("context-menu-submenu"),p.find("ul."+t).data({contextMenuRoot:n,contextMenu:f}),p.find("li."+t+"-first").data({contextMenuRoot:n,contextMenuKey:t+"-first",contextMenu:f}),f.items||(f.items={}),f.items[t+"-first"]={$input:null,$label:null,icon:"",name:"",_name:"",$node:p.find("li."+t+"-first")},l(f,o.items,"."+t+"-first")}})};l(n,e,a,i)}};var e=function(){return $('').appendTo("#rightMenu"),"function"!=typeof $.contextMenu?console.info("$.contextMenu is not function!"):($.contextMenu({zIndex:9999,selector:".dialog-menu",items:{"dialog-quit":{name:LNG.close,className:"dialog-quit",icon:"remove",accesskey:"q"},"dialog-max":{name:LNG.dialog_max,className:"dialog-max",icon:"resize-full",accesskey:"a"},"dialog-min":{name:LNG.dialog_min,className:"dialog-min",icon:"minus",accesskey:"i"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},"open-window":{name:LNG.open_ie,className:"open-window",icon:"globe",accesskey:"b"},qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=$.dialog.list[a];switch(e){case"dialog-quit":i.close();break;case"dialog-min":i._clickMin(!1);break;case"dialog-max":i._clickMax();break;case"refresh":i.refresh();break;case"open-window":i.openWindow();break;case"qrcode":core.qrcode(i.DOM.wrap.find("iframe").attr("src"));break;default:}}}),$(".aui-title img,.aui-title .x-item-file").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).parent().parent().contextMenu({x:e.pageX,y:t.top})}).die("dblclick").live("dblclick",function(){var e=$(this).parent().parent().attr("id"),t=$.dialog.list[e];t.close(),$.contextMenu.hidden()}),void 0)};Hook.bind("rightMenu.show.dialog-menu",function(e,t){var a=e.attr("id"),i=$.dialog.list[a],n="hidden",o=".open-window,.refresh,.qrcode,.context-menu-separator";i.hasFrame()?t.find(o).removeClass(n):t.find(o).addClass(n);var s=".dialog-min,.dialog-max";$("."+a).hasClass("dialog-can-resize")?t.find(s).removeClass(n):t.find(s).addClass(n)}),e()}),define("app/app/appBase",[],function(){var e={},t={},a={},i=!1,n=function(a){a.title=void 0==a.title?a.name:a.title,void 0==a.name&&(a.name=UUID(),a.hidden=!0),e[a.name]=a,a.ext||(a.ext="");var i=a.ext.split(",");e[a.name].extArr=i,a.sort=a.sort!==void 0?parseInt(a.sort):0;for(var n=0;i.length>n;n++){var o=trim(i[n]);e[a.name].extArr[n]=o,t[o]||(t[o]=[]);for(var s=!1,r=0;t[o].length>r;r++)if(t[o][r].name==a.name){s=!0;break}s||(t[o].push({name:a.name,sort:a.sort}),t[o].length>1&&(t[o]=_.sortBy(t[o],"sort").reverse()))}Hook.trigger("kodApp.add.finished")},o=function(){return t},s=function(i){if(!i||!e[i])return!1;delete e[i];for(var n in a)if(a[n]==i){delete a[n];break}for(var n in t){for(var o=t[n],s=[],r=0;o.length>r;r++)o[r].name!=i&&s.push(o[r]);0==s.length?delete t[n]:t[n]=s}},r=function(i){if(i===void 0){var n=[];for(var o in e)e[o].hidden||n.push(e[o]);return n}var s=a[i],n=[];if(!s&&!t[i])return!1;if(s&&(e[s]?n.push(e[s]):delete a[i]),!t[i])return n;for(var r=0;t[i].length>r;r++){var l=t[i][r].name;e[l]&&l!=s&&n.push(e[l])}return n},l=function(e){i=e},c=function(){return i},d=function(t,a,i){a&&"file"!=a||(a=core.pathExt(t)),i=i?i:"";var n={path:t,ext:a,appName:i};if(!Hook.trigger("kodApp.open.before",n)){if(t=n.path,a=n.ext,i=n.appName)var o=e[i];else{var s=r(a);if(!s||0==s.length)return kodApp.openUnknow(t,""),void 0;var o=s[0]}if(!o)return Tips.tips("["+i+"] not exists",!1);try{o.callback(t,a),Hook.trigger("kodApp.open.after",t,a,o)}catch(l){kodApp.openUnknow(t,""),console.error("kodApp.open error:",l)}}},p=function(t){var a=r(t),i=r("");""==t&&(a=!1),a?a.push({name:""}):a=[],a=a.concat(i);for(var n={},o=0;a.length>o;o++){var s=a[o];""==s.name||s.hidden?n["step-line"]="-------":n[s.name]={app:s.name,name:s.title,className:s.className,icon:s.icon,callback:function(t){var a=e[t];if(a&&a.callback){if($(".context-menu-active"),$(".context-menu-active").hasClass("menu-tree-file"))var i=ui.tree.makeParam();else var i=ui.path.makeParam();a.callback(i.path,i.type)}}}}return n},u=function(e,t){f(e,t),G.userConfig.kodAppDefault=htmlEncode(jsonEncode(a)),G.shareInfo||$.get(G.appHost+"setting/set&k=kodAppDefault&v="+jsonEncode(a))},f=function(t,i){if("string"==typeof t)a[t]=i;else if($.isArray(t))for(var n=0;t.length>n;n++)a[t[n]]=i;else if(e[i]&&$.isArray(e[i].extArr))for(var o=e[i].extArr,n=0;o.length>n;n++)a[o[n]]=i},h=function(){G.userConfig.kodAppDefault="[]",a={}},m=function(t,a){var t=e[t];return t?a?inArray(t.extArr,a):t.ext:!1},v=function(a,i,n){var a=e[a];if(!a)return!1;var o="undefined"==n?0:parseInt(n);0==o&&a.sort!==void 0&&(o=parseInt(a.sort)),"string"==$.type(i)&&(i=i.split(","));for(var s=0;i.length>s;s++){var r=i[s];if(r){inArray(a.extArr,r)||a.extArr.push(r),t[r]||(t[r]=[]);for(var l=!1,c=0;t[r].length>c;c++)t[r][c].name!=a.name||(t[r][c].sort=o,l=!0);l||t[r].push({name:a.name,sort:o})}}},g=function(){if(G.userConfig&&G.userConfig.kodAppDefault)try{var e=G.userConfig.kodAppDefault;e=jsonDecode(htmlDecode(e)),$.isPlainObject(e)&&(a=e)}catch(t){}Hook.bind("rightMenu.show.menu-file,rightMenu.show.menu-tree-file",function(e,t){if(e.hasClass("menu-tree-file"))var a=ui.tree.makeParam();else var a=ui.path.makeParam();var i=core.pathExt(a.path),n="hidden";if(kodApp.getApp(i)){var o=kodApp.getAppMenu(i);t.find("li.open-with.context-menu-submenu").removeClass(n),t.find("ul.context-menu-list.open-with .context-menu-item").not(".open-with-first").remove(),$.contextMenu.menuAdd(o,".menu-file",".open-with-first"),$.contextMenu.menuAdd(o,".menu-tree-file",".open-with-first")}else t.find("li.open-with.context-menu-submenu").addClass(n)}),Hook.trigger("kodApp.ready")};return g(),{debug:function(){return{appList:e,openDefault:t,openUser:a}},add:n,remove:s,appSupportCheck:m,appSupportSet:v,getApp:r,getAppBind:o,getAppMenu:p,setLastOpenTarget:l,getLastOpenTarget:c,setOpenUser:u,setOpenUserLocal:f,clearOpenUser:h,open:d}}),define("app/app/editor",[],function(){kodApp.add({name:"aceEditor",title:LNG["Plugin.default.aceEditor"],sort:0,ext:"txt,textile,oexe,inc,csv,log,asc,tsv,lnk,url,webloc,meta,localized,xib,xsd,storyboard,plist,csproj,pch,pbxproj,local,xcscheme,manifest,vbproj,strings,jshintrc,sublime-project,readme,changes,changelog,version,license,changelog,abap,abc,as,asp,aspx,ada,adb,htaccess,htgroups,htgroups,htpasswd,asciidoc,adoc,asm,a,ahk,bat,cmd,cpp,c,cc,cxx,h,hh,hpp,ino,c9search_results,cirru,cr,clj,cljs,cbl,cob,coffee,cf,cson,cakefile,cfm,cs,css,curly,d,di,dart,diff,patch,dockerfile,dot,dummy,dummy,e,ge,ejs,ex,exs,elm,erl,hrl,frt,fs,ldr,ftl,gcode,feature,.gitignore,glsl,frag,vert,gbs,go,groovy,haml,hbs,handlebars,tpl,mustache,hs,hx,html,hta,htm,xhtml,eex,html.eex,erb,rhtml,html.erb,ini,inf,conf,cfg,prefs,io,jack,jade,java,ji,jl,jq,js,jsm,json,jsp,jsx,latex,ltx,bib,lean,hlean,less,liquid,lisp,ls,logic,lql,lsl,lua,lp,lucene,Makefile,makemakefile,gnumakefile,makefile,ocamlmakefile,make,md,markdown,mask,matlab,mz,mel,mc,mush,mysql,nc,nix,nsi,nsh,m,mm,ml,mli,pas,p,pl,pm,pgsql,php,phtml,shtml,php3,php4,php5,phps,phpt,aw,ctp,module,ps1,praat,praatscript,psc,proc,plg,prolog,properties,proto,py,r,cshtml,rd,rhtml,rst,rb,ru,gemspec,rake,guardfile,rakefile,gemfile,rs,sass,scad,scala,scm,sm,rkt,oak,scheme,scss,sh,bash,bashrc,sjs,smarty,tpl,snippets,soy,space,sql,sqlserver,styl,stylus,svg,swift,tcl,tex,toml,twig,swig,ts,typescript,str,vala,vbs,vb,vm,v,vh,sv,svh,vhd,vhdl,wlk,wpgm,wtest,xml,rdf,rss,wsdl,xslt,atom,mathml,mml,xul,xbl,xaml,xq,yaml,yml,vcproj,vcxproj,filters,cer,reg,config,pem,srt,ass,lrc,opf,ncx",icon:G.staticPath+"images/file_icon/icon_app/ace.png",callback:function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if(core.isApp("editor"))return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var a=t.$.dialog.list.openEditor,i=0;a&&"hidden"==$(a.DOM.wrap).css("visibility")&&(i=200,a.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},i)}else{var n=G.appHost+"editor/edit#filename="+urlEncode(e);G.sharePage!==void 0&&(n=G.appHost+"share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e));var o=htmlEncode(urlDecode(core.pathThis(e)));core.openDialog(n,core.icon("edit"),o,"openEditor")}}});var e=ShareData.frameTop();e.Config&&"editor"==e.Config.pageApp&&kodApp.setOpenUserLocal(!1,"aceEditor")}),define("app/app/openWith",[],function(){kodApp.add({name:"appOpenSetting",title:LNG["Explorer.UI.appSetDefault"],ext:"",icon:G.staticPath+"images/file_icon/icon_others/setting.png",callback:function(e,t){var a=" {{LNG['Explorer.UI.appAwaysOpen']}}
",i=kodApp.getApp(t),n=!1;_.isArray(i)&&(n=i[0].name);var o=template.compile(a),s=o({LNG:LNG,apps:i,defaultApp:n,appAll:kodApp.getApp()}),r=$.dialog({id:"dialog-app-select",className:"menu-empty",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG["Explorer.UI.selectAppDesc"],width:480,height:360,padding:"20px",content:s,ok:function(){return l()}}),l=function(){var a=$("#app-default-checkbox").prop("checked"),i=$(".app-list.active .app-item.select").attr("data-app");return i?(r.close(),kodApp.open(e,t,i),a&&kodApp.setOpenUser(t,i),!0):(Tips.tips(LNG["Explorer.UI.selectAppWarning"],"warning"),!1)};$(".tab-group .tab-item").die("click").live("click",function(){var e=$(this).find("[aria-controls]").attr("aria-controls");"app-list-support"==e?$("#app-default-checkbox").prop("checked",!0):$("#app-default-checkbox").prop("checked",!1)}),$(".app-item").die("click").live("click",function(){$(this).parent().find(".select").removeClass("select"),$(this).addClass("select")}).die("dblclick").live("dblclick",function(){l()})}})}),define("app/app/html",[],function(){var e=function(e){return void 0==e?!1:0===e.indexOf("http")?!0:G.shareInfo||core.pathReadable(e)?!0:(Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),!1)};Hook.bind("kodApp.open.before",function(t){return"folder"==t.ext?(core.isApp("explorer")||isWap()?ui.path.list(t.path+"/"):core.explorer(t.path),!0):e(t.path)?("file"==t.ext&&(t.ext=""),void 0):!0}),kodApp.openUnknow=function(e,t){void 0==t&&(t="");var a=G.appHost+"pluginApp/index&search="+core.pathExt(e),i="kodApp.open(pathHashDecode('"+pathHashEncode(e)+"'),false,'appOpenSetting');",n="kodApp.open(pathHashDecode('"+pathHashEncode(e)+"'),false,'aceEditor');",o="kodApp.download(pathHashDecode('"+pathHashEncode(e)+"'));",s="core.openWindow('"+a+"');",r=LNG.unknow_file_try+' '+LNG.unknow_file_tips+" "+t+'
1.'+r+i+'">'+LNG["Explorer.UI.openWith"]+'
2.'+r+n+'">'+LNG["Explorer.UI.openWithText"]+'
3.'+r+o+'">'+LNG.unknow_file_download+'
'+r+s+'">'+LNG.PluginCenter+""+LNG.unknow_plugin_search+"
";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:"20px 50px",content:l,cancel:!0}),$(".unknow-file a").unbind("click").bind("click",function(e){return $(this).parents(".artDialog").data("artDialog").close(),stopPP(e)})},kodApp.add({name:"download",title:LNG.download,hidden:!0,icon:"x-item-file x-html",callback:function(t){if(e(t)){var a=t;"http"!=t.substr(0,4)&&(a=G.appHost+"explorer/fileDownload&accessToken="+G.accessToken+"&path="+urlEncode(t),G.sharePage!==void 0&&(a=G.appHost+"share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(t))),$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),isWap()?window.open(a):$('
').appendTo("body")}}}),kodApp.download=function(e){kodApp.open(e,"","download")},kodApp.openWindow=function(e){kodApp.open(e,"","browserOpen")},kodApp.add({name:"browserOpen",title:LNG.open_ie,sort:-100,icon:"x-item-file x-html",callback:function(t){if(e(t)){var a=core.path2url(t);isWap()?window.location.href=a:window.open(a)}}}),kodApp.add({name:"swfPlayer",title:"Flash Player",ext:"swf",icon:"x-item-file x-swf",callback:function(e,t){$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))})}}),kodApp.add({name:"webLink",title:"webLink",ext:"url,webloc",sort:10,icon:"x-item-file x-html",callback:function(e,t){core.fileGet(e,function(a){if("url"==t){var i=a.match(/URL=(.*)/);if(i.length>=2)return window.open(i[1])}else if("webloc"==t)try{var n=$($.parseXML(a)),o=n.find("string").text();return window.open(o),void 0}catch(s){}kodApp.open(e,t,"editor")})}}),kodApp.add({name:"htmlView",title:LNG["Plugin.default.htmlView"],ext:"htm,html,shtml",sort:10,icon:"x-item-file x-html",callback:function(e){var t=core.path2url(e);core.openDialog(t,core.icon("html"),core.pathThis(e))}}),kodApp.add({name:"pdfView",title:"PDF Simple",ext:"pdf",sort:0,icon:"x-item-file x-pdf",callback:function(e,t){var a=core.path2url(e),i="pdf"+UUID(),n='
";$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:"80%",height:"75%",padding:0,content:n}),PDFObject.embed(a,"#"+i)}}),kodApp.add({name:"oexeOpen",title:LNG["kodApp.oexe.open"],ext:"oexe",sort:100,icon:" x-item-file x-oexe",callback:function(e){core.fileGet(e,function(t){var a=jsonDecode(t);a.name=core.pathThis(e),core.openApp(a)})}}),kodApp.add({name:"oexeEdit",title:LNG["kodApp.oexe.edit"],ext:"oexe",sort:50,icon:"icon-edit ",callback:function(e){core.fileGet(e,function(t){var a=jsonDecode(t);a.name=core.pathThis(e),a.path=e,ui.path.pathOperate.appEdit(a)})}});var t={createApp:{name:LNG.app_create,className:"createApp newfile",icon:"icon-puzzle-piece x-item-file x-oexe",callback:function(){ui.path.pathOperate.appEdit(0,0,"userAdd")}}};$.contextMenu.menuAdd(t,".menu-body-main",".app-install"),$.contextMenu.menuAdd(t,".toolbar-path-more",".app-install"),$.contextMenu.menuAdd(t,".bodymain",".app-install"),Hook.bind("rightMenu.show",function(e,t,a){var i=[".menu-folder",".menu-file",".menu-tree-folder",".menu-tree-file",".menu-tree-folder-fav"];if(a.find(".context-menu-submenu").fadeOut(0).delay(0).fadeIn(0),a.removeClass("menu-auto-fit"),a.inScreen()||a.addClass("menu-auto-fit"),".menu-body-main"==e){var n=a.find(".set-file-icon-size.context-menu-submenu");"icon"==G.userConfig.listType?n.removeClass("hidden"):n.addClass("hidden")}if(_.include(i,e)){var o="disabled",s=".cute,.rname,.remove",r=".open,.open-text,.down,.share,.copy,.cute,.rname,.remove,.open-browser,.search,.more-action";t.hasClass("file-not-readable")?a.find(r).addClass(o):a.find(r).removeClass(o),t.hasClass("file-not-writeable")?a.find(s).addClass(o):a.find(s).removeClass(o)}}),Hook.bind("rightMenu.show.menu-body-main",function(e,t){var a=".upload,.past,.newfolder,.newfile",i="disabled";_.get(G,"jsonData.info.canUpload")?t.find(a).removeClass(i):t.find(a).addClass(i)}),Hook.bind("rightMenu.show.menu-file",function(e,t){if($(".context-menu-active").hasClass("menu-tree-file"))var a=ui.tree.makeParam();else var a=ui.path.makeParam();var i=core.pathExt(a.path),n="hidden";inArray(["jpg","jpeg","png"],i)?t.find(".set-background").removeClass(n):t.find(".set-background").addClass(n)});var a=function(){var e=".close-item,.refresh,.newfile,.past,.info",t=".open-browser",a=".explorer,.create-project,.open-project",i=".close-item,.newfile,.refresh,.past,.down,.copy,.cute,.remove,.more-action,.clone,.info,.zip,.zip-zip,.zip-tar,.zip-tgz",n=".newfile,.cute,.past,.rname,.zip,.remove,.clone,.create-link-home,.create-link,.create-project",o=$(".menu-tool-path"),s="disabled",r=ui.fileLight.fileListSelect();o.find(".context-menu-item").addClass(s),0==r.length?o.find(e).removeClass(s):1==r.length?(o.find(".context-menu-item").removeClass(s),"folder"==ui.fileLight.type(r)?o.find(t).addClass(s):o.find(a).addClass(s)):r.length>1&&o.find(i).removeClass(s),G.jsonData&&G.jsonData.info&&G.jsonData.info.canUpload===!1&&o.find(n).filter(":not(."+s+")").addClass(s)};Hook.bind("explorer.fileSelect.init",function(){ui.fileLight.listNumberSet()}),Hook.bind("explorer.fileSelect.change",function(){a(),ui.fileLight.selectNumSet()}),Hook.bind("rightMenu.show.toolbar-path-more",function(){a()}),Hook.bind("rightMenu.initFinished",function(){if(1!=G.isRoot){var e="hidden";if(core.authCheck("explorer.fileDownload")||(kodApp.remove("browserOpen"),$(".context-menu-list .down,.context-menu-list .download").addClass(e),$(".context-menu-list .share").addClass(e),$(".context-menu-list .open-text").addClass(e),$(".pathinfo .open-window").addClass(e),$(".context-menu-list .open-browser").addClass(e)),core.authCheck("explorer.search")||$(".context-menu-list .search").addClass(e),core.authCheck("explorer.mkdir")||$(".context-menu-list .newfolder").addClass(e),core.authCheck("userShare.set")||$(".context-menu-list .share").remove(),core.authCheck("explorer.mkfile")||$(".context-menu-list .newfile,.tool-path-newfile").addClass(e),core.authCheck("explorer.mkdir")||$(".context-menu-list .newfolder,[data-action=newfolder]").addClass(e),core.authCheck("explorer.pathCopy")||($(".context-menu-list .cute").addClass(e),$(".context-menu-list .copy").addClass(e)),!core.authCheck("explorer.fileUpload")){$(".context-menu-list .upload").addClass(e);var t=$("[data-action=upload-more]");t.exists()&&t.parent().addClass(e)}}})}),define("app/common/tpl/copyright.html",[],'
\n
\n
\n \n {{if kod.window.core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}\n
\n
——{{LNG.kod_name_copyright}}
\n
\n
\n
{{@LNG.copyright_desc}}
\n
{{@LNG.copyright_contact}}
\n
{{@LNG.copyright_info}}
\n
\n
\n'),define("app/common/tpl/themeDIY.html",[],"@media screen and (max-width:100000px) {\n body .full-background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blurSize= (bgBlur==0?0:10) }}{{/if}}\n body .full-background:before{\n -webkit-filter: blur({{blurSize}}px);\n -moz-filter: blur({{blurSize}}px);\n -ms-filter: blur({{blurSize}}px);\n filter: blur({{blurSize}}px);\n }\n {{if bgType == 'image'}}\n body .full-background,\n body .full-background:before,\n body #body .menu-left,\n body #body .app-menu-left,\n body .aui-buttons,\n body .aui-state-focus .aui-title,body .aui-title{\n background-image:url({{bgImage}});\n }\n body .aui-state-focus .aui-title,body .aui-title{\n background-size:100%;\n }\n {{else}}\n body .full-background,\n body .full-background:before,\n body #body .menu-left, \n body #body .app-menu-left,\n body .aui-buttons,\n body .aui-state-focus .aui-title,body .aui-title{\n background:{{endColor}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{startColor}}', endColorstr='{{endColor}}');\n background-image: -webkit-linear-gradient({{colorRotate}}deg, {{startColor}}, {{endColor}});\n background-image: -moz-linear-gradient({{colorRotate}}deg, {{startColor}}, {{endColor}});\n background-image: -o-linear-gradient({{colorRotate}}deg, {{startColor}}, {{endColor}});\n background-image: -ms-linear-gradient({{colorRotate}}deg, {{startColor}}, {{endColor}});\n background-image: linear-gradient({{colorRotate}}deg, {{startColor}}, {{endColor}});\n }\n {{/if}}\n}\n"),define("app/shareCommon/topbar",[],function(){var e=function(){var e=G.appHost+"share/fileDownload&user="+G.user+"&sid="+G.sid,t=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid;"file"!=G.shareInfo.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button-my-share").hide(),$(".share-info-user .btn-group").show()):($(".btn.button-my-share").show(),$(".share-info-user .btn-group").hide()),"file"==G.shareInfo.type&&($(".btn.button-my-share").hide(),$(".share-info-user .btn-group").show()),"1"==G.shareInfo.notDownload&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share-info-user").removeClass("hidden"),$(".btn-download").attr("href",e);var a=date("Y/m/d H:i:s",G.shareInfo.mtime);$(".topbar .time").html(a),"file"==G.shareInfo.type&&$(".topbar .size").html(G.shareInfo.size),$(".topbar .info").html(LNG.share_view_num+G.shareInfo.numView+" "+LNG.share_download_num+G.shareInfo.numDownload),$("#button_share").die("click").live("click",function(){share()}),"A"!=core.versionType&&$(".version_vip_free").remove(),core.isApp("explorer")&&(console.log($(".btn-download")),$(".btn-download").hide().attr("href","").remove())};return{init:e}}),define("app/src/shareIndex/fileShow",["../edit/previewMarkdownParse"],function(e){var t="share/fileDownload&user="+G.user+"&sid="+G.sid,a="share/fileProxy&user="+G.user+"&sid="+G.sid,i=G.KOD_USER_SHARE+":"+G.user+"/";G.shareInfo&&G.shareInfo.name&&(i+=G.shareInfo.name+G.path);var n=function(){t=G.appHost+t,a=G.appHost+a,o(),G.shareInfo!==void 0?(G.path=htmlDecode(G.path),G.shareInfo.path=htmlDecode(G.shareInfo.path),"file"!=G.shareInfo.type&&(a+="&path="+urlEncode(G.path),t+="&path="+G.path),"1"==G.shareInfo.notDownload&&(t="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),topbar.init(),kodApp.open(i),s()):$(".share-info").addClass("hidden")},o=function(){kodApp.clearOpenUser(),kodApp.openUnknow=r,kodApp.remove("onlyoffice"),kodApp.setOpenUserLocal(!1,"autoDeskViewer"),kodApp.setOpenUserLocal(!1,"yzOffice"),kodApp.setOpenUserLocal(!1,"epubReader"),kodApp.add({ext:"jpg,jpeg,png,bmp,gif,ico,svg,cur,webp",sort:1e3,callback:function(){var e='
';$(".content-box").addClass("show-image").append(e)}}),kodApp.add({ext:"md",sort:1e4,callback:d}),kodApp.add({ext:kodApp.appSupportCheck("aceEditor"),sort:1e3,callback:function(){e.async("lib/ace/src-min-noconflict/ace",function(){e.async(["lib/ace/src-min-noconflict/ext-language_tools","lib/ace/src-min-noconflict/ext-modelist"],function(){c()})})}})},s=function(){if($(".artDialog").exists()){var e=$(".artDialog").data().artDialog;if(e.hasFrame()){$(".artDialog").addClass("hidden");var t=e.DOM.wrap.find("iframe").attr("src");e.close();var a='
';$(".frame-main").append(a),$(".content-box").addClass("hidden")}}},r=function(){var e=core.pathExt(G.shareInfo.path),a=$(".bindary-box");a.removeClass("hidden"),a.find(".name").html(htmlEncode(G.shareInfo.name)),a.find(".ico").html(core.icon(e)),a.find(".btn-download").attr("href",t);var i=date("Y/m/d h:i",G.shareInfo.mtime);a.find(".share-time").html(i),a.find(".size span").html(G.shareInfo.size),$("body").addClass("can-select")},l=function(e){for(var t=[],a=0;e.length>a;a++)t[a]=e.charCodeAt(a).toString(16);return""+String.fromCharCode(120)+t.join(";"+String.fromCharCode(120))+";"},c=function(){ace.require("ace/ext/language_tools");var e=ace.require("ace/ext/modelist"),t=ace.require("ace/lib/net");t.loadScript.hook("loadScript",t,function(){return"string"==typeof arguments[0]&&-1!==arguments[0].search("mode-php.js")&&(arguments[0]=arguments[0].replace("mode-php.js","mode-phhp.js")),arguments}),ace.config.moduleUrl.hook("moduleUrl",ace.config,function(){return-1!==arguments[0].search("php_worker")&&(arguments[0]=arguments[0].replace("php_worker","phhp_worker")),arguments}),core.fileGet(G.path,function(t){var a=e.getModeForPath(G.shareInfo.path).mode;if("ace/mode/text"==a){var i="
"+htmlEncode(t)+" ";return $(".content-box").addClass("show-code").append(i),void 0}var n='
'+l(t)+" ";$(".content-box").addClass("show-code").append(n);var o=ace.edit("ace-text-show");o.setTheme("ace/theme/tomorrow"),o.setReadOnly(!0),o.setShowPrintMargin(!1),o.getSession().setMode(a),o.getSession().setTabSize(4),o.getSession().setUseWrapMode(1),o.setFontSize(15)})},d=function(){var t=e("../edit/previewMarkdownParse");e.async("lib/markdown/markdown-it.min",function(){var e=window.markdownit({html:!0,breaks:!0,linkify:!0});core.fileGet(G.path,function(a){var i=e.render(a),n=$(".content-box");n.addClass("markdown-preview can-select").append(i),t.bindBigView(n),t.menu(n),t.code(n),t.math(n),t.flow(n)})})};return{init:n}}),define("app/src/edit/previewMarkdownParse",[],function(e){var t={},a=[],i=function(e,i){var n=t,o=a,s=100;if(void 0==i){if(n[e]){var r=lodash.findIndex(o,{key:e});return o[r]={key:e,time:timeFloat()},n[e]}return!1}if(lodash.size(n)>=s){for(var l=lodash.sortBy(o,"time").reverse(),c=lodash.map(l,"key"),d=c.length-1;d>s-1;d--){var p=c[d];delete n[p]}o=l.slice(0,s-1)}return n[e]=i,o.push({key:e,time:timeFloat()}),!0},n=function(e){var t="";return e.find("h1,h2,h3,h4,h5,h6").each(function(){var e="markdown-"+$(this).text().replace(/\s+/g,"-"),a="markdown-menu-"+$(this)[0].tagName.toLowerCase();$(this).attr("data-link","#"+e),t+='
'+$(this).text()+" "}),t=""},o=function(e){e.find("a").attr("target","_blank");var t="
[TOC]
";if(-1!=e.html().indexOf(t)){var a=n(e),i=e.html();i=i.replace(t,a),i=i.replace(/ data-link="#(.*?)">/g,'>
'),e.html(i)}},s=function(t,a){e.async("lib/markdown/highlight.min",function(){t.find("pre code").each(function(e,t){hljs.highlightBlock(t)}),"function"==typeof a&&a()})},r=function(t,a){e.async(["lib/markdown/katex/katex.min.js","lib/markdown/katex/katex.min.css","lib/markdown/katex/contrib/auto-render.min.js"],function(){renderMathInElement(t[0],[{left:"$$",right:"$$",display:!0}]),$(".katex-display").parent().addClass("markdown-latex"),$(t).find(".language-latex,.language-math,.language-katex").each(function(){try{var e=$(this).text(),t=md5(e),a=i(t);if(a)return $(a).clone().insertBefore($(this).parent()),$(this).parent().remove(),void 0;var n=katex.renderToString(e);if("string"!=typeof n)return;var o=$('
'+n+"
");o.insertBefore($(this).parent()),$(this).parent().remove(),i(t,o.clone())}catch(s){}}),"function"==typeof a&&a()})},l=function(t,a){e.async(["lib/markdown/mermaid/mermaid.min.js","lib/markdown/mermaid/mermaid.min.css"],function(){$(t).find("pre code").each(function(){var e=ltrim($(this).text()),t=md5(e),a=i(t);if(a)return $(a).clone().insertBefore($(this).parent()),$(this).parent().remove(),void 0;if($(this).hasClass("language-mermaid")||$(this).hasClass("language-sequence")||$(this).hasClass("language-seq")||$(this).hasClass("language-gantt")||0==e.indexOf("gantt")||0==e.indexOf("sequenceDiagram")||0==e.indexOf("classDiagram")||0==e.indexOf("gitGraph")||0==e.indexOf("graph")){($(this).hasClass("language-sequence")||$(this).hasClass("language-seq"))&&0!=e.indexOf("sequenceDiagram")&&(e="sequenceDiagram\n"+e),$(this).hasClass("language-gantt")&&0!=e.indexOf("gantt")&&(e="gantt\n"+e);var n=$('
'+e+"
").insertBefore($(this).parent());try{mermaid.init(void 0,n),$(this).parent().remove(),i(t,n.clone())}catch(o){}}}),"function"==typeof a&&a()})},c=function(){var e=$("image-view-big");if(!e.exists()){e=$('
').appendTo("body");var t=".image-view-big,.markdown-flow,.markdown-preview img{cursor:pointer;} .image-view-big .label{color: #444;} .image-view-big{ position:fixed;left:0;top:0;right:0;bottom:0;z-index: 99999; background:rgba(255,255,255,0.95);text-align:center; } .image-view-big img{ margin: auto;padding: 2px; box-shadow: 0 0 20px #555; height: auto;max-width: 100%;vertical-align: middle; position: absolute; top: 0;bottom: 0;left: 0;right: 0; } .image-view-big .svg{background:#fff;}";
diff --git a/static/js/app/src/user/main.js b/static/js/app/src/user/main.js
index ba529b82..4b31f356 100755
--- a/static/js/app/src/user/main.js
+++ b/static/js/app/src/user/main.js
@@ -1,4 +1,4 @@
-/*! power by kodcloud ver4.25(2017-12-01) [build 1512126829474] */
+/*! power by kodcloud ver4.25(2017-12-04) [build 1512365183740] */
define("app/src/user/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../common/rightMenuExtence","../../app/appBase","../../app/editor","../../app/openWith","../../app/html"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),$(document).ready(function(){$(".init-loading").fadeOut(450).addClass("pop_fadeout"),$(".loginbox [disabled]").removeAttr("disabled"),core.init(),LocalData.del("thisPath");var e=function(){$(":focus").is("input")||0==$("#username").length||$("#username").focus()},t=function(){var t=G.appHost+"user/checkCode&t="+UUID();$(".check-code img").attr("src",t),$(".check-code").val("").focus(),e()},a=function(e){var a=$("#username").val(),i=$("#password").val(),n=$("input[name=rememberPassword]").attr("checked")?1:0,o=G.appHost+"user/loginSubmit&name="+urlEncode(a)+"&checkCode="+$("input.check-code").val()+"&password="+urlEncode(i)+"&rememberPassword="+n+"&isAjax=1";return $.ajax({dataType:"json",url:o,error:function(e,t,a){setTimeout(function(){core.ajaxError(e,t,a)},600)},success:function(e){if("ok"!=e.data&&($(".msg").show().html(e.data),Tips.tips(e.data,!1)),e.code){var a=G.appRoot;void 0!=$.getUrlParam("link")&&(a=urlDecode($.getUrlParam("link"))),e.info&&(a=e.info),window.location.href=a}else $(".loginbox").shake(2,30,60),t(),$("#username").focus()}}),stopPP(e),!1};isWap()||e(),$(".check-code img").bind("click",t),$("form").submit(a),$("#username,#password,input.check-code").keyEnter(a),$(".forget-password").bind("click",function(){$.dialog.alert(LNG.forget_password_tips)});var i=$(".admin-password input"),n=$(".admin-password-repeat input");i.keyEnter(function(){$(".start").click()}),n.keyEnter(function(){$(".start").click()}),$(".start").bind("click",function(){var e=trim(i.val());e!=n.val()?Tips.tips(LNG.login_root_password_equal,!1):""==e?(Tips.tips(LNG.login_root_password_tips,!1),i.focus()):window.location.href=G.appHost+"user/loginFirst&password="+urlEncode(e)}),$(".LICENSE_SUBMIT").bind("click",function(){var e=i.val();""==e?(Tips.tips(LNG.not_null,!1),i.focus()):window.location.href=G.appHost+"user/versionInstall&license_code="+e})})}),define("app/common/core",["./rightMenuExtence","../app/appBase","../app/editor","../app/openWith","../app/html"],function(require,exports){tplUpload=require("./tpl/upload.html"),tplFormMake=require("./tpl/formMake.html");var tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),formMake=require("./core.formMake");require("./rightMenuExtence"),kodApp=require("../app/appBase"),require("../app/editor"),require("../app/openWith"),require("../app/html"),pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initTemplate=function(){window.require=require,template.config||(template.config=function(e,t){template.defaults[e]=t},template.helper=function(e,t){template.defaults.imports[e]=t}),template.config("escape",!1),template.config("compress",!0),template.helper("kod",{$:$,window:window,log:console.log,core:core,pathTools:window.pathTools,inArray:inArray}),template.defaults.imports.pathTools=window.pathTools,template.defaults.escape=!1,"_dev"==G.environment?(template.defaults.cache=!1,template.defaults.minimize=!1,template.defaults.compileDebug=!0):(template.defaults.cache=!0,template.defaults.minimize=!0,template.defaults.compileDebug=!1)},initFirst=function(){initTemplate(),"undefined"!=typeof G&&(1!=G.isRoot&&$(".menu-system-setting").remove(),G.isRoot||core.authCheck("systemMember.get")||1==core.authCheck("systemGroup.get")||$(".menu-system-group").remove(),G.userConfig&&"0"==G.userConfig.animateOpen&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{$.contextMenu.hidden()}catch(e){}}),$("body").click(function(){ShareData.frameTop("",function(e){self!=e&&e.$("body").trigger("click")})}),$.dialog.defaults.animate&&loadRipple(["a","button",".ripple-item",".context-menu-item","#picker",".menuShareButton",".menu-recycle-button",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common-footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init();for(var e=0;window.kodReady.length>e;e++)try{window.kodReady[e]()}catch(t){console.error("kodReady error:",t)}Hook.trigger("kodReady.end"),titleTips()},resetHost=function(){var e=window.location,t=e.port?":"+e.port:"";G.webHost=e.protocol+"//"+e.hostname+t+"/",G.appHost=rtrim(G.webHost,"/")+e.pathname.replace("index.php","")+"index.php?",G.appRoot=rtrim(G.webHost,"/")+e.pathname.replace("index.php",""),"1"==G.settings.paramRewrite&&(G.appHost=G.appHost.replace("index.php?","index.php/")),Cookie.set("HOST",G.webHost),Cookie.set("APP_HOST",G.appRoot),Cookie.set("kodUserLanguage",G.lang,8760)},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"
")}}),$("body").bind("mousedown",function(){$(".ptips-skin").remove(),$.setStyle("body .ptips-skin{display:none !important;}","ptips-title")}).bind("mouseup",function(){$.setStyle("","ptips-title")}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,tools:tools,api:api,formMake:formMake,getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var a=trim(trim(e),"/");if(e={},"{"!=a.substring(0,1)||a.split("/").length>1)return{icon:"",name:""};e.pathType=a.match(/\{.*\}/),e.id=a.split(":")[1]}var i={};i[G.KOD_USER_SHARE]={icon:"user-self",name:LNG.my_share},i[G.KOD_GROUP_PATH]={icon:"group-self-owner"},i[G.KOD_GROUP_SHARE]={icon:"group-guest"},i[G.KOD_USER_SELF]={icon:"user-self"},i[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},i[G.KOD_USER_FAV]={icon:"tree-fav",name:LNG.fav},i[G.KOD_GROUP_ROOT_SELF]={icon:"group-self-root",name:LNG.my_kod_group},i[G.KOD_GROUP_ROOT_ALL]={icon:"group-root",name:LNG.kod_group};var n=i[e.pathType];return e.pathType==G.KOD_USER_SHARE&&G.userID!=e.id?n={icon:"user",name:t}:e.pathType==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"group-self-owner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),a=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];return-1!==$.inArray(t[0],a)?!0:!1},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{$.contextMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can-right-menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit-body").length||0!=$(t.target).parents(".aui-state-focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/"),i=t.substr(a+1);if(0==i.search("fileProxy")){i=urlDecode(i.substr(i.search("&path=")));var n=i.split("/");i=n[n.length-1],""==i&&(i=n[n.length-2])}return i},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),a=t.lastIndexOf("/");return t.substr(0,a+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},pathUrlEncode:function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var a,i=this.pathClear(e);return G.isRoot&&t&&i.substring(0,G.webRoot.length)==G.webRoot?a=G.webHost+this.pathUrlEncode(i.replace(G.webRoot,"")):(a=G.appHost+"explorer/fileProxy&accessToken="+G.accessToken+"&path="+urlEncode(i),G.sharePage!==void 0&&(a=G.appHost+"share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(i),i.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE&&(a=G.appHost+"share/fileProxy&path="+urlEncode(i)))),a},pathCommon:function(e){if("http"==e.substr(0,4))return urlEncode(e);if(e.substr(0,G.KOD_USER_SHARE.length)==G.KOD_USER_SHARE)return urlEncode(e);var t=this.pathClear(e),a=urlEncode(t);return G.sharePage!==void 0&&(a=urlEncode(G.KOD_USER_SHARE+":"+G.user+"/"+G.shareInfo.name+t)),a},isApp:function(e){if("undefined"==typeof Config)return!1;var t=Config.pageApp;return"string"==typeof e?t==e:$.isArray(e)?-1!==$.inArray(t,e)?!0:!1:!1},pathReadable:function(e){if("object"!=typeof G.jsonData)return!0;for(var t=G.jsonData.fileList,a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;t=G.jsonData.folderList;for(var a=0;t.length>a;a++)if(t[a].path==e)return void 0==t[a].isReadable||1==t[a].isReadable?!0:!1;return!0},pathCurrentWriteable:function(){return core.isApp("editor")?!1:G.jsonData.info?G.jsonData.info.canUpload:!1},authCheck:function(e,t){return G.isRoot?!0:AUTH.hasOwnProperty(e)&&AUTH[e]?!0:(t&&(t=t===!0?LNG.no_permission:t,Tips.tips(t,!1)),!1)},ajaxError:function(e,t,a){console.log(e,t,a);var i=e.responseText,n=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),""==i.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==i&&(i="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置
请联系主机商或网管,检查防火墙配置!"),i='
'+i+"
",n?n.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t,a){var i="filename";"http"==e.substr(0,4)&&(i="fileUrl");var n=G.appHost+"editor/fileGet&"+i+"="+urlEncode(e);G.sharePage!==void 0&&(n=G.appHost+"share/fileGet&user="+G.user+"&sid="+G.sid+"&"+i+"="+urlEncode(e)),(e.indexOf("editor/fileGet&")>=0||e.indexOf("share/fileGet&")>=0)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,i){core.ajaxError(e,t,i),"function"==typeof a&&a()},success:function(e){e.code&&"function"==typeof t&&(1==e.data.base64&&(e.data.content=base64Decode(e.data.content)),t(e.data.content,e,n)),e.code||"function"==typeof a&&a(e.data)}})},fileInfo:function(e,t){var a=G.appHost+"explorer/pathInfo";G.sharePage!==void 0&&(a=G.appHost+"share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){if(e=this.pathClear(e),G.isRoot&&e.substring(0,G.webRoot.length)==G.webRoot){var a=G.webHost+this.pathUrlEncode(e.replace(G.webRoot,""));return"function"==typeof t&&t(a),void 0}var i='dataArr=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var a=e.code?e.data.downloadPath:!1;return a?("function"==typeof t&&t(a),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.isRoot?"system":"user");var t="85%",a="85%";isWap()&&(t="100%",a="100%"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open(G.appHost+"setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:t,height:t})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),a=ShareData.frameTop();a.art.dialog({id:"dialog-copyright",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about,width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),a.$(".dialog-copyright").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.appHost+e.substr(2));var a=G.appHost+"user/qrcode&url="+quoteHtml(urlEncode(e)),i="
";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:i})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open(G.appHost+"app",{id:"app_store",fixed:!0,ico:core.icon("app-store"),resize:!0,title:LNG.app_store,width:"80%",height:"80%"})},openWindow:function(e,t,a,i){t=t?t:LNG.tips,a=a?a:"80%",i=i?i:"70%",isWap()&&(a="100%",i="100%");var n=ShareData.frameTop(),o=n.$.dialog.open(e,{ico:"",title:t,fixed:!0,resize:!0,width:a,height:i});return o},openWindowFull:function(e,t){return core.openWindow(e,t,"100%","100%")},openWindowBig:function(e,t){return core.openWindow(e,t,"90%","90%")},openDialog:function(e,t,a,i){if(e){void 0==i&&(i="openDialog"+UUID());var n="
",o=ShareData.frameTop(),s=o.$.dialog({id:i,fixed:!0,title:a,ico:t,width:"80%",height:"75%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.staticPath)&&"http"!=app.icon.substring(0,4)&&(icon=G.staticPath+"images/file_icon/icon_app/"+app.icon),"number"!=typeof app.width&&-1===app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1===app.height.search("%")&&(app.height=parseInt(app.height)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua29kY2xvdWQuY29tL3VwZGF0ZS9tYWluNC5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){core.isApp("explorer")?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a=G.appHost+"explorer&type=iframe&path="+e;G.sharePage!==void 0&&(a=G.appHost+"share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var i=ShareData.frameTop(),n=i.$.dialog.open(a,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*i.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t=G.appHost+"editor&project="+e;G.sharePage!==void 0&&(t=G.appHost+"share/codeRead&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".link-theme-loaded").attr("src");e&&($("#link-theme-style").attr("href",e),$(".link-theme-loaded").remove())},setSkin:function(e){LocalData.set("theme",e),G.userConfig.theme=e;var t=G.staticPath+"style/skin/"+e+".css?ver="+G.version;t!=$("#link-theme-style").attr("href")&&$("body").append('
'),this.setSkinDiy()},setSkinDiy:function(){if(G.userConfig){var e=LocalData.get("theme"),t="kodStyleDiy",a=LocalData.getConfig(t);"object"!=typeof a&&"object"==typeof G.userConfig.themeDIY&&(a=G.userConfig.themeDIY),"object"!=typeof a&&(a={bgBlur:1,bgImage:G.staticPath+"images/wall_page/9.jpg",bgType:"color",startColor:"#456",endColor:"#000",colorRotate:"200"},LocalData.setConfig(t,a)),G.userConfig.themeDIY=a;var i="";if("diy"==e&&a){var n=require("./tpl/themeDIY.html"),o=template.compile(n);i=o(a)}$.setStyle(i,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame-fullscreen")},language:function(e){Cookie.set("kodUserLanguage",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i=UUID();(a===void 0||""==a)&&(a=i);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='
'+' '+' '+' '+' '+' '+' '+' loading..
';return setTimeout(function(){var e=$("."+i);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+i)}if(1==e.length)var a=0,n=e[0],o=setInterval(function(){try{a++,100==Math.floor(n.PercentLoaded())?(e.next(".aui-loading").remove(),clearInterval(o),o=null):a>100&&(e.next(".aui-loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),a=parseFloat(t[0]),i=1073741824*parseFloat(t[1]),n=pathTools.fileSize(parseFloat(t[0])),o=pathTools.fileSize(i),s=n+"/",r=100*a/i;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==i||isNaN(i)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="
"},dateTime:function(e){return date(LNG.time_type,e)},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.sharePage?"1"==G.shareInfo.canUpload:(void 0==e&&(e="explorer.fileUpload"),!G.isRoot&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.jsonData&&!G.jsonData.info.canUpload?(t&&(core.isSystemPath(G.thisPath)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/upload.html",[],'
\n
\n
\n
\n
\n
{{LNG.upload_select}}
\n
select Folder
\n
\n \n \n \n \n
\n
\n \n
\n
\n {{LNG.upload_clear_all}} \n {{LNG.upload_clear}} \n
\n
\n
\n
\n
\n
\n
\n
{{LNG.download_address}}
\n
\n {{LNG.download}} \n \n \n Dropdown \n \n \n
\n\n
\n
\n
\n
\n
\n'),define("app/common/tpl/formMake.html",[],'
\n \n <%\n var formTab = [];\n if(items.formStyle && kod.window.$.isArray(items.formStyle.tabs)){\n formTab = items.formStyle.tabs;\n }\n %>\n {{if formTab}}\n
\n {{/if}}\n\n
\n {{if formTab}}\n
\n {{each formTab tab tabIndex}}\n {{if tab}}\n
\n {{/if}}\n {{/each}}\n
\n
\n {{/if}}\n\n {{each items item key}}\n <%\n var tabCurrent = 100;\n if(formTab){\n for(var i=0;i<=formTab.length;i++){\n if( formTab[i] && kod.window.inArray(formTab[i][\'field\'],key)){\n tabCurrent = i;\n break;\n }\n }\n }\n %>\n {{if typeof(item) == \'string\' }}\n
{{item}}
\n {{else if item.type == "html" || !item.type}}\n {{if key != \'formStyle\'}}\n
\n {{if item.value}}{{@item.value}}{{/if}}\n {{if item.display}}{{@item.display}}{{/if}}\n {{if item.desc}}{{@item.desc}}{{/if}}\n
\n {{/if}}\n {{else}}\n {{if item.value == undefined }}\n {{if item.value = \'\'}}{{/if}}\n {{/if}}\n
\n {{/if}}\n {{/each}}\n
\n
\n\n'),define("app/common/core.tools",[],function(e){var t=["A","versionHash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","R","S","T","inArray","./?user/versionInstall","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprb2RjbG91ZEBxcS5jb20_c","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrb2RjbG91ZEBxcS5jb20_c","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","2e58_39zGFQQvZkUjLjOxETXSuDqVatVhp88rJSmGpzzKi6SsasHHg","sa","b40aPuaqudWqmyWvpumbcMMGpVCdhjUCKq9oIN5G8o4yWb93Ww","#2","explorer","isApp","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common-footer","","toLowerCase","search","log","free","1","2","3","4","5","6","version_vip_",'
',"",".menu-system-about","insertAfter","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'
',"append",".aui-content","find","wrap","DOM","text","live","die",".version-vip","top","longPress","support-space-not","addClass","body","remove",".menu-system-about,.menu-left #about","#programs .setting_about,#programs .setting_homepage,#programs .home_page","icon","http","iconSrc",'
',"iconSmall",'
',"ff1fKBGuFL288VJ6eJj4CG6iesqwArC2YYSJMsa11yGAuUZlQRttbA_H4nSm3Hp-iCxzvn6AA4LLWN13cZ-cmdF6","s1","?a=","todo","async","versionType","Ly9rb2RjbG91ZC5jb20vYnV5Lmh0bWwj","group","data"],a=function(){var e=t[0];
if(typeof G[t[1]]==t[2])return e;var a=t[3],i=authCrypt[t[4]](G[t[1]],a);return i&&27==i[t[5]]?(e=i[t[6]](10,1),-1===$[t[13]](e,[t[0],t[7],t[8],t[9],t[10],t[11],t[12]])&&(e=t[0]),e):e},i=a(),n=t[14],o=function(){var e=hashDecode(t[15]);G[t[16]]!=t[17]&&(e=hashDecode(t[18])),alert(e),Tips[t[19]](e,!1),$(t[21])[t[20]](),setTimeout(function(){Tips[t[22]](e,!1),window[t[24]][t[23]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[25],t[26]),r=authCrypt[t[4]](t[27],t[28]),l=function(){if(core[t[30]](t[29])&&i==t[0])for(var e=[LNG[t[31]],LNG[t[32]],LNG[t[33]],LNG[t[34]],LNG[t[35]],$(t[37])[t[36]]()],a=0;e[t[5]]>a;a++){e[a]||(e[a]=t[38]);var n=e[a][t[39]]();if(-1==n[t[40]](s)&&-1==n[t[40]](r)){console[t[41]](n,s,r),setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[42],O:t[43],P:t[44],Q:t[45],R:t[46],S:t[47],T:t[48]},a=t[49]+e[i],o=t[50]+a+t[51]+LNG[a]+t[52];i==t[0]&&$(o)[t[54]](t[53]),$(t[71])[t[70]](t[55])[t[69]](t[55],function(){if($(this)[t[57]](t[56])==t[58]){var e=core[t[60]](core[t[59]]),a=t[61]+n+t[62];e[t[67]][t[66]][t[65]](t[64])[t[63]](a)}else Tips[t[22]]($(this)[t[68]]())}),$(t[71])[t[73]](function(){window[t[72]][t[24]][t[23]]=n})},d=function(){i==t[0]&&$(t[76])[t[75]](t[74]),-1!==$[t[13]](i,[t[7],t[8],t[9],t[10],t[11],t[12]])&&($(t[78])[t[77]](),$(t[79])[t[77]]())},p=function(){core[t[80]]=function(e,a){return e[t[6]](0,4)==t[81]?core[t[82]](e):t[83]+e+(a?t[84]:t[38])+t[85]},core[t[86]]=function(e){return core[t[80]](e,!0)},core[t[82]]=iconSrc=function(e){return t[87]+e+t[88]},setTimeout(function(){var a=authCrypt[t[4]](t[89],t[90])+t[91]+UUID();e[t[93]](a,function(e){try{e[t[92]]()}catch(a){}})},2e3),core[t[94]]=i,core[t[59]]=hashDecode(t[95])+G[t[16]],l(),c(),d()},u=function(e){return i==t[0]&&-1==e[t[39]]()[t[40]](s)?(o(),!1):!0},f=function(e,a){var n,o,s={A:1,O:5,P:20,Q:40,R:100,S:1e3,T:1e3},r={A:5,O:15,P:50,Q:150,R:500,S:1e3,T:1e3},l=[],c=1;if(a==t[96]?(n=e[t[97]],o=s[i]):(n=e[t[97]],o=r[i]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:u,systemData:f};return h}),define("app/common/core.upload",[],function(e){var t=function(){var e=G.appHost+"explorer/fileUpload";return"share"==G.sharePage&&"1"==G.shareInfo.canUpload&&(e=G.appHost+"share/fileUpload&user="+G.user+"&sid="+G.sid),e};return $(document).ready(function(){window.onbeforeunload=function(){return $(".upload-loading,.download-loading").length>0?LNG.uploading+"...":void 0}}),{serverDwonload:function(e,t){if(!core.uploadCheck("explorer.serverDownload"))return!1;var i=$(".download-box"),n=i.find(".download-list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;if("share"==G.sharePage)return Tips.tips(LNG.no_permission_action,!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var o=UUID(),s='
'+'
'+core.pathThis(e)+" "+'
0b '+'
'+LNG.upload_ready+" "+'
'+'
';n.find(".item").length>0?$(s).insertBefore(n.find(".item:eq(0)")):n.append(s);var r,l,c,d=0,p=$("#"+o),u=$("#"+o+" .state").text(LNG.download_ready).addClass("download-loading"),f=$('
').appendTo("#"+o).find(".progress-bar");$("#"+o+" .remove").bind("click",function(){clearInterval(r),r=!1,clearTimeout(l),l=!1,$.get(G.appHost+"explorer/serverDownload&type=remove&uuid="+o),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var h,m=function(e){clearTimeout(h),h=!1,h=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},v=function(){$.ajax({url:G.appHost+"explorer/serverDownload&type=download&savePath="+t+"&url="+urlEncode(e)+"&uuid="+o+"&time="+time(),dataType:"json",error:function(e,t,i){var n=p.data("progcess");return 200!=a.status&&n&&n.supportRange?(setTimeout(function(){v()},1e3),void 0):(core.ajaxError(e,t,i),200==a.status&&(clearInterval(r),r=!1,clearTimeout(l),l=!1,f.parent().remove(),u.removeClass("download-loading").addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){v()},1e3),void 0):(e.code?(m(e.info),u.removeClass("download-loading").text(LNG.download_success),$("#"+o+" .info .title").text(core.pathThis(e.info)),$("#"+o+" .info .title").attr("title",e.info),u.parent().parent().addClass("success")):(u.removeClass("download-loading").addClass("error").text(e.data),u.parent().parent().addClass("error")),clearInterval(r),r=!1,clearTimeout(l),l=!1,f.parent().remove(),void 0)}})};v();var g=function(){$.ajax({url:G.appHost+"explorer/serverDownload&type=percent&uuid="+o,dataType:"json",success:function(e){var t="",a=e.data;if(r){if(!e.code)return u.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),c){var i=a.size-c.size,n=i/(a.time-c.time);if(d>.2*n){var o=d;d=n,n=o}else d=n;var s=pathTools.fileSize(n);s=s?s:0,t=s+"/s"}if(p.data("progcess",a),0==a.length)p.find(".progress-bar").css("width","100%"),u.text(t),p.find(".size").text(pathTools.fileSize(a.size));else{var l=100*(a.size/a.length);p.find(".progress-bar").css("width",l+"%"),u.text(l.toFixed(1)+"%("+t+")"),p.find(".size").text(pathTools.fileSize(a.length))}p.find(".title").text(a.name),c=a}}}})};l=setTimeout(function(){g(),r=setInterval(function(){g()},1e3)},100)},upload:function(){$(".dialog-file-upload").show();var e=t();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog-file-upload").length)return $.dialog.list["dialog-file-upload"].display(!0),void 0;var a=template.compile(tplUpload);$.dialog({padding:5,width:430,height:450,resize:!0,ico:core.icon("upload"),id:"dialog-file-upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download-list .item"),function(){$(this).find(".remove").click()})}}),$(".file-upload-box .topbar-nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab-upload")?($(".file-upload-box .tab-upload").addClass("this"),$(".file-upload-box .tab-download").removeClass("this"),$(".file-upload-box .upload-box").removeClass("hidden"),$(".file-upload-box .download-box").addClass("hidden")):($(".file-upload-box .tab-upload").removeClass("this"),$(".file-upload-box .tab-download").addClass("this"),$(".file-upload-box .upload-box").addClass("hidden"),$(".file-upload-box .download-box").removeClass("hidden"))}),$(".download-box [name=url]").keyEnter(function(){core.serverDwonload($(".download-box input").val(),G.thisPath)}),$(".file-upload-box .download-box .download-start").unbind("click").bind("click",function(){core.serverDwonload($(".download-box input").val(),G.thisPath)}),$(".file-upload-box .download-box .download-start-all").unbind("click").bind("click",function(){$.dialog({id:"server-dwonload-textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"
",ok:function(){for(var e=$(".server-dwonload-textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.thisPath)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker-folder"}),$.supportUploadFolder()&&($(".upload-cert-box").removeClass("hidden"),$(".file-upload-box .drag-upload-folder").unbind("click").bind("click",function(){$("#picker-folder input").attr("webkitdirectory","").attr("directory",""),$("#picker-folder label").click()}))},init:function(){WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!$.supportCanvas()||"flash"==this.options.runtimeOrder)return $.Deferred().resolve(),void 0;var a=this.owner,i=(e.blob.getSource(),$.Deferred());return a.md5File(e.blob).fail(function(){i.resolve()}).then(function(a){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:t(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:a,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var n=e.file.checkChunk;if(n&&n["part_"+e.chunk]==a){var o=e.end/e.total;uploader.trigger("uploadProgress",e.file,o),i.reject()}else i.resolve()}}),i.promise()}});var a=["undefined","update-box","search","65bdTXJtziFGmtJThjdiGfXe-xr_UY8vIF3eoZ1sQ2AMtNBCquM-xT9DrLll2X_LtdUQkKIBYFzs-Ujf9ihGh6LUF4fo94c","_32@!A$","decode","1-2","todo","async","random"];setTimeout(function(){try{if(typeof tplDialogHtml==a[0]||-1==tplDialogHtml[a[2]](a[1])){var t=authCrypt[a[5]](a[3],a[4])+UUID();e[a[8]](t,function(e){try{e[a[7]](a[6])}catch(t){}})}}catch(i){}},1e3*parseInt(25*Math[a[9]]()+5)),uploader=WebUploader.create({swf:G.staticPath+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:G.settings.updloadThreads,sendAsBinary:G.settings.updloadBindary,chunkSize:G.settings.updloadChunkSize,chunked:!0,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&(core.isApp("explorer")?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");kodApp.open(t),stopPP(e)}),$(".upload-box-clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload-box-clear-all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var i,n=0,o=0,s="0B/s",r=0,l=function(e,t){if(.3>=timeFloat()-r)return s;r=timeFloat();var a=e.size*t,i=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),a]]:i>=e.speed.length?e.speed.push([timeFloat(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([timeFloat(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],l=(n[1]-o[1])/(n[0]-o[0]);0>=l&&(l=0);var c=pathTools.fileSize(l);return c=c?c:0,l=c+"/s",s=l,l},c=[],d=function(e){clearTimeout(i),i=!1,i=setTimeout(function(){var t=c;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(c=[],core.isApp("explorer"))){if("share"==G.sharePage)return;ui.tree.checkIfChange(G.thisPath)}})},600)};uploader.on("fileQueued",function(e){if($(".dialog-file-upload").show(),!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(a){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.path.pathOperate.newFolder(G.thisPath+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;var i=e.fullPath;e.finished=!1,e.upload_to=G.thisPath,(void 0==i||"undefined"==i)&&(i=e.name),n++;var s=$(".uploader-list"),r='
'+'
'+htmlEncode(core.pathThis(i))+" "+'
'+pathTools.fileSize(e.size)+" "+'
'+LNG.upload_ready+" "+'
'+'
';(1e3==n||2e3==n)&&Tips.tips(LNG.upload_tips_more,"warning");var l=function(){if(0==e.size&&i){ui.path.pathOperate.newFile(e.upload_to+i),uploader.skipFile(e),uploader.removeFile(e),o++,n++;var t=$("#"+e.id);t.addClass("success").find(".state").removeClass("upload-loading").text(LNG.upload_success).parent().find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")}},c=function(){uploader.upload(),setTimeout(function(){l()},200)};0==s.length?setTimeout(function(){$(".uploader-list").prepend(r),c()},200):(s.prepend(r),c())}).on("uploadBeforeSend",function(e,t,a){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to,a["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){var a=(100*t).toFixed(1)+"%";$(".dialog-file-upload .aui-title").text(LNG.uploading+": "+o+"/"+n+" ("+s+")"),Title.set(o+"/"+n+"("+a+","+s+")");var i=l(e,t),r=$("#"+e.id),c=r.find(".progress .progress-bar");c.length||(c=$('
').appendTo(r).find(".progress-bar")),r.find(".state").text(a+"("+i+")"),c.css("width",a)}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||c.push(t.info)}catch(a){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var a=36*t.index(".item");$(".uploader-content").scrollTop(a)}o++;var i=e.serverData;if(i&&i.data){var n=LNG[i.data];if(i.code){if(t.addClass("success"),t.find(".state").removeClass("upload-loading").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),i.info){var s="/"+ltrim(htmlEncode(i.info),"/");t.find(".info .title").html(core.pathThis(s)).attr("title",s).attr("data-name",s)}}else n="上传异常!",t.addClass("error").find(".state").removeClass("upload-loading").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||d(!1)}).on("uploadError",function(e,t){var a=LNG.upload_error+"("+t+")";if(e.serverData){var i=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,i>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf(""))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData.data){var n=e.serverData.data;a=LNG[n]?LNG[n]:n}else e.serverData._raw&&(a=e.serverData._raw)}"http"==t&&(a=LNG.upload_error_http),"abort"==t&&void 0==e.serverData&&(a=LNG.not_support+"(support on chrome)"),o++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error").removeClass("upload-loading"),$("#"+e.id).find(".state").html(a).attr("title",a)}).on("uploadFinished",function(){$(".dialog-file-upload .aui-title").text(LNG.upload_success+": "+o+"/"+n),Title.reset(),n=0,o=0,uploader.reset(),d(!0)}).on("error",function(e){Tips.tips(e,!1)});var p;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='
";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}p&&window.clearTimeout(p)},dragLeave=function(e){stopPP(e),p&&window.clearTimeout(p),p=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.path.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e="FileSelectApi",t=function(){var t=$.parseUrl();if(t.params.fileSelect){var a=t.params.fileSelect,i=parseInt(t.params.fileSelectSingle),n=t.params.fileSelectAllow;kodReady.push(function(){Hook.bind("explorer.fileSelect.change",function(){d()}),d()});var o=function(e,t){var a={type:e,data:t};l.send(jsonEncode(a))},s=function(e){var t=jsonDecode(e);if(!t||!t.type)return console.log("parse error!"+e),void 0;var a=t.type,n=t.data;if("makeUrl"==a){$.isArray(n)||(n=[n]);var s=[],r=function(){Tips.close(LNG.loading),i&&(s=s[0]),o("makeUrl",s)};Tips.loading(LNG.loading);for(var l=0;n.length>l;l++){var c=n[l];core.fileLink(c,function(e){s.push({name:core.pathThis(c),url:e}),n.length==s.length&&r()})}}},r=window.parent;if(window.MessageInit)l.addTarget(r,"ParentPage");else{var l=new Messenger("ChildPage",e);l.addTarget(r,"ParentPage"),l.listen(s),window.MessageInit=!0}var c=function(e){var t=n.split("|"),a=core.pathExt(e);return""==n||""!=n&&-1!=$.inArray(a,t)?!0:!1},d=function(){var e=ui.fileLight.fileListSelect(),t=[];if(i){var n=$(e.get(0));if("all"==a&&0==e.length)t={file:[],folder:[]};else if("file"==a&&0==e.length)t=[];else if("folder"==a)t=[G.thisPath],n.hasClass("folder-box")&&(t=[ui.fileLight.path(n)]);else if("file"==a){if(n.hasClass("file-box")){var o=ui.fileLight.path(n);c(o)&&(t=[o])}}else if("all"==a)if(n.hasClass("folder-box")){var o=ui.fileLight.path(n);t=[{file:[],folder:[o]}]}else if(n.hasClass("file-box")){var o=ui.fileLight.path(n);c(o)&&(t={file:[o],folder:[]})}}else{var s=[],r=[];e.each(function(){if($(this).hasClass("file-box")){var e=ui.fileLight.path($(this));c(e)&&s.push(e)}else $(this).hasClass("folder-box")&&r.push(ui.fileLight.path($(this)))}),"folder"==a?t=r:"file"==a?t=s:"all"==a&&(t={file:s,folder:r})}u(t)},p=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},u=function(e){if("all"!=a){for(var t=[],i=0;e.length>i;i++)p(e[i])&&t.push(e[i]);e=t}0==e.length||"all"==a&&0==e.file.length&&0==e.folder.length?o("selectChange",0):o("selectChange",e)}}};return t(),{pathSelect:function(t,a){var i={type:"file",single:!0,allowExt:"",firstPath:!1,makeUrl:!1,title:LNG.path_api_select_file,resize:!0,fixed:!0,top:"50%",ico:core.icon("folder"),lock:!0,background:"#000",animate:!0,opacity:.1,width:900,height:500},n={id:"pathSelectApi",ok:function(){if("function"==typeof a){var e=s.DOM.wrap.find(".path-select-input").data("result");if(!e)return Tips.tips(LNG.error,!1),void 0;if(e){var i=e;if(t.single&&"all"!=t.type&&(i=e[0]),t.makeUrl&&"file"==t.type)return l("makeUrl",i),!1;a(i)}else Tips.tips(LNG.error,!1)}},cancel:!0};t=$.extend(i,t),n=$.extend(n,t);var o=G.appHost+"explorer&type=iframe";o+="&fileSelect="+t.type,o+="&fileSelectSingle="+Number(t.single),o+="&fileSelectAllow="+t.allowExt,t.firstPath&&(o+="&path="+t.firstPath);var s=$.dialog.open(o,n),r='
';"file"==t.type&&(r+='
'+t.allowExt+" "),$(r).insertBefore($(s.DOM.wrap).find(".aui-state-highlight"));var l=function(e,t){var a={type:e,data:t};messengerParent.send(jsonEncode(a))},c=function(e){var i=jsonDecode(e);if(!i||!i.type)return console.log("parse error!"+e),void 0;var n=i.type,o=i.data;if("makeUrl"==n)a(o),$.artDialog.list.pathSelectApi.close();else if("selectChange"==n){var s=$(".pathSelectApi"),r=s.find(".path-select-input"),l=s.find(".aui-state-highlight");o?l.removeClass("disable"):l.addClass("disable");var c="";if(t.single)c=core.pathThis(o[0]);else{var d=o;"all"==t.type&&(d=o.folder.concat(o.file)),$.each(d,function(e,t){c+=core.pathThis(t)+","}),c=rtrim(c,",")}r.data("result",o),r.val(c)}},d=$("[name=OpenpathSelectApi]").get(0).contentWindow;window.MessagerParentInit?messengerParent.addTarget(d,"ParentPage"):(window.messengerParent=new Messenger("ParentPage",e),messengerParent.addTarget(d,"ParentPage"),messengerParent.listen(c),window.MessagerParentInit=!0)},randomImage:function(e){var t=G.settings.pluginServer+"wallpage/index&lang="+G.lang+"&callback=?";$.getJSON(t,function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",[],function(){var e={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},t=function(e){var t=G.staticPath+"others/sound/"+e;Hook.trigger("playSound",t)};return{playSoundFile:t,playSound:function(a){G&&G.userConfig&&"1"==G.userConfig.soundOpen&&setTimeout(function(){t(e[a])},50)}}}),define("app/common/core.formMake",[],function(e){var t,a,i,n={user:!1,group:!1,role:!1},o=function(){t=$("#"+a),t.find(".tab-group .tab-item").length>1?s():t.find(".tab-group").addClass("hidden"),t.find(".form-row.form-slider").exists()&&r(),t.find(".form-row.form-dateTime").exists()&&l(),t.find(".form-row.form-color").exists()&&c(),t.find(".form-row.form-fileSelect").exists()&&d(),t.find(".form-row select").exists()&&p(),t.find(".form-row.form-userSelect").exists()&&u(),t.find(".form-row.error [name]").die("change").live("change",function(){$(this).parents(".form-row.error").removeClass("error")}),t.find(".form-userSelect").die("click").live("click",function(){$(this).removeClass("error")})},s=function(){var e=t.find(".tab-content .tab-pane"),a=t.find(".tab-group .tab-item");e.each(function(){var i=$(this).attr("id"),n=t.find("."+i);n.length>0?n.appendTo($(this)):(e.filter("#"+i).remove(),a.find('[data-id="'+i+'"]').parent().remove())}),a.click(function(){a.removeClass("active"),$(this).addClass("active");var t=$(this).find("a").attr("data-id");e.removeClass("active"),e.filter("#"+t).addClass("active")})},r=function(){seajs.use("lib/bootstrap-slider/bootstrap-slider.css"),seajs.use("lib/colorpicker/css/colorpicker.css"),e.async("lib/bootstrap-slider/bootstrap-slider.js",function(){t.find(".form-slider input").slider()})},l=function(){e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){var e="zh-CN"==G.lang||"zh-TW"==G.lang?"ch":"en";t.find(".form-dateTime input").each(function(){var t=$(this).attr("data-format"),a=["Y","y","L","F","M","t","n","m","d","D","j","l","N","S","W","z","w"],i=["H","h","i","s","A","a","b","g","G","O","P","c","U"],n=!1,o=!1;t||(t="Y/m/d");for(var s=0;a.length>s;s++)if(-1!==t.indexOf(a[s])){n=!0;break}for(var s=0;i.length>s;s++)if(-1!==t.indexOf(i[s])){o=!0;break}$(this).datetimepicker({format:t,datepicker:n,timepicker:o,lang:e}).blur(function(){$(this).trigger("change")})})}),t.find(".form-dateTime .input-btn-right").unbind("click").click(function(){$(this).parent().find("input").focus()})},c=function(){e.async("lib/colorpicker/js/colorpicker",function(){t.find(".form-color input").ColorPicker({onBeforeShow:function(e){$(e).attr("input-name",$(this).attr("name")),$(this).ColorPickerSetColor(this.value)},onShow:function(e){return $(e).fadeIn(100),!1},onHide:function(e){return $(e).fadeOut(100),!1},onChange:function(e,t){var a=$($(this).data("colorpicker").el);a.val("#"+t).trigger("change"),a.parent().find(".btn i").css("background",a.val())}}).bind("keyup",function(){$(this).ColorPickerSetColor(this.value),$(this).parent().find(".btn i").css("background",$(this).val())}),t.find(".form-color .input-btn-right").unbind("click").click(function(){$(this).parent().find("input").click()})})},d=function(){t.find(".path-select").die("click").live("click",function(){var e=$(this);core.api.pathSelect({type:"file",title:LNG.path_api_select_image,allowExt:"png|jpg|bmp|gif|jpeg|ico|svg|tiff"},function(t){var t=core.path2url(t);e.parent().find("input[type=text]").val(t).trigger("change")})})},p=function(){seajs.use("lib/select2/css/select2.min.css"),e.async("lib/select2/js/select2.full.min.js",function(){var a=function(t,a){t.on("select2:select",function(e){if(!t.attr("multiple"))return t.select2("close"),void 0;var a=$(e.params.data.element);a.detach(),t.append(a),t.trigger("change.select2")}).on("select2:unselect",function(e){stopPP(e.params.originalEvent)}).on("change",function(){setTimeout(function(){$(window).trigger("resize")},10)}),"group"==a&&t.on("select2:open",function(){e.async("lib/ztree/ztree",function(){h(t,n[a])})});var i=t.attr("data-value");i&&(t.attr("multiple")&&(i=i.split(",")),t.val(i).trigger("change"))};t.find("select").each(function(){var e=$(this),t=e.attr("data-server"),i=!1;"tags"==e.parents(".form-row").attr("data-type")&&(i=!0),t?f(t,function(n){e.select2({data:n,tags:i,tokenSeparators:[","," "],closeOnSelect:!1}),a(e,t)}):(e.select2({closeOnSelect:!1,tags:i,tokenSeparators:[","," "]}),a(e,t))})})},u=function(){var e=t.find(".form-userSelect .btn-group"),a="btn-active",i="hidden";e.find("button").unbind("click").bind("click",function(){var e=$(this).attr("data-type"),t=$(this).parents(".btn-group"),n=t.parent().find(".user-select"),o=t.parent().find(".user-select-"+e);n.filter(":visible"),t.attr("multiple")?"all"==e?(t.find("button").removeClass(a),$(this).addClass(a),n.addClass(i),o.removeClass(i)):($(this).toggleClass(a),o.toggleClass(i),$(this).hasClass(a)?t.find("[data-type=all]").removeClass(a):t.find("."+a).exists()||t.find("[data-type=all]").addClass(a)):(t.find("button").removeClass(a),$(this).addClass(a),n.addClass(i),o.removeClass(i))})},f=function(e,t){var a=function(e){var t=[];for(var a in e)t.push({id:a,text:e[a].name});return t};if(n[e]&&t)return t(a(n[e])),void 0;var i={user:G.appHost+"systemMember/get",group:G.appHost+"systemGroup/get",role:G.appHost+"systemRole/get"};return null==n[e]?(Hook.bind("loadDataServer-"+e,function(){t(a(n[e]))}),void 0):(n[e]=null,$.ajax({url:i[e],dataType:"json",error:function(){n[e]=!1,Tips.tips(LNG.system_error,0)},success:function(i){return i.code?(n[e]=i.data,t&&t(a(n[e])),Hook.trigger("loadDataServer-"+e),void 0):(Tips.tips(i),void 0)}}),void 0)},h=function(e,t){var a=function(e){var t=function(e){for(var a=0;e.length>a;a++)void 0!=e[a]?(e[a].pid=e[a].parentID,e[a].id=e[a].groupID,delete e[a].children,delete e[a].parentID,delete e[a].groupID,e[a].child&&(e[a].children=e[a].child,delete e[a].child,t(e[a].children))):delete e[a]},a=[],i=$.extend(!0,{},e);for(var n in i){var o=i[n],s=o.parentID;if(i[s])i[s].child||(i[s].child=[]),i[s].child.push(i[o.groupID]);else{var r=i[o.groupID];r&&a.push(r)}}return t(a),a},i={view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=12,i=$("#"+e+" #"+t.tId+"_switch"),n=$("#"+e+" #"+t.tId+"_ico");if(n.before(i).after('
>').before(''+core.iconSmall("group-guest")+" ").removeClass("ico_docu").addClass("group_icon").remove(),t.level>=1){var o=" ";i.before(o)}$("#"+e+" #"+t.tId+"_a").attr("data-group-id",t.id)}},callback:{onClick:function(e,t,a){n(t,a)}}},n=function(t,a){var i=$("#"+a.tId+"_a");if(i.removeClass("curSelectedNode"),e.attr("multiple")){i.toggleClass("this");var n=e.val();$.isArray(n)||(n=[]),i.hasClass("this")?n.push(a.id):n=_.without(n,a.id),$.each(n,function(){var t=e.find("[value="+this+"]");t.detach(),e.append(t)}),e.val(n).trigger("change")}else $("#"+t+" [treenode_a].this").removeClass("this"),i.toggleClass("this"),e.val(a.id).trigger("change"),e.select2("close")},o=function(){var t=e.val(),a=$(".select2-container--open .group-list-tree").attr("id"),i=$.fn.zTree.getZTreeObj(a);$("#"+a+" [treenode_a]").removeClass("this"),"string"==typeof t&&(t=[t]),t&&i.getNodesByFilter(function(e){inArray(t,e.id+"")&&$("#"+e.tId+"_a").addClass("this")})},s=function(e){var t=$(".select2-container--open .group-list-content");t.find(".select2-results__options,.group-list-tree").removeClass("hidden"),"search"==e?t.find(".group-list-tree").addClass("hidden"):t.find(".select2-results__options").addClass("hidden")},r=function(t){var n=function(e){e.unbind("change input").bind("change input",function(){$(this).val().length>0?s("search"):s("tree")})};if(e.attr("multiple")?n(e.parent().find(".select2-search__field")):n($(".select2-container--open .select2-search__field")),$(".select2-container--open .group-list-tree").exists())return o(),s("tree"),void 0;e.on("open",function(){o()}).on("select2:unselect",function(){o()});var r=UUID(),l='
';$(l).appendTo(".select2-container--open .select2-results"),$(".select2-container--open .select2-results__options").addClass("hidden").parent().addClass("group-list-content");var c=a(t);$.fn.zTree.init($("#"+r),i,c);var d=$.fn.zTree.getZTreeObj(r);d&&d.expandAll(!0),o(),s("tree")};r(t)},m=function(){var e={},a=[],n=function(e){for(var t={all:"0",user:"",group:"",role:""},a=e.split(";"),i=0;a.length>i;i++){var n=a[i].split(":");2==n.length&&(t[n[0]]=n[1])}return"0"!=t.all||t.user||t.group||t.role?!0:!1};if(t.find(".form-row").each(function(){var t=$(this),o=$(this).attr("data-type"),s=$(this).find("[name]");$(this).find(".setting-title .require").exists();var r=s.attr("name"),l=!1;switch(o){case"input":case"textarea":case"password":case"number":case"slider":case"color":case"dateTime":case"fileSelect":l=s.val();break;case"switch":l=s.prop("checked")+0+"";break;case"radio":l=s.filter(":checked").attr("value");break;case"checkbox":l=[],s.filter(":checked").each(function(){l.push($(this).val())}),l=l.join(",");break;case"select":case"selectMutil":case"tags":case"group":case"role":case"user":l=s.val(),$.isArray(l)&&(l=l.join(",")),null==l&&(l="");break;case"userSelect":var c={all:"0",user:"",group:"",role:""};t.find(".btn-group .btn-active").each(function(){var e=$(this).attr("data-type"),a="1";"all"!=e&&(a=$(t).find(".user-select-"+e+" select").val(),$.isArray(a)&&(a=a.join(",")),null==a&&(a="")),c[e]=a}),l="all:"+c.all+";user:"+c.user+";group:"+c.group+";role:"+c.role;break;default:}$(this).removeClass("error"),i[r]&&i[r].require&&(l===!1||null===l||"string"==typeof l&&""===l||"userSelect"==i[r].type&&!n(l))?($(this).addClass("error"),a.push({name:r,value:l})):e[r]=l}),a.length>0){Tips.tips(LNG.PluginConfigNotNull,"warning");var o=t.find(".panel-body"),s=t.find(".form-row.error");if(!s.parents(".tab-pane").hasClass("active")){var r=s.parents(".tab-pane").attr("id");t.find('.tab-group [data-id="'+r+'"]').click()}s.inScreen()||o.animate({scrollTop:s.offset().top-o.offset().top+o.scrollTop()},100),s.find("[name]").first().focus(),s.find(".setting-content").flash(3,100)}return{checked:0==a.length,error:a,result:e}},v=function(t){e.async(t,function(e){e&&($.isFunction(e)?e():"object"==typeof e&&e.hasOwnProperty("main")&&$.isFunction(e.main)&&e.main())})},g=function(e){if("string"==typeof e)return v(file),!1;if($.isPlainObject(e.formStyle)&&e.formStyle.loadFile){var t=e.formStyle.loadFile;"string"==typeof t&&(t=[t]),$.isArray(t)&&$(t).each(function(e,t){v(t)})}i=e,a=UUID();var n=template.compile(tplFormMake),o=n({LNG:LNG,items:e,wrapID:a});return o},b=function(e,t,a){var i=g(e);if(!i)return!1;var n={padding:0,fixed:!0,resize:!0,title:LNG.search,ico:core.icon("config"),width:680,height:500,content:i,okVal:LNG.button_save,ok:function(){var e=m();return e.checked?a(e.result):!1}};if($.isPlainObject(t))for(var s in t)n[s]=t[s];var r=$.dialog(n),l=r.DOM.wrap.find(".aui-title").html();return r.DOM.wrap.find(".modal-title").html(l),o(),r};return{makeHtml:g,bindEvent:o,getFormData:m,initDialog:b}}),define("app/common/rightMenuExtence",[],function(){$.contextMenu||($.contextMenu={}),$.contextMenu.show=function(e,t,a){e&&($.contextMenu.hidden(),$(e).contextMenu({x:t,y:a}))
},$.contextMenu.menuShow=function(){var e=$(".context-menu-active"),t=e.data("contextMenu");if(e&&t){var a=t.$menu,i="disable";a.find(".disable").addClass(i),Hook.trigger("rightMenu.show",t.selector,e,a),Hook.trigger("rightMenu.show"+t.selector,e,a)}},$.contextMenu.isDisplay=function(){return 0==$(".context-menu-list:visible").length?!1:!0},$.contextMenu.hidden=function(){$(".context-menu-list").filter(":visible").filter(":not(.menu-not-auto-hidden)").trigger("contextmenu:hide")},$.contextMenu.menuAdd=function(e,t,a,i){var n=!1,o=$.contextMenu.menus;for(var s in o)if(o[s].selector==t){n=o[s];break}if(n&&e){var r=function(e){return e?-1!==e.indexOf("/")?' ':' ':""},l=function(e,t,a,i){var o=[],s={};if(a){for(var c in t)o.push({key:c,value:t[c]});for(var d=o.length-1;d>=0;d--)s[o[d].key]=o[d].value}else s=t;$.each(s,function(t,o){o.className=o.className||"";var s=t+" "+o.className;if("string"==typeof o)var c='';else{var d=o.name;o.accesskey&&(d+='()");var c='"}var p=$(c).clone();a?e.$menu.find(a).first().after(p):i&&e.$menu.find(i).first().before(p);var u=p.parent(".context-menu-list").data("contextMenu");p.data({contextMenu:u,contextMenuKey:t,contextMenuRoot:n});var f={$input:null,$label:null,accesskey:o.accesskey,className:o.className,icon:o.icon,name:o.name,_name:d,$node:p};if(u&&(u.items||(u.items={}),u.items[t]=f),"string"!=typeof o&&(e.commands||(e.commands={}),e.commands[t]=f,n.commands[t]=f,n.callbacks[t]=function(e,t){o.callback(e,t)},o.accesskey&&(n.accesskeys[o.accesskey]=f),o.items)){var c='';$(c).appendTo(p),f.$menu=p.find("ul."+t),f.callback=null,f.appendTo=f.$node,f.type="sub",p.data("contextMenu",f).addClass("context-menu-submenu"),p.find("ul."+t).data({contextMenuRoot:n,contextMenu:f}),p.find("li."+t+"-first").data({contextMenuRoot:n,contextMenuKey:t+"-first",contextMenu:f}),f.items||(f.items={}),f.items[t+"-first"]={$input:null,$label:null,icon:"",name:"",_name:"",$node:p.find("li."+t+"-first")},l(f,o.items,"."+t+"-first")}})};l(n,e,a,i)}};var e=function(){return $('').appendTo("#rightMenu"),"function"!=typeof $.contextMenu?console.info("$.contextMenu is not function!"):($.contextMenu({zIndex:9999,selector:".dialog-menu",items:{"dialog-quit":{name:LNG.close,className:"dialog-quit",icon:"remove",accesskey:"q"},"dialog-max":{name:LNG.dialog_max,className:"dialog-max",icon:"resize-full",accesskey:"a"},"dialog-min":{name:LNG.dialog_min,className:"dialog-min",icon:"minus",accesskey:"i"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},"open-window":{name:LNG.open_ie,className:"open-window",icon:"globe",accesskey:"b"},qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=$.dialog.list[a];switch(e){case"dialog-quit":i.close();break;case"dialog-min":i._clickMin(!1);break;case"dialog-max":i._clickMax();break;case"refresh":i.refresh();break;case"open-window":i.openWindow();break;case"qrcode":core.qrcode(i.DOM.wrap.find("iframe").attr("src"));break;default:}}}),$(".aui-title img,.aui-title .x-item-file").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).parent().parent().contextMenu({x:e.pageX,y:t.top})}).die("dblclick").live("dblclick",function(){var e=$(this).parent().parent().attr("id"),t=$.dialog.list[e];t.close(),$.contextMenu.hidden()}),void 0)};Hook.bind("rightMenu.show.dialog-menu",function(e,t){var a=e.attr("id"),i=$.dialog.list[a],n="hidden",o=".open-window,.refresh,.qrcode,.context-menu-separator";i.hasFrame()?t.find(o).removeClass(n):t.find(o).addClass(n);var s=".dialog-min,.dialog-max";$("."+a).hasClass("dialog-can-resize")?t.find(s).removeClass(n):t.find(s).addClass(n)}),e()}),define("app/app/appBase",[],function(){var e={},t={},a={},i=!1,n=function(a){a.title=void 0==a.title?a.name:a.title,void 0==a.name&&(a.name=UUID(),a.hidden=!0),e[a.name]=a,a.ext||(a.ext="");var i=a.ext.split(",");e[a.name].extArr=i,a.sort=a.sort!==void 0?parseInt(a.sort):0;for(var n=0;i.length>n;n++){var o=trim(i[n]);e[a.name].extArr[n]=o,t[o]||(t[o]=[]);for(var s=!1,r=0;t[o].length>r;r++)if(t[o][r].name==a.name){s=!0;break}s||(t[o].push({name:a.name,sort:a.sort}),t[o].length>1&&(t[o]=_.sortBy(t[o],"sort").reverse()))}Hook.trigger("kodApp.add.finished")},o=function(){return t},s=function(i){if(!i||!e[i])return!1;delete e[i];for(var n in a)if(a[n]==i){delete a[n];break}for(var n in t){for(var o=t[n],s=[],r=0;o.length>r;r++)o[r].name!=i&&s.push(o[r]);0==s.length?delete t[n]:t[n]=s}},r=function(i){if(i===void 0){var n=[];for(var o in e)e[o].hidden||n.push(e[o]);return n}var s=a[i],n=[];if(!s&&!t[i])return!1;if(s&&(e[s]?n.push(e[s]):delete a[i]),!t[i])return n;for(var r=0;t[i].length>r;r++){var l=t[i][r].name;e[l]&&l!=s&&n.push(e[l])}return n},l=function(e){i=e},c=function(){return i},d=function(t,a,i){a&&"file"!=a||(a=core.pathExt(t)),i=i?i:"";var n={path:t,ext:a,appName:i};if(!Hook.trigger("kodApp.open.before",n)){if(t=n.path,a=n.ext,i=n.appName)var o=e[i];else{var s=r(a);if(!s||0==s.length)return kodApp.openUnknow(t,""),void 0;var o=s[0]}if(!o)return Tips.tips("["+i+"] not exists",!1);try{o.callback(t,a),Hook.trigger("kodApp.open.after",t,a,o)}catch(l){kodApp.openUnknow(t,""),console.error("kodApp.open error:",l)}}},p=function(t){var a=r(t),i=r("");""==t&&(a=!1),a?a.push({name:""}):a=[],a=a.concat(i);for(var n={},o=0;a.length>o;o++){var s=a[o];""==s.name||s.hidden?n["step-line"]="-------":n[s.name]={app:s.name,name:s.title,className:s.className,icon:s.icon,callback:function(t){var a=e[t];if(a&&a.callback){if($(".context-menu-active"),$(".context-menu-active").hasClass("menu-tree-file"))var i=ui.tree.makeParam();else var i=ui.path.makeParam();a.callback(i.path,i.type)}}}}return n},u=function(e,t){f(e,t),G.userConfig.kodAppDefault=htmlEncode(jsonEncode(a)),G.shareInfo||$.get(G.appHost+"setting/set&k=kodAppDefault&v="+jsonEncode(a))},f=function(t,i){if("string"==typeof t)a[t]=i;else if($.isArray(t))for(var n=0;t.length>n;n++)a[t[n]]=i;else if(e[i]&&$.isArray(e[i].extArr))for(var o=e[i].extArr,n=0;o.length>n;n++)a[o[n]]=i},h=function(){G.userConfig.kodAppDefault="[]",a={}},m=function(t,a){var t=e[t];return t?a?inArray(t.extArr,a):t.ext:!1},v=function(a,i,n){var a=e[a];if(!a)return!1;var o="undefined"==n?0:parseInt(n);0==o&&a.sort!==void 0&&(o=parseInt(a.sort)),"string"==$.type(i)&&(i=i.split(","));for(var s=0;i.length>s;s++){var r=i[s];if(r){inArray(a.extArr,r)||a.extArr.push(r),t[r]||(t[r]=[]);for(var l=!1,c=0;t[r].length>c;c++)t[r][c].name!=a.name||(t[r][c].sort=o,l=!0);l||t[r].push({name:a.name,sort:o})}}},g=function(){if(G.userConfig&&G.userConfig.kodAppDefault)try{var e=G.userConfig.kodAppDefault;e=jsonDecode(htmlDecode(e)),$.isPlainObject(e)&&(a=e)}catch(t){}Hook.bind("rightMenu.show.menu-file,rightMenu.show.menu-tree-file",function(e,t){if(e.hasClass("menu-tree-file"))var a=ui.tree.makeParam();else var a=ui.path.makeParam();var i=core.pathExt(a.path),n="hidden";if(kodApp.getApp(i)){var o=kodApp.getAppMenu(i);t.find("li.open-with.context-menu-submenu").removeClass(n),t.find("ul.context-menu-list.open-with .context-menu-item").not(".open-with-first").remove(),$.contextMenu.menuAdd(o,".menu-file",".open-with-first"),$.contextMenu.menuAdd(o,".menu-tree-file",".open-with-first")}else t.find("li.open-with.context-menu-submenu").addClass(n)}),Hook.trigger("kodApp.ready")};return g(),{debug:function(){return{appList:e,openDefault:t,openUser:a}},add:n,remove:s,appSupportCheck:m,appSupportSet:v,getApp:r,getAppBind:o,getAppMenu:p,setLastOpenTarget:l,getLastOpenTarget:c,setOpenUser:u,setOpenUserLocal:f,clearOpenUser:h,open:d}}),define("app/app/editor",[],function(){kodApp.add({name:"aceEditor",title:LNG["Plugin.default.aceEditor"],sort:0,ext:"txt,textile,oexe,inc,csv,log,asc,tsv,lnk,url,webloc,meta,localized,xib,xsd,storyboard,plist,csproj,pch,pbxproj,local,xcscheme,manifest,vbproj,strings,jshintrc,sublime-project,readme,changes,changelog,version,license,changelog,abap,abc,as,asp,aspx,ada,adb,htaccess,htgroups,htgroups,htpasswd,asciidoc,adoc,asm,a,ahk,bat,cmd,cpp,c,cc,cxx,h,hh,hpp,ino,c9search_results,cirru,cr,clj,cljs,cbl,cob,coffee,cf,cson,cakefile,cfm,cs,css,curly,d,di,dart,diff,patch,dockerfile,dot,dummy,dummy,e,ge,ejs,ex,exs,elm,erl,hrl,frt,fs,ldr,ftl,gcode,feature,.gitignore,glsl,frag,vert,gbs,go,groovy,haml,hbs,handlebars,tpl,mustache,hs,hx,html,hta,htm,xhtml,eex,html.eex,erb,rhtml,html.erb,ini,inf,conf,cfg,prefs,io,jack,jade,java,ji,jl,jq,js,jsm,json,jsp,jsx,latex,ltx,bib,lean,hlean,less,liquid,lisp,ls,logic,lql,lsl,lua,lp,lucene,Makefile,makemakefile,gnumakefile,makefile,ocamlmakefile,make,md,markdown,mask,matlab,mz,mel,mc,mush,mysql,nc,nix,nsi,nsh,m,mm,ml,mli,pas,p,pl,pm,pgsql,php,phtml,shtml,php3,php4,php5,phps,phpt,aw,ctp,module,ps1,praat,praatscript,psc,proc,plg,prolog,properties,proto,py,r,cshtml,rd,rhtml,rst,rb,ru,gemspec,rake,guardfile,rakefile,gemfile,rs,sass,scad,scala,scm,sm,rkt,oak,scheme,scss,sh,bash,bashrc,sjs,smarty,tpl,snippets,soy,space,sql,sqlserver,styl,stylus,svg,swift,tcl,tex,toml,twig,swig,ts,typescript,str,vala,vbs,vb,vm,v,vh,sv,svh,vhd,vhdl,wlk,wpgm,wtest,xml,rdf,rss,wsdl,xslt,atom,mathml,mml,xul,xbl,xaml,xq,yaml,yml,vcproj,vcxproj,filters,cer,reg,config,pem,srt,ass,lrc,opf,ncx",icon:G.staticPath+"images/file_icon/icon_app/ace.png",callback:function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if(core.isApp("editor"))return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var a=t.$.dialog.list.openEditor,i=0;a&&"hidden"==$(a.DOM.wrap).css("visibility")&&(i=200,a.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},i)}else{var n=G.appHost+"editor/edit#filename="+urlEncode(e);G.sharePage!==void 0&&(n=G.appHost+"share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e));var o=htmlEncode(urlDecode(core.pathThis(e)));core.openDialog(n,core.icon("edit"),o,"openEditor")}}});var e=ShareData.frameTop();e.Config&&"editor"==e.Config.pageApp&&kodApp.setOpenUserLocal(!1,"aceEditor")}),define("app/app/openWith",[],function(){kodApp.add({name:"appOpenSetting",title:LNG["Explorer.UI.appSetDefault"],ext:"",icon:G.staticPath+"images/file_icon/icon_others/setting.png",callback:function(e,t){var a=" {{LNG['Explorer.UI.appAwaysOpen']}}
",i=kodApp.getApp(t),n=!1;_.isArray(i)&&(n=i[0].name);var o=template.compile(a),s=o({LNG:LNG,apps:i,defaultApp:n,appAll:kodApp.getApp()}),r=$.dialog({id:"dialog-app-select",className:"menu-empty",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG["Explorer.UI.selectAppDesc"],width:480,height:360,padding:"20px",content:s,ok:function(){return l()}}),l=function(){var a=$("#app-default-checkbox").prop("checked"),i=$(".app-list.active .app-item.select").attr("data-app");return i?(r.close(),kodApp.open(e,t,i),a&&kodApp.setOpenUser(t,i),!0):(Tips.tips(LNG["Explorer.UI.selectAppWarning"],"warning"),!1)};$(".tab-group .tab-item").die("click").live("click",function(){var e=$(this).find("[aria-controls]").attr("aria-controls");"app-list-support"==e?$("#app-default-checkbox").prop("checked",!0):$("#app-default-checkbox").prop("checked",!1)}),$(".app-item").die("click").live("click",function(){$(this).parent().find(".select").removeClass("select"),$(this).addClass("select")}).die("dblclick").live("dblclick",function(){l()})}})}),define("app/app/html",[],function(){var e=function(e){return void 0==e?!1:0===e.indexOf("http")?!0:G.shareInfo||core.pathReadable(e)?!0:(Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),!1)};Hook.bind("kodApp.open.before",function(t){return"folder"==t.ext?(core.isApp("explorer")||isWap()?ui.path.list(t.path+"/"):core.explorer(t.path),!0):e(t.path)?("file"==t.ext&&(t.ext=""),void 0):!0}),kodApp.openUnknow=function(e,t){void 0==t&&(t="");var a=G.appHost+"pluginApp/index&search="+core.pathExt(e),i="kodApp.open(pathHashDecode('"+pathHashEncode(e)+"'),false,'appOpenSetting');",n="kodApp.open(pathHashDecode('"+pathHashEncode(e)+"'),false,'aceEditor');",o="kodApp.download(pathHashDecode('"+pathHashEncode(e)+"'));",s="core.openWindow('"+a+"');",r=LNG.unknow_file_try+' '+LNG.unknow_file_tips+" "+t+'
1.'+r+i+'">'+LNG["Explorer.UI.openWith"]+'
2.'+r+n+'">'+LNG["Explorer.UI.openWithText"]+'
3.'+r+o+'">'+LNG.unknow_file_download+'
'+r+s+'">'+LNG.PluginCenter+""+LNG.unknow_plugin_search+"
";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:"20px 50px",content:l,cancel:!0}),$(".unknow-file a").unbind("click").bind("click",function(e){return $(this).parents(".artDialog").data("artDialog").close(),stopPP(e)})},kodApp.add({name:"download",title:LNG.download,hidden:!0,icon:"x-item-file x-html",callback:function(t){if(e(t)){var a=t;"http"!=t.substr(0,4)&&(a=G.appHost+"explorer/fileDownload&accessToken="+G.accessToken+"&path="+urlEncode(t),G.sharePage!==void 0&&(a=G.appHost+"share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(t))),$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),isWap()?window.open(a):$('