%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/util/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/util/navbuilder-min.js

define("util/navbuilder",["aui","jquery","lib/jsuri","underscore","util/deprecation","model/page-state","exports"],function(AA,BR,Y,A2,A7,K,q){function B(Bk,Bl,Bj){this.components=(A2.isString(Bk)?[Bk]:Bk)||[];this.params=Bl||{};this.anchor=Bj||undefined}B.prototype.buildRelNoContext=function(){var Bk="/"+A2.map(this.components,encodeURIComponent).join("/");var Bl=A2.reduce(this.params,function(Bn,Bm,Bo){if(!(A2.isArray(Bm))){Bm=[Bm]}A2.forEach(Bm,function(Bp){Bn.push({key:Bo,value:Bp})});return Bn},[]);var Bj=A2.map(Bl,function(Bn){var Bm=encodeURIComponent(Bn.value);return encodeURIComponent(Bn.key)+(Bm?"="+Bm:"")}).join("&");return Bk+(Bj?"?"+Bj:"")+(this.anchor?"#"+this.anchor:"")};B.prototype.buildRelative=function(){return AA.contextPath()+this.buildRelNoContext()};B.prototype.buildAbsolute=function(){return location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")+this.buildRelative()};B.prototype.toString=function(){return this.buildRelative()};B.prototype.addParams=function(Bk){var Bj=new B(this.components,A2.extend({},this.params));if(A2.isString(Bk)){Bj.params[Bk]=""}else{if(Bk.hasOwnProperty("queryParams")){Bj.params=A2.extend(Bj.params,Bk.queryParams)}else{if(!Bk.hasOwnProperty("urlMode")){Bj.params=A2.extend(Bj.params,Bk)}}}return Bj};B.prototype.withFragment=function(Bj){return new B(this.components,this.params,Bj)};B.prototype.pushComponents=function(){var Bj=new B(this.components.slice(0),this.params);A2.each(A2.toArray(arguments).slice(0),function(Bk){if(Bk!==""){Bj.components.push(Bk)}});return Bj};B.prototype.makeBuilder=function(Bj){var Bk=this;return A2.extend({_path:function(){return Bk},build:function(){return Bk.buildRelative()},buildAbsolute:function(){return Bk.buildAbsolute()},parse:function(){return BF(this.build())},withParams:function(Bl){return Bk.addParams(Bl).makeBuilder(Bj)},withFragment:function(Bl){return Bk.withFragment(Bl).makeBuilder(Bj)},addPathComponents:function(){return Bk.pushComponents.apply(Bk,arguments).makeBuilder(Bj)},toString:function(){A7.getMessageLogger("navbuilder.toString()","navbuilder.build()","2.6","3.0")();return this.build()}},Bj)};function L(Bj){if(typeof (Bj)==="string"){return Bj}else{if(!Bj){throw new Error(AJS.I18n.getText("stash.web.error.no.project"))}}return Bj.getKey?Bj.getKey():Bj.key}function BY(){if(K.getProject()){return K.getProject()}throw new Error(AJS.I18n.getText("stash.web.error.no.project.context"))}function C(Bj){if(typeof (Bj)==="string"){return Bj}else{if(!Bj){throw new Error(AJS.I18n.getText("stash.web.error.no.repo"))}}return Bj.getSlug?Bj.getSlug():Bj.slug}function d(Bj){if(typeof (Bj)==="string"){return Bj}else{if(!Bj){throw new Error(AJS.I18n.getText("stash.web.error.no.hook.key"))}}return Bj.getDetails().getKey()}function X(){if(K.getRepository()){return K.getRepository()}throw new Error(AJS.I18n.getText("stash.web.error.no.repo.context"))}function Al(Bj){if(typeof Bj in {string:1,number:1}){return Bj}else{if(!Bj){throw new Error(AJS.I18n.getText("stash.web.error.no.pull-request.id"))}}return Bj.getId()}function BD(){if(K.getPullRequest()){return K.getPullRequest()}throw new Error(AJS.I18n.getText("stash.web.error.no.pull-request.context"))}function p(){return new B("login").makeBuilder({next:A0})}function BH(){return new B("tmp").makeBuilder({avatars:AK})}function F(){return new B("admin").makeBuilder({permissions:AM,users:Bc,groups:AQ,licensing:BM,mailServer:Ad,db:BJ})}function BL(){return this._path().pushComponents("admin").makeBuilder({users:T})}function v(){return new B("projects").makeBuilder()}function G(){return new B("repos").makeBuilder({visibility:H})}function H(Bj){return this._path().addParams({visibility:Bj}).makeBuilder()}function a(){return new B("captcha").addParams({ts:new Date().getTime().toString()}).makeBuilder()}function BC(Bk){var Bj=new B(["projects",L(Bk)]);return AN(Bj).makeBuilder({allRepos:J,repo:BV,createRepo:AV,settings:BE,permissions:AM,remove:Ai,users:Bc,groups:AQ,avatar:AU})}function AN(Bm){var Bl=Bm.components[1];var Bk=/~(.*)/;var Bj=Bk.exec(Bl);if(Bj){return new B(["users",Bj[1].toLowerCase()])}else{return Bm}}function AF(){return BC(BY())}function AR(){return new B("projects").addParams("create").makeBuilder()}function Ak(Bj){Bj=Bj?Bj:"api";return new B(["rest",Bj,"latest"]).makeBuilder({project:A,currentProject:Bh,currentRepo:t,currentPullRequest:x,markup:W,profile:M,users:A9,groups:AP,hooks:Ao,allRepos:J,admin:BL})}function A1(){return new B(["plugins","servlet","upm"]).makeBuilder({requests:Bi})}function A6(){return new B(["plugins","servlet"]).makeBuilder({path:Aw})}function Aw(){var Bj=this._path();return Bj.pushComponents.apply(Bj,S(arguments)).makeBuilder()}function Bi(){return this._path().pushComponents("requests","popular").makeBuilder({category:function(Bj){return this._path().addParams({category:Bj}).makeBuilder()}})}function A0(Bj){return this._path().addParams({next:Bj}).makeBuilder()}function AK(){return this._path().pushComponents("avatars").makeBuilder()}function AM(){return this._path().pushComponents("permissions").makeBuilder({permission:Ar,users:Bc,groups:AQ})}function Ar(Bj){return this._path().pushComponents(Bj).makeBuilder({users:A5,groups:Ba,all:AY})}function A5(){return this._path().pushComponents("users").makeBuilder()}function Ba(){return this._path().pushComponents("groups").makeBuilder()}function AY(){return this._path().pushComponents("all").makeBuilder()}function Au(){return this._path().pushComponents("anon").makeBuilder()}function BO(){return this._path().pushComponents("none").makeBuilder()}function J(){return AN(this._path()).pushComponents("repos").makeBuilder()}function Bc(){return this._path().pushComponents("users").makeBuilder({create:N,deleteUser:AL,captcha:f,view:u,filter:At,deleteSuccess:BB,permissions:AM,none:BO})}function T(){return this._path().pushComponents("users").makeBuilder()}function j(Bj){return new B(["users",Bj]).makeBuilder({avatar:V})}function AQ(){return this._path().pushComponents("groups").makeBuilder({create:N,deleteGroup:AL,view:u,filter:At,deleteSuccess:BB,permissions:AM,none:BO})}function BM(){return this._path().pushComponents("license").makeBuilder({edit:Ab})}function Ab(){return this._path().addParams({edit:""}).makeBuilder()}function Ad(){return this._path().pushComponents("mail-server").makeBuilder()}function BJ(){return this._path().pushComponents("db").makeBuilder()}function N(){return this._path().addParams({create:""}).makeBuilder()}function AL(Bj){return this._path().addParams({name:Bj}).makeBuilder()}function f(Bj){return this._path().pushComponents("captcha").addParams({name:Bj}).makeBuilder()}function u(Bj){return this._path().pushComponents("view").addParams({name:Bj}).makeBuilder()}function At(Bj){return this._path().addParams({filter:Bj}).makeBuilder()}function BB(Bj){return this._path().addParams({deleted:Bj}).makeBuilder()}function AV(){return AN(this._path()).pushComponents("repos").addParams("create").makeBuilder()}function Ai(){return this._path().makeBuilder()}function BE(){return this._path().pushComponents("settings").makeBuilder()}function AU(Bk){var Bj=this._path().pushComponents("avatar.png");if(Bk){Bj=Bj.addParams({s:Bk})}return Bj.makeBuilder()}function BV(Bj){return AN(this._path()).pushComponents("repos",C(Bj)).makeBuilder({browse:R,diff:o,commits:AT,branches:Ah,commit:Aq,changeset:Aq,settings:g,permissions:AM,hooks:BS,clone:AB,fork:A4,allPullRequests:BK,createPullRequest:BQ,pullRequest:AX,build:function(){return this._path().pushComponents("browse").toString()}})}function E(){return AF().repo(K.getRepository())}function S(Bj){if(Bj.length===1){if(Bj[0]&&Bj[0].getComponents){return Bj[0].getComponents()}else{if(BR.isArray(Bj[0])){return Bj[0]}}}return A2.toArray(Bj)}function R(){return this._path().pushComponents("browse").makeBuilder({path:AZ,at:Az})}function AZ(){var Bj=this._path();return Bj.pushComponents.apply(Bj,S(arguments)).makeBuilder({at:Az,until:I,raw:BU})}function Az(Bk){var Bj=this._path();if(Bk){if(typeof Bk!=="string"){Bk=Bk.displayId||Bk}Bj=Bj.addParams({at:Bk})}return Bj.makeBuilder({until:I,raw:BU})}function I(Bj){return this._path().addParams({until:Bj}).makeBuilder({at:Az,raw:BU})}function BU(){return this._path().addParams({raw:""}).makeBuilder()}function o(Bk){var Bl=this._path(),Bn;var Bm=(Bk.getCommitRange&&Bk.getPath&&Bk.getSrcPath);if(Bm){var Bj=Bk.getCommitRange();Bn=Bk.getPath();if(Bj.getPullRequest()){Bl=Bl.pushComponents("pull-requests",Bj.getPullRequest().getId())}else{Bl=Bl.addParams(BR.extend({},{until:Bj.getUntilRevision()&&Bj.getUntilRevision().getId()}));var Bo=Bj.getSinceRevision()&&Bj.getSinceRevision().getId();if(Bo){Bl=Bl.addParams({since:Bo})}}}else{Bn=Bk}Bl=Bl.pushComponents("diff");Bl=Bl.pushComponents.apply(Bl,Bn&&S([Bn]));if(Bm&&Bk.getSrcPath()){Bl=Bl.addParams(BR.extend({},{srcPath:Bk.getSrcPath().toString()}))}return Bl.makeBuilder({at:BW})}function BW(Bj){return this._path().addParams({at:Bj}).makeBuilder()}function AT(){return this._path().pushComponents("commits").makeBuilder({until:BG})}function Ah(Bk){var Bj=this._path().pushComponents("branches");if(Bk&&!Bk.isDefault){if(typeof Bk!=="string"){Bk=Bk.displayId||Bk.id||Bk}Bj=Bj.addParams({base:Bk})}return Bj.makeBuilder()}function BG(Bk){var Bj=this._path();if(Bk&&!Bk.isDefault){if(typeof Bk!=="string"){Bk=Bk.displayId||Bk}Bj=Bj.addParams({until:Bk})}return Bj.makeBuilder()}function Aq(Bj){return this._path().pushComponents("commits",Bj).makeBuilder({comment:Aa})}function Aa(Bj){return this._path().addParams({commentId:Bj}).makeBuilder()}function g(){return this._path().pushComponents("settings").makeBuilder()}function BS(){return this._path().pushComponents("settings","hooks").makeBuilder()}function AB(Bk){var Bm=this._path(),Bj=Bm.components[1].toLowerCase(),Bl=Bm.components[3].toLowerCase();if(Bm.components[0]==="users"){Bj="~"+Bj}return new B(["scm",Bj,Bl+"."+Bk],Bm.params).makeBuilder()}function A4(){return this._path().addParams("fork").makeBuilder()}function BK(){return this._path().pushComponents("pull-requests").makeBuilder()}var Bg={sourceBranch:e,targetBranch:Bf,source:A7.fn(e,"navbuilder.project().repo().createPullRequest().source()","navbuilder.project().repo().createPullRequest().sourceBranch()","2.4","3.0"),target:A7.fn(Bf,"navbuilder.project().repo().createPullRequest().target()","navbuilder.project().repo().createPullRequest().targetBranch()","2.4","3.0")};function BQ(){return this._path().pushComponents("pull-requests").addParams("create").makeBuilder(Bg)}function e(Bj){return this._path().addParams({sourceBranch:Bj}).makeBuilder(Bg)}function Bf(Bj){return this._path().addParams({targetBranch:Bj}).makeBuilder(Bg)}function AX(Bj){return this._path().pushComponents("pull-requests",Al(Bj)).makeBuilder({unwatch:l,activity:Bb,changeset:Z,overview:AH,diff:AE,commits:Am,build:function(){return this._path().pushComponents("overview").toString()}})}function Av(){return E.call(this).pullRequest(BD())}var Bb=A7.fn(AH,"navbuilder::activity()","navbuilder::overview()","2.0","3.0");function AH(){return this._path().pushComponents("overview").makeBuilder({comment:U})}function l(){return this._path().pushComponents("unwatch").makeBuilder()}function Z(Bj){return this._path().pushComponents("commits",Bj).makeBuilder()}function U(Bj){return this._path().addParams({commentId:Bj}).makeBuilder()}function AE(){return this._path().pushComponents("diff").makeBuilder({change:function(Bj){return this._path().withFragment(Bj).makeBuilder()}})}function Am(){return this._path().pushComponents("commits").makeBuilder()}function A(Bk){var Bj=L(Bk);return this._path().pushComponents("projects",Bj).makeBuilder({allRepos:Ac,repo:BZ,permissions:P})}function Bh(){return A.call(this,BY())}function BA(Bk){var Bj=d(Bk);return this._path().pushComponents("settings").pushComponents("hooks",Bj).makeBuilder({enabled:Af,settings:A3})}function Af(){return this._path().pushComponents("enabled").makeBuilder()}function A3(){return this._path().pushComponents("settings").makeBuilder()}function Ac(){return this._path().pushComponents("repos").makeBuilder()}function BZ(Bk){var Bj=C(Bk);return this._path().pushComponents("repos",Bj).makeBuilder({tags:m,branches:z,commits:b,commit:BT,changeset:BT,changes:BI,browse:r,files:Ax,related:k,pullRequest:Be,allPullRequests:y,hooks:BS,hook:BA})}function t(){return Bh.call(this).repo(X())}function BI(Bj){if(Bj.getPullRequest()){return A2.bind(Be,this)(Bj.getPullRequest()).changes()}else{if(Bj.getUntilRevision()){return this.changeset(Bj).changes()}else{throw new Error("A valid commit-range is required to retrieve changes")}}}function k(){return this._path().pushComponents("related").makeBuilder()}function Be(Bj){var Bk=Al(Bj);return this._path().pushComponents("pull-requests",Bk).makeBuilder({activities:function(){return this._path().pushComponents("activities").makeBuilder()},approve:n,comment:AW,comments:function(){return this._path().pushComponents("comments").makeBuilder()},changes:w,diff:Ay,watch:BX,merge:i,reopen:AD,decline:AS})}function x(){return t.call(this).pullRequest(BD())}function y(){return this._path().pushComponents("pull-requests").makeBuilder()}function AW(Bj){return this._path().pushComponents("comments",Bj).makeBuilder({comment:AW})}function w(){return this._path().pushComponents("changes").makeBuilder()}function n(){return this._path().pushComponents("approve").makeBuilder()}function BX(){return this._path().pushComponents("watch").makeBuilder()}function i(){return this._path().pushComponents("merge").makeBuilder()}function AS(){return this._path().pushComponents("decline").makeBuilder()}function AD(){return this._path().pushComponents("reopen").makeBuilder()}function m(){return this._path().pushComponents("tags").makeBuilder()}function z(){return this._path().pushComponents("branches").makeBuilder()}function b(){return this._path().pushComponents("commits").makeBuilder()}function BT(Bj){var Bl=this._path().pushComponents("commits");if(typeof Bj==="string"){Bl=Bl.pushComponents(Bj)}else{if(Bj.getUntilRevision){Bl=Bl.pushComponents(Bj.getUntilRevision().getId());var Bk=Bj.getSinceRevision()&&Bj.getSinceRevision().getId();if(Bk){Bl=Bl.addParams({since:Bk})}}else{throw new Error(AJS.I18n.getText("stash.web.error.no.commit.or.commitRange"))}}return Bl.makeBuilder({diff:Ay,changes:AJ,comments:BP,watch:D})}function D(){return this._path().pushComponents("watch").makeBuilder()}function AJ(){return this._path().pushComponents("changes").makeBuilder({path:Ae})}function Ay(Bj){var Bk=this._path();Bk=Bk.pushComponents("diff");Bk=Bk.pushComponents.apply(Bk,S([Bj.getPath()]));if(Bj.getSrcPath()){Bk=Bk.addParams({srcPath:Bj.getSrcPath().toString()})}return Bk.makeBuilder()}function BP(){return this._path().pushComponents("comments").makeBuilder({path:Ae})}function Ae(Bj){return this._path().addParams({path:Bj.toString()}).makeBuilder()}function r(){return this._path().pushComponents("browse").makeBuilder({path:AZ,at:Az})}function Ax(){return this._path().pushComponents("files").makeBuilder({all:Ag,path:AG,at:Az})}function Ag(){return this._path().addParams({limit:100000}).makeBuilder({path:AG,at:Az})}function AG(){var Bj=this._path();return Bj.pushComponents.apply(Bj,S(arguments)).makeBuilder({at:Az})}function P(){return this._path().pushComponents("permissions").makeBuilder({projectRead:O,projectWrite:AI})}function O(){return this._path().pushComponents("project-read").makeBuilder({all:Aj,anon:h})}function AI(){return this._path().pushComponents("project-write").makeBuilder({all:Aj})}function Aj(){return this._path().pushComponents("all").makeBuilder({allow:Ap})}function h(){return this._path().pushComponents("anon").makeBuilder({allow:Ap})}function Ap(Bj){return this._path().addParams({allow:Bj}).makeBuilder()}function W(){return this._path().pushComponents("markup").makeBuilder({preview:AO})}function AO(){return this._path().pushComponents("preview").makeBuilder()}function M(){return this._path().pushComponents("profile").makeBuilder({recent:A8})}function A8(){return this._path().pushComponents("recent").makeBuilder({repos:As})}function As(){return this._path().pushComponents("repos").makeBuilder()}function A9(Bk){var Bj=this._path().pushComponents("users");if(Bk){Bj=Bj.pushComponents(Bk)}return Bj.makeBuilder({avatar:V})}function AP(){return this._path().pushComponents("groups").makeBuilder()}function Ao(){return this._path().pushComponents("hooks").makeBuilder({hook:AC})}function AC(Bj){return this._path().pushComponents(Bj).makeBuilder({avatar:Bd})}function Bd(Bj){return this._path().pushComponents("avatar").addParams({version:Bj}).makeBuilder()}function c(){return this._path().pushComponents("repos").makeBuilder()}function V(Bk){var Bj=this._path().pushComponents("avatar.png");if(Bk){Bj=Bj.addParams({s:Bk})}return Bj.makeBuilder()}var Q=/(default-avatar-)\d+(\.png)/;function s(Bj,Bk){return{build:function(){var Bl=BF(Bj.avatarUrl);if(Bl.getQueryParamValue("s")){Bl.replaceQueryParam("s",Bk)}return Bl.toString().replace(Q,"$1"+Bk+"$2")}}}function BF(Bj){return new Y(Bj)}function BN(Bj){if(typeof Bj!=="string"){return"/"}else{return Bj+((Bj.charAt(Bj.length-1)!=="/")?"/":"")}}function An(Bj,Bk){return new B(Bj,Bk)}q.login=p;q.tmp=BH;q.captcha=a;q.admin=F;q.user=j;q.project=BC;q.pluginServlets=A6;q.addons=A1;q.allProjects=v;q.allRepos=G;q.createProject=AR;q.currentProject=AF;q.currentRepo=E;q.currentPullRequest=Av;q.rest=Ak;q.parse=BF;q.appendSlashToUrl=BN;q.avatarUrl=s;q.newBuilder=An});

Zerion Mini Shell 1.0