2015-02-05 03:52:31 +03:00
function Tabs ( e ) { function t ( e ) { console . log ( "hide" , e ) , e . removeClass ( "js-tab-nav-show" ) , $ ( e . data ( "tab-target" ) ) . removeClass ( "js-tab-show" ) . hide ( ) } function n ( e ) { console . log ( "show" , e ) , e . addClass ( "js-tab-nav-show" ) , $ ( e . data ( "tab-target" ) ) . addClass ( "js-tab-show" ) . show ( ) } var i = $ ( e ) ; if ( i . length ) { var r = i . find ( ".js-tab-nav-show" ) ; r . length && $ ( r . data ( "tab-target" ) ) . addClass ( "js-tab-show" ) , i . on ( "click" , ".js-tab-nav" , function ( e ) { e . preventDefault ( ) ; var o = $ ( this ) ; o . hasClass ( "js-tab-nav-show" ) || ( r = i . find ( ".js-tab-nav-show" ) . eq ( 0 ) , t ( r ) , n ( o ) ) } ) , console . log ( "init tabs @" , e ) } } function Preview ( e , t ) { function n ( e ) { return e . find ( ".js-preview-input" ) . eq ( 0 ) } function i ( e ) { return e . hasClass ( "js-preview-container" ) ? e : e . find ( ".js-preview-container" ) . eq ( 0 ) } var r = $ ( e ) , o = $ ( t ) , a = n ( o ) ; if ( ! a . length ) return void console . log ( "[preview]: no preview input" ) ; var s = i ( o ) ; return s . length ? ( r . on ( "click" , function ( ) { $ . post ( "/api/v1/markdown" , { text : a . val ( ) } , function ( e ) { s . html ( e ) } ) } ) , void console . log ( "[preview]: init preview @" , e , "&" , t ) ) : void console . log ( "[preview]: no preview container" ) } function initCore ( ) { Gogs . renderMarkdown ( ) , 0 == $ ( ".code-diff" ) . length ? Gogs . renderCodeView ( ) : Gogs . renderDiffView ( ) , $ ( ".js-tab-nav" ) . click ( function ( e ) { $ ( this ) . hasClass ( "js-tab-nav-show" ) || ( $ ( this ) . parent ( ) . find ( ".js-tab-nav-show" ) . each ( function ( ) { $ ( this ) . removeClass ( "js-tab-nav-show" ) , $ ( $ ( this ) . data ( "tab-target" ) ) . hide ( ) } ) , $ ( this ) . addClass ( "js-tab-nav-show" ) , $ ( $ ( this ) . data ( "tab-target" ) ) . show ( ) ) , e . preventDefault ( ) } ) , $ ( document ) . on ( "click" , ".popup-modal-dismiss" , function ( e ) { e . preventDefault ( ) , $ . magnificPopup . close ( ) } ) , $ ( ".collapse" ) . hide ( ) , $ ( ".tipsy-tooltip" ) . tipsy ( { fade : ! 0 } ) } function initUserSetting ( ) { var t = $ ( "#username" ) , n = $ ( "#user-profile-form" ) ; $ ( "#change-username-btn" ) . magnificPopup ( { modal : ! 0 , callbacks : { open : function ( ) { t . data ( "uname" ) == t . val ( ) && ( $ . magnificPopup . close ( ) , n . submit ( ) ) } } } ) . click ( function ( ) { return t . data ( "uname" ) != t . val ( ) ? ( e . preventDefault ( ) , ! 0 ) : void 0 } ) , $ ( "#change-username-submit" ) . click ( function ( ) { $ . magnificPopup . close ( ) , n . submit ( ) } ) , $ ( ".show-form-btn" ) . click ( function ( ) { $ ( $ ( this ) . data ( "target-form" ) ) . removeClass ( "hide" ) } ) , $ ( "#delete-account-btn" ) . magnificPopup ( { modal : ! 0 } ) . click ( function ( e ) { return e . preventDefault ( ) , ! 0 } ) , $ ( "#delete-account-submit" ) . click ( function ( ) { $ . magnificPopup . close ( ) , $ ( "#delete-account-form" ) . submit ( ) } ) } function initRepoCreate ( ) { $ ( "#repo-create-owner-list" ) . on ( "click" , "li" , function ( ) { if ( ! $ ( this ) . hasClass ( "checked" ) ) { var e = $ ( this ) . data ( "uid" ) ; $ ( "#repo-owner-id" ) . val ( e ) , $ ( "#repo-owner-avatar" ) . attr ( "src" , $ ( this ) . find ( "img" ) . attr ( "src" ) ) , $ ( "#repo-owner-name" ) . text ( $ ( this ) . text ( ) . trim ( ) ) , $ ( this ) . parent ( ) . find ( ".checked" ) . removeClass ( "checked" ) , $ ( this ) . addClass ( "checked" ) , console . log ( "set repo owner to uid :" , e , $ ( this ) . text ( ) . trim ( ) ) } } ) , $ ( "#auth-button" ) . click ( function ( e ) { $ ( "#repo-migrate-auth" ) . slideToggle ( "fast" ) , e . preventDefault ( ) } ) , console . log ( "initRepoCreate" ) } function initRepo ( ) { $ ( "#repo-clone-ssh" ) . click ( function ( ) { $ ( this ) . removeClass ( "btn-gray" ) . addClass ( "btn-blue" ) , $ ( "#repo-clone-https" ) . removeClass ( "btn-blue" ) . addClass ( "btn-gray" ) , $ ( "#repo-clone-url" ) . val ( $ ( this ) . data ( "link" ) ) , $ ( ".clone-url" ) . text ( $ ( this ) . data ( "link" ) ) } ) , $ ( "#repo-clone-https" ) . click ( function ( ) { $ ( this ) . removeClass ( "btn-gray" ) . addClass ( "btn-blue" ) , $ ( "#repo-clone-ssh" ) . removeClass ( "btn-blue" ) . addClass ( "btn-gray" ) , $ ( "#repo-clone-url" ) . val ( $ ( this ) . data ( "link" ) ) , $ ( ".clone-url" ) . text ( $ ( this ) . data ( "link" ) ) } ) ; var e = $ ( "#repo-clone-copy" ) ; e . hover ( function ( ) { Gogs . bindCopy ( $ ( this ) ) } ) , e . tipsy ( { fade : ! 0 } ) , $ ( ".markdown-preview" ) . click ( function ( ) { var e = $ ( this ) ; e . toggleAjax ( function ( t ) { $ ( e . data ( "preview" ) ) . html ( t ) } , function ( ) { $ ( e . data ( "preview" ) ) . html ( "no content" ) } ) } ) } function initHookTypeChange ( ) { $ ( "select#hook-type" ) . on ( "change" , function ( ) { hookTypes = [ "Gogs" , "Slack" ] ; var e = $ ( this ) . val ( ) ; hookTypes . forEach ( function ( t ) { e === t ? $ ( "div#" + t . toLowerCase ( ) ) . toggleShow ( ) : $ ( "div#" + t . toLowerCase ( ) ) . toggleHide ( ) } ) } ) } function initRepoRelease ( ) { $ ( "#release-new-target-branch-list li" ) . click ( function ( ) { $ ( this ) . hasClass ( "checked" ) || ( $ ( "#repo-branch-current" ) . text ( $ ( this ) . text ( ) ) , $ ( "#tag-target" ) . val ( $ ( this ) . text ( ) ) , $
} , ! 1 ) : i . attachEvent && i . attachEvent ( "onunload" , function ( ) { j ( ) } ) ) , w . attributes = r ( function ( e ) { return e . className = "i" , ! e . getAttribute ( "className" ) } ) , w . getElementsByTagName = r ( function ( e ) { return e . appendChild ( n . createComment ( "" ) ) , ! e . getElementsByTagName ( "*" ) . length } ) , w . getElementsByClassName = $ . test ( n . getElementsByClassName ) && r ( function ( e ) { return e . innerHTML = "<div class='a'></div><div class='a i'></div>" , e . firstChild . className = "i" , 2 === e . getElementsByClassName ( "i" ) . length } ) , w . getById = r ( function ( e ) { return P . appendChild ( e ) . id = z , ! n . getElementsByName || ! n . getElementsByName ( z ) . length } ) , w . getById ? ( C . find . ID = function ( e , t ) { if ( typeof t . getElementById !== G && _ ) { var n = t . getElementById ( e ) ; return n && n . parentNode ? [ n ] : [ ] } } , C . filter . ID = function ( e ) { var t = e . replace ( wt , Ct ) ; return function ( e ) { return e . getAttribute ( "id" ) === t } } ) : ( delete C . find . ID , C . filter . ID = function ( e ) { var t = e . replace ( wt , Ct ) ; return function ( e ) { var n = typeof e . getAttributeNode !== G && e . getAttributeNode ( "id" ) ; return n && n . value === t } } ) , C . find . TAG = w . getElementsByTagName ? function ( e , t ) { return typeof t . getElementsByTagName !== G ? t . getElementsByTagName ( e ) : void 0 } : function ( e , t ) { var n , i = [ ] , r = 0 , o = t . getElementsByTagName ( e ) ; if ( "*" === e ) { for ( ; n = o [ r ++ ] ; ) 1 === n . nodeType && i . push ( n ) ; return i } return o } , C . find . CLASS = w . getElementsByClassName && function ( e , t ) { return typeof t . getElementsByClassName !== G && _ ? t . getElementsByClassName ( e ) : void 0 } , O = [ ] , H = [ ] , ( w . qsa = $ . test ( n . querySelectorAll ) ) && ( r ( function ( e ) { e . innerHTML = "<select msallowclip=''><option selected=''></option></select>" , e . querySelectorAll ( "[msallowclip^='']" ) . length && H . push ( "[*^$]=" + rt + "*(?:''|\"\")" ) , e . querySelectorAll ( "[selected]" ) . length || H . push ( "\\[" + rt + "*(?:value|" + it + ")" ) , e . querySelectorAll ( ":checked" ) . length || H . push ( ":checked" ) } ) , r ( function ( e ) { var t = n . createElement ( "input" ) ; t . setAttribute ( "type" , "hidden" ) , e . appendChild ( t ) . setAttribute ( "name" , "D" ) , e . querySelectorAll ( "[name=d]" ) . length && H . push ( "name" + rt + "*[*^$|!~]?=" ) , e . querySelectorAll ( ":enabled" ) . length || H . push ( ":enabled" , ":disabled" ) , e . querySelectorAll ( "*,:x" ) , H . push ( ",.*:" ) } ) ) , ( w . matchesSelector = $ . test ( q = P . matches || P . webkitMatchesSelector || P . mozMatchesSelector || P . oMatchesSelector || P . msMatchesSelector ) ) && r ( function ( e ) { w . disconnectedMatch = q . call ( e , "div" ) , q . call ( e , "[s!='']:x" ) , O . push ( "!=" , lt ) } ) , H = H . length && new RegExp ( H . join ( "|" ) ) , O = O . length && new RegExp ( O . join ( "|" ) ) , t = $ . test ( P . compareDocumentPosition ) , M = t || $ . test ( P . contains ) ? function ( e , t ) { var n = 9 === e . nodeType ? e . documentElement : e , i = t && t . parentNode ; return e === i || ! ( ! i || 1 !== i . nodeType || ! ( n . contains ? n . contains ( i ) : e . compareDocumentPosition && 16 & e . compareDocumentPosition ( i ) ) ) } : function ( e , t ) { if ( t ) for ( ; t = t . parentNode ; ) if ( t === e ) return ! 0 ; return ! 1 } , Z = t ? function ( e , t ) { if ( e === t ) return D = ! 0 , 0 ; var i = ! e . compareDocumentPosition - ! t . compareDocumentPosition ; return i ? i : ( i = ( e . ownerDocument || e ) === ( t . ownerDocument || t ) ? e . compareDocumentPosition ( t ) : 1 , 1 & i || ! w . sortDetached && t . compareDocumentPosition ( e ) === i ? e === n || e . ownerDocument === F && M ( F , e ) ? - 1 : t === n || t . ownerDocument === F && M ( F , t ) ? 1 : A ? nt . call ( A , e ) - nt . call ( A , t ) : 0 : 4 & i ? - 1 : 1 ) } : function ( e , t ) { if ( e === t ) return D = ! 0 , 0 ; var i , r = 0 , o = e . parentNode , s = t . parentNode , l = [ e ] , c = [ t ] ; if ( ! o || ! s ) return e === n ? - 1 : t === n ? 1 : o ? - 1 : s ? 1 : A ? nt . call ( A , e ) - nt . call ( A , t ) : 0 ; if ( o === s ) return a ( e , t ) ; for ( i = e ; i = i . parentNode ; ) l . unshift ( i ) ; for ( i = t ; i = i . parentNode ; ) c . unshift ( i ) ; for ( ; l [ r ] === c [ r ] ; ) r ++ ; return r ? a ( l [ r ] , c [ r ] ) : l [ r ] === F ? - 1 : c [ r ] === F ? 1 : 0 } , n ) : R } , t . matches = function ( e , n ) { return t ( e , null , null , n ) } , t . matchesSelector = function ( e , n ) { if ( ( e . ownerDocument || e ) !== R && j ( e ) , n = n . replace ( ft , "='$1']" ) , ! ( ! w . matchesSelector || ! _ || O && O . test ( n ) || H && H . test ( n ) ) ) try { var i = q . call ( e , n ) ; if ( i || w . disconnectedMatch || e . document && 11 !== e . document . nodeType ) return i } catch ( r ) { } return t ( n , R , null , [ e ] ) . length > 0 } , t . contains = function ( e , t ) { return ( e . ownerDocument || e ) !== R && j ( e ) , M ( e , t ) } , t . attr = function ( e , t ) { ( e . ownerDocument || e ) !== R && j ( e ) ; var n = C . attrHandle [ t . toLowerCase ( ) ] , i = n && Q . call ( C . attrHandle , t . toLowerCase ( ) ) ? n ( e , t , ! _ ) : void 0 ; return void 0 !== i ? i : w . attributes || ! _ ? e . getAttribute ( t ) : ( i = e . getAttributeNode ( t ) ) && i . specified ? i . value : null } , t . error = function ( e ) { throw new Error ( "Syntax error, unrecognized expression: " + e ) } , t . uniqueSort = f
} , teardown : function ( ) { return ot . nodeName ( this , "form" ) ? ! 1 : void ot . event . remove ( this , "._submit" ) } } ) , it . changeBubbles || ( ot . event . special . change = { setup : function ( ) { return jt . test ( this . nodeName ) ? ( ( "checkbox" === this . type || "radio" === this . type ) && ( ot . event . add ( this , "propertychange._change" , function ( e ) { "checked" === e . originalEvent . propertyName && ( this . _just _changed = ! 0 ) } ) , ot . event . add ( this , "click._change" , function ( e ) { this . _just _changed && ! e . isTrigger && ( this . _just _changed = ! 1 ) , ot . event . simulate ( "change" , this , e , ! 0 ) } ) ) , ! 1 ) : void ot . event . add ( this , "beforeactivate._change" , function ( e ) { var t = e . target ; jt . test ( t . nodeName ) && ! ot . _data ( t , "changeBubbles" ) && ( ot . event . add ( t , "change._change" , function ( e ) { ! this . parentNode || e . isSimulated || e . isTrigger || ot . event . simulate ( "change" , this . parentNode , e , ! 0 ) } ) , ot . _data ( t , "changeBubbles" , ! 0 ) ) } ) } , handle : function ( e ) { var t = e . target ; return this !== t || e . isSimulated || e . isTrigger || "radio" !== t . type && "checkbox" !== t . type ? e . handleObj . handler . apply ( this , arguments ) : void 0 } , teardown : function ( ) { return ot . event . remove ( this , "._change" ) , ! jt . test ( this . nodeName ) } } ) , it . focusinBubbles || ot . each ( { focus : "focusin" , blur : "focusout" } , function ( e , t ) { var n = function ( e ) { ot . event . simulate ( t , e . target , ot . event . fix ( e ) , ! 0 ) } ; ot . event . special [ t ] = { setup : function ( ) { var i = this . ownerDocument || this , r = ot . _data ( i , t ) ; r || i . addEventListener ( e , n , ! 0 ) , ot . _data ( i , t , ( r || 0 ) + 1 ) } , teardown : function ( ) { var i = this . ownerDocument || this , r = ot . _data ( i , t ) - 1 ; r ? ot . _data ( i , t , r ) : ( i . removeEventListener ( e , n , ! 0 ) , ot . _removeData ( i , t ) ) } } } ) , ot . fn . extend ( { on : function ( e , t , n , i , r ) { var o , a ; if ( "object" == typeof e ) { "string" != typeof t && ( n = n || t , t = void 0 ) ; for ( o in e ) this . on ( o , t , n , e [ o ] , r ) ; return this } if ( null == n && null == i ? ( i = t , n = t = void 0 ) : null == i && ( "string" == typeof t ? ( i = n , n = void 0 ) : ( i = n , n = t , t = void 0 ) ) , i === ! 1 ) i = p ; else if ( ! i ) return this ; return 1 === r && ( a = i , i = function ( e ) { return ot ( ) . off ( e ) , a . apply ( this , arguments ) } , i . guid = a . guid || ( a . guid = ot . guid ++ ) ) , this . each ( function ( ) { ot . event . add ( this , e , i , n , t ) } ) } , one : function ( e , t , n , i ) { return this . on ( e , t , n , i , 1 ) } , off : function ( e , t , n ) { var i , r ; if ( e && e . preventDefault && e . handleObj ) return i = e . handleObj , ot ( e . delegateTarget ) . off ( i . namespace ? i . origType + "." + i . namespace : i . origType , i . selector , i . handler ) , this ; if ( "object" == typeof e ) { for ( r in e ) this . off ( r , t , e [ r ] ) ; return this } return ( t === ! 1 || "function" == typeof t ) && ( n = t , t = void 0 ) , n === ! 1 && ( n = p ) , this . each ( function ( ) { ot . event . remove ( this , e , n , t ) } ) } , trigger : function ( e , t ) { return this . each ( function ( ) { ot . event . trigger ( e , t , this ) } ) } , triggerHandler : function ( e , t ) { var n = this [ 0 ] ; return n ? ot . event . trigger ( e , t , n , ! 0 ) : void 0 } } ) ; var Ht = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video" , Ot = / jQuery\d+="(?:null|\d+)"/g , qt = new RegExp ( "<(?:" + Ht + ")[\\s/>]" , "i" ) , Mt = /^\s+/ , zt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi , Ft = /<([\w:]+)/ , It = /<tbody/i , Bt = /<|&#?\w+;/ , Wt = /<(?:script|style|link)/i , Ut = /checked\s*(?:[^=]|=\s*.checked.)/i , Xt = /^$|\/(?:java|ecma)script/i , Zt = /^true\/(.*)/ , Gt = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g , Vt = { option : [ 1 , "<select multiple='multiple'>" , "</select>" ] , legend : [ 1 , "<fieldset>" , "</fieldset>" ] , area : [ 1 , "<map>" , "</map>" ] , param : [ 1 , "<object>" , "</object>" ] , thead : [ 1 , "<table>" , "</table>" ] , tr : [ 2 , "<table><tbody>" , "</tbody></table>" ] , col : [ 2 , "<table><tbody></tbody><colgroup>" , "</colgroup></table>" ] , td : [ 3 , "<table><tbody><tr>" , "</tr></tbody></table>" ] , _default : it . htmlSerialize ? [ 0 , "" , "" ] : [ 1 , "X<div>" , "</div>" ] } , Qt = m ( mt ) , Yt = Qt . appendChild ( mt . createElement ( "div" ) ) ; Vt . optgroup = Vt . option , Vt . tbody = Vt . tfoot = Vt . colgroup = Vt . caption = Vt . thead , Vt . th = Vt . td , ot . extend ( { clone : function ( e , t , n ) { var i , r , o , a , s , l = ot . contains ( e . ownerDocument , e ) ; if ( it . html5Clone || ot . isXMLDoc ( e ) || ! qt . test ( "<" + e . nodeName + ">" ) ? o = e . cloneNode ( ! 0 ) : ( Yt . innerHTML = e . outerHTML , Yt . removeChild ( o = Yt . firstChild ) ) , ! ( it . noCloneEvent && it . noCloneChecked || 1 !== e . nodeType && 11 !== e . nodeType || ot . isXMLDoc ( e ) ) ) for ( i = g ( o ) , s = g ( e ) , a = 0 ; null != ( r = s [ a ] ) ; ++ a ) i [ a ] && k ( r , i [ a ] ) ; if ( t ) if ( n ) for ( s = s || g ( e ) , i = i || g ( o ) , a = 0 ; null != ( r = s [ a ] ) ; a ++ ) C ( r , i [ a ] ) ; else C ( e , o ) ; return i = g ( o , "script" ) , i . length > 0 && w ( i , ! l && g ( e , " scrip
for ( r in d . headers ) w . setRequestHeader ( r , d . headers [ r ] ) ; if ( d . beforeSend && ( d . beforeSend . call ( f , w , d ) === ! 1 || 2 === b ) ) return w . abort ( ) ; x = "abort" ; for ( r in { success : 1 , error : 1 , complete : 1 } ) w [ r ] ( d [ r ] ) ; if ( c = F ( Wn , d , t , w ) ) { w . readyState = 1 , l && p . trigger ( "ajaxSend" , [ w , d ] ) , d . async && d . timeout > 0 && ( s = setTimeout ( function ( ) { w . abort ( "timeout" ) } , d . timeout ) ) ; try { b = 1 , c . send ( v , n ) } catch ( C ) { if ( ! ( 2 > b ) ) throw C ; n ( - 1 , C ) } } else n ( - 1 , "No Transport" ) ; return w } , getJSON : function ( e , t , n ) { return ot . get ( e , t , n , "json" ) } , getScript : function ( e , t ) { return ot . get ( e , void 0 , t , "script" ) } } ) , ot . each ( [ "get" , "post" ] , function ( e , t ) { ot [ t ] = function ( e , n , i , r ) { return ot . isFunction ( n ) && ( r = r || i , i = n , n = void 0 ) , ot . ajax ( { url : e , type : t , dataType : r , data : n , success : i } ) } } ) , ot . each ( [ "ajaxStart" , "ajaxStop" , "ajaxComplete" , "ajaxError" , "ajaxSuccess" , "ajaxSend" ] , function ( e , t ) { ot . fn [ t ] = function ( e ) { return this . on ( t , e ) } } ) , ot . _evalUrl = function ( e ) { return ot . ajax ( { url : e , type : "GET" , dataType : "script" , async : ! 1 , global : ! 1 , "throws" : ! 0 } ) } , ot . fn . extend ( { wrapAll : function ( e ) { if ( ot . isFunction ( e ) ) return this . each ( function ( t ) { ot ( this ) . wrapAll ( e . call ( this , t ) ) } ) ; if ( this [ 0 ] ) { var t = ot ( e , this [ 0 ] . ownerDocument ) . eq ( 0 ) . clone ( ! 0 ) ; this [ 0 ] . parentNode && t . insertBefore ( this [ 0 ] ) , t . map ( function ( ) { for ( var e = this ; e . firstChild && 1 === e . firstChild . nodeType ; ) e = e . firstChild ; return e } ) . append ( this ) } return this } , wrapInner : function ( e ) { return this . each ( ot . isFunction ( e ) ? function ( t ) { ot ( this ) . wrapInner ( e . call ( this , t ) ) } : function ( ) { var t = ot ( this ) , n = t . contents ( ) ; n . length ? n . wrapAll ( e ) : t . append ( e ) } ) } , wrap : function ( e ) { var t = ot . isFunction ( e ) ; return this . each ( function ( n ) { ot ( this ) . wrapAll ( t ? e . call ( this , n ) : e ) } ) } , unwrap : function ( ) { return this . parent ( ) . each ( function ( ) { ot . nodeName ( this , "body" ) || ot ( this ) . replaceWith ( this . childNodes ) } ) . end ( ) } } ) , ot . expr . filters . hidden = function ( e ) { return e . offsetWidth <= 0 && e . offsetHeight <= 0 || ! it . reliableHiddenOffsets ( ) && "none" === ( e . style && e . style . display || ot . css ( e , "display" ) ) } , ot . expr . filters . visible = function ( e ) { return ! ot . expr . filters . hidden ( e ) } ; var Zn = /%20/g , Gn = /\[\]$/ , Vn = /\r?\n/g , Qn = /^(?:submit|button|image|reset|file)$/i , Yn = /^(?:input|select|textarea|keygen)/i ; ot . param = function ( e , t ) { var n , i = [ ] , r = function ( e , t ) { t = ot . isFunction ( t ) ? t ( ) : null == t ? "" : t , i [ i . length ] = encodeURIComponent ( e ) + "=" + encodeURIComponent ( t ) } ; if ( void 0 === t && ( t = ot . ajaxSettings && ot . ajaxSettings . traditional ) , ot . isArray ( e ) || e . jquery && ! ot . isPlainObject ( e ) ) ot . each ( e , function ( ) { r ( this . name , this . value ) } ) ; else for ( n in e ) U ( n , e [ n ] , t , r ) ; return i . join ( "&" ) . replace ( Zn , "+" ) } , ot . fn . extend ( { serialize : function ( ) { return ot . param ( this . serializeArray ( ) ) } , serializeArray : function ( ) { return this . map ( function ( ) { var e = ot . prop ( this , "elements" ) ; return e ? ot . makeArray ( e ) : this } ) . filter ( function ( ) { var e = this . type ; return this . name && ! ot ( this ) . is ( ":disabled" ) && Yn . test ( this . nodeName ) && ! Qn . test ( e ) && ( this . checked || ! Dt . test ( e ) ) } ) . map ( function ( e , t ) { var n = ot ( this ) . val ( ) ; return null == n ? null : ot . isArray ( n ) ? ot . map ( n , function ( e ) { return { name : t . name , value : e . replace ( Vn , "\r\n" ) } } ) : { name : t . name , value : n . replace ( Vn , "\r\n" ) } } ) . get ( ) } } ) , ot . ajaxSettings . xhr = void 0 !== e . ActiveXObject ? function ( ) { return ! this . isLocal && /^(get|post|head|put|delete|options)$/i . test ( this . type ) && X ( ) || Z ( ) } : X ; var Kn = 0 , Jn = { } , ei = ot . ajaxSettings . xhr ( ) ; e . ActiveXObject && ot ( e ) . on ( "unload" , function ( ) { for ( var e in Jn ) Jn [ e ] ( void 0 , ! 0 ) } ) , it . cors = ! ! ei && "withCredentials" in ei , ei = it . ajax = ! ! ei , ei && ot . ajaxTransport ( function ( e ) { if ( ! e . crossDomain || it . cors ) { var t ; return { send : function ( n , i ) { var r , o = e . xhr ( ) , a = ++ Kn ; if ( o . open ( e . type , e . url , e . async , e . username , e . password ) , e . xhrFields ) for ( r in e . xhrFields ) o [ r ] = e . xhrFields [ r ] ; e . mimeType && o . overrideMimeType && o . overrideMimeType ( e . mimeType ) , e . crossDomain || n [ "X-Requested-With" ] || ( n [ "X-Requested-With" ] = "XMLHttpRequest" ) ; for ( r in n ) void 0 !== n [ r ] && o . setRequestHeader ( r , n [ r ] + "" ) ; o . send ( e . hasContent && e . data || null ) , t = function ( n , r ) { var s , l , c ; if ( t && ( r || 4 === o . readyState ) ) if ( delete Jn [ a ] , t = void 0 , o . onreadystatechange = ot . noop , r ) 4 !== o . readyState && o . abort ( ) ; else { c = { } , s = o . status , "string" == typeof o . responseText && ( c . text = o . responseText ) ; try { l = o . statusText } catch ( u ) { l = "" } s || ! e . isLocal || e . crossDomain ? 1223 === s && ( s = 204 ) : s = c . text ? 200 : 404 } c && i ( s , l , c , o . getAllRespons
var a = null ; PR . registerLangHandler ( PR . createSimpleLexer ( [ [ "str" , /^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/ , a , '"' ] , [ "com" , /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/ , a , "#" ] , [ "pln" , /^\s+/ , a , " \r\n " ] ] , [ [ "str" , /^@"(?:[^"]|"")*(?:"|$)/ , a ] , [ "str" , /^<#[^#>]*(?:#>|$)/ , a ] , [ "str" , /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/ , a ] , [ "com" , /^\/\/[^\n\r]*/ , a ] , [ "com" , /^\/\*[\S\s]*?(?:\*\/|$)/ , a ] , [ "kwd" , /^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/ , a ] , [ "typ" , /^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/ , a ] , [ "lit" , /^@[$_a-z][\w$@]*/i , a ] , [ "typ" , /^@[A-Z]+[a-z][\w$@]*/ , a ] , [ "pln" , /^'?[$_a-z][\w$@]*/i , a ] , [ "lit" , /^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i , a , "0123456789" ] , [ "pun" , /^.[^\s\w"-$'./@`]*/ , a ] ] ) , [ "n" , "nemerle" ] ) ; var a = null ; PR . registerLangHandler ( PR . createSimpleLexer ( [ [ "str" , /^'(?:[^\n\r'\\]|\\.)*(?:'|$)/ , a , "'" ] , [ "pln" , /^\s+/ , a , " \r\n " ] ] , [ [ "com" , /^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/ , a ] , [ "kwd" , /^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i , a ] , [ "lit" , /^(?:true|false|self|nil)/i , a ] , [ "pln" , /^[a-z][^\W_]*/i , a ] , [ "lit" , /^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i , a , "0123456789" ] , [ "pun" , /^.[^\s\w$'./@]*/ , a ] ] ) , [ "pascal" ] ) , PR . registerLangHandler ( PR . sourceDecorator ( { keywords : "bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true" , types : /^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/ , cStyleComments : ! 0 } ) , [ "proto" ] ) , PR . registerLangHandler ( PR . createSimpleLexer ( [ [ "pln" , /^[\t\n\r \xa0]+/ , null , " \n\r " ] , [ "str" , /^"(?:[^"\\]|\\[\S\s])*(?:"|$)/ , null , '"' ] , [ "str" , /^'(?:[^'\\]|\\[\S\s])*(?:'|$)/ , null , "'" ] ] , [ [ "com" , /^#.*/ ] , [ "kwd" , /^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/ ] , [ "lit" , /^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/ ] , [ "lit" , /^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/ ] , [ "lit" , /^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/ ] , [ "pun" , /^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/ ] , [ "pln" , /^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/ ] , [ "str" , /^`.+`/ ] ] ) , [ "r" , "s" , "R" , "S" , "Splus" ] ) , PR . registerLangHandler ( PR . createSimpleLexer ( [ [ "pln" , /^[\t\n\r \xa0]+/ , null , " \n\r " ] , [ "com" , /^%[^\n\r]*/ , null , "%" ] ] , [ [ "lit" , /^\\(?:cr|l?dots|R|tab)\b/ ] , [ "kwd" , /^\\[@-Za-z]+/ ] , [ "kwd" , /^#(?:ifn?def|endif)/ ] , [ "pln" , /^\\[{}]/ ] , [ "pun" , /^[()[\]{}]+/ ] ] ) , [ "Rd" , "rd" ] ) , PR . registerLangHandler ( PR . createSimpleLexer ( [ [ "pln" , /^[\t\n\r \xa0]+/ , null , " \n\r " ] , [ "str" , /^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/ , null , '"' ] , [ "lit" , /^`(?:[^\n\r\\`]|\\.)*`?/ , null , "`" ] , [ "pun" , /^[!#%&(--:-@[-^{-~]+/ , null , "!#%&()*+,-:;<=>?@[\\]^{|}~" ] ] , [ [ "str" , /^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/ ] , [ "lit" , /^'[$A-Z_a-z][\w$]*(?![\w$'])/ ] , [ "kwd" , /^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/ ] , [ "lit" , /^(?:true|false|null|this)\b/ ] , [ "lit" , / ^ ( ? : 0 ( ? : [ 0 - 7 ] + | x [ \ d a - f ] + ) l ? | ( ? : 0 | [ 1 - 9 ] \ d * ) ( ? : ( ? : \ . \ d + ) ? ( ? : e [ + - ] ? \ d + ) ? f ? | l ? ) | \ \ . \ d + ( ? : e [ + - ] ? \ d + ) ? f