You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
228 KiB

9 years ago
9 years ago
  1. /*
  2. * # Semantic UI - 2.0.0
  3. * https://github.com/Semantic-Org/Semantic-UI
  4. * http://www.semantic-ui.com/
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. !function(e,t,n,i){e.site=e.fn.site=function(o){var a,r,s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1),m=e.isPlainObject(o)?e.extend(!0,{},e.site.settings,o):e.extend({},e.site.settings),f=m.namespace,g=m.error,p="module-"+f,v=e(n),h=v,b=this,y=h.data(p);return a={initialize:function(){a.instantiate()},instantiate:function(){a.verbose("Storing instance of site",a),y=a,h.data(p,a)},normalize:function(){a.fix.console(),a.fix.requestAnimationFrame()},fix:{console:function(){a.debug("Normalizing window.console"),(console===i||console.log===i)&&(a.verbose("Console not available, normalizing events"),a.disable.console()),("undefined"==typeof console.group||"undefined"==typeof console.groupEnd||"undefined"==typeof console.groupCollapsed)&&(a.verbose("Console group not available, normalizing events"),t.console.group=function(){},t.console.groupEnd=function(){},t.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(a.verbose("Mark timeline not available, normalizing events"),t.console.markTimeline=function(){})},consoleClear:function(){a.debug("Disabling programmatic console clearing"),t.console.clear=function(){}},requestAnimationFrame:function(){a.debug("Normalizing requestAnimationFrame"),t.requestAnimationFrame===i&&(a.debug("RequestAnimationFrame not available, normailizing event"),t.requestAnimationFrame=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(t){return e.fn[t]!==i&&e.fn[t].settings!==i},enabled:{modules:function(t){var n=[];return t=t||m.modules,e.each(t,function(e,t){a.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(t){var n=[];return t=t||m.modules,e.each(t,function(e,t){a.moduleExists(t)||n.push(t)}),n}},change:{setting:function(t,n,o,r){o="string"==typeof o?"all"===o?m.modules:[o]:o||m.modules,r=r!==i?r:!0,e.each(o,function(i,o){var s,c=a.moduleExists(o)?e.fn[o].settings.namespace||!1:!0;a.moduleExists(o)&&(a.verbose("Changing default setting",t,n,o),e.fn[o].settings[t]=n,r&&c&&(s=e(":data(module-"+c+")"),s.length>0&&(a.verbose("Modifying existing settings",s),s[o]("setting",t,n))))})},settings:function(t,n,o){n="string"==typeof n?[n]:n||m.modules,o=o!==i?o:!0,e.each(n,function(n,i){var r;a.moduleExists(i)&&(a.verbose("Changing default setting",t,i),e.extend(!0,e.fn[i].settings,t),o&&f&&(r=e(":data(module-"+f+")"),r.length>0&&(a.verbose("Modifying existing settings",r),r[i]("setting",t))))})}},enable:{console:function(){a.console(!0)},debug:function(e,t){e=e||m.modules,a.debug("Enabling debug for modules",e),a.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||m.modules,a.debug("Enabling verbose debug for modules",e),a.change.setting("verbose",!0,e,t)}},disable:{console:function(){a.console(!1)},debug:function(e,t){e=e||m.modules,a.debug("Disabling debug for modules",e),a.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||m.modules,a.debug("Disabling verbose debug for modules",e),a.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(y.cache.console===i)return void a.error(g.console);a.debug("Restoring console function"),t.console=y.cache.console}else a.debug("Disabling console function"),y.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){a.verbose("Destroying previous site for",h),h.removeData(p)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,a,t);else{if(n===i)return a[t];a[t]=n}},debug:function(){m.debug&&(m.performance?a.performance.log(arguments):(a.debug=Function.prototype.bind.call(console.info,console,m.name+":"),a.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?a.performance.log(arguments):(a.verbose=Function.prototype.bind.call(conso
  12. },display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(m.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=k;return n=n||d,a=T||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):(m.error(h.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(k===i&&m.initialize(),m.invoke(l)):(k!==i&&k.invoke("destroy"),m.initialize())}),o!==i?o:this},e.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!0,onChange:function(){},onChecked:function(){},onUnchecked:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",disabled:"disabled",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",input:'> input[type="checkbox"], > input[type="radio"]',label:"> label"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.dimmer=function(t){var o,a=e(this),r=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);return a.each(function(){var d,m,f,g=e.isPlainObject(t)?e.extend(!0,{},e.fn.dimmer.settings,t):e.extend({},e.fn.dimmer.settings),p=g.selector,v=g.namespace,h=g.className,b=g.error,y="."+v,x="module-"+v,C=a.selector||"",w="ontouchstart"in n.documentElement?"touchstart":"click",k=e(this),T=this,S=k.data(x);f={preinitialize:function(){f.is.dimmer()?(m=k.parent(),d=k):(m=k,d=f.has.dimmer()?g.dimmerName?m.find(p.dimmer).filter("."+g.dimmerName):m.find(p.dimmer):f.create())},initialize:function(){f.debug("Initializing dimmer",g),"hover"==g.on?m.on("mouseenter"+y,f.show).on("mouseleave"+y,f.hide):"click"==g.on&&m.on(w+y,f.toggle),f.is.page()&&(f.debug("Setting as a page dimmer",m),f.set.pageDimmer()),f.is.closable()&&(f.verbose("Adding dimmer close event",d),m.on(w+y,p.dimmer,f.event.click)),f.set.dimmable(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),S=f,k.data(x,S)},destroy:function(){f.verbose("Destroying previous module",d),k.removeData(x),m.off(y)},event:{click:function(t){f.verbose("Determining if event occured on dimmer",t),(0===d.find(t.target).length||e(t.target).is(p.content))&&(f.hide(),t.stopImmediatePropagation())}},addContent:function(t){var n=e(t);f.debug("Add content to dimmer",n),n.parent()[0]!==d[0]&&n.detach().appendTo(d)},create:function(){var t=e(g.template.dimmer());return g.variation&&(f.debug("Creating dimmer with variation",g.variation),t.addClass(g.variation)),g.dimmerName&&(f.debug("Creating named dimmer",g.dimmerName),t.addClass(g.dimmerName)),t.appendTo(m),t},show:function(t){t=e.isFunction(t)?t:function(){},f.debug("Showing dimmer",d,g),f.is.dimmed()&&!f.is.animating()||!f.is.enabled()?f.debug("Dimmer is already shown or disabled"):(f.animate.show(t),g.onShow.call(T),g.onChange.call(T))},hide:function(t){t=e.isFunction(t)?t:function(){},f.is.dimmed()||f.is.animating()?(f.debug("Hiding dimmer",d),f.animate.hide(t),g.onHide.call(T),g.onChange.call(T)):f.debug("Dimmer is not visible")},toggle:function(){f.verbose("Toggling dimmer visibility",d),f.is.dimmed()?f.hide():f.show()},animate:{show:function(t){t=e.isFunction(t)?t:function(){},g.useCSS&&e.fn.transition!==i&&d.transition("is supported")?("auto"!==g.opacity&&f.set.opacity(),d.transition({animation:g.transition+" in",queue:!1,duration:f.get.duration(),useFailSafe:!0,onStart:function(){f.set.dimmed()},onComplete:function(){f.set.active(),t()}})):(f.verbose("Showing dimmer animation with javascript"),f.set.dimmed(),"au
  13. },message:function(t){var n=I.children(A.message),i=x.templates.message(y.add.variables(t));n.length>0?n.html(i):n=e("<div/>").html(i).addClass(C.message).appendTo(I)},optionValue:function(t){return z.is("select")?(h&&h.disconnect(),e.each(t,function(t,n){var i=z.find('option[value="'+n+'"]'),o=i.length>0;o||(e("<option/>").prop("value",n).html(n).appendTo(z),y.verbose("Adding user addition as an <option>",n))}),void(h&&h.observe(z[0],{childList:!0,subtree:!0}))):!1},userChoice:function(t){var n,i=y.get.item(t),o=I.children(A.addition);if(!y.has.maxSelections()){if(""===t||i)return void o.remove();n=x.templates.addition(t),V.removeClass(C.selected),o.length>0?o.html(n).data(k.value,t).removeClass(C.filtered).addClass(C.selected):o=e("<div/>").html(n).data(k.value,t).addClass(C.addition).addClass(C.item).prependTo(I).addClass(C.selected)}},variables:function(e){var t,n,i=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return i&&(t=y.get.selectionCount(),e=e.replace("{count}",t)),o&&(t=y.get.selectionCount(),e=e.replace("{maxCount}",x.maxSelections)),a&&(n=y.get.query(),e=e.replace("{term}",n)),e}},remove:{active:function(){O.removeClass(C.active)},activeLabel:function(){O.find(A.label).removeClass(C.active)},visible:function(){O.removeClass(C.visible)},activeItem:function(){V.removeClass(C.active)},filteredItem:function(){y.has.maxSelections()||(x.useLabels?V.not("."+C.active).removeClass(C.filtered):V.removeClass(C.filtered))},message:function(){I.children(A.message).remove()},searchTerm:function(){y.verbose("Cleared search term"),q.val(""),y.set.filtered()},selected:function(e){var t=y.get.item(e),n=y.get.choiceValue(t);return t?(y.remove.value(n),y.is.multiple()&&(x.useLabels?y.remove.label(n):y.set.text(y.add.variables(w.count))),t.removeClass(C.filtered).removeClass(C.active),void(x.useLabels&&t.removeClass(C.selected))):!1},selectedItem:function(){V.removeClass(C.selected)},value:function(e){var t=z.val();z.is("select")?(y.verbose("Input is <select> removing selected"),z.find('option[value="'+e+'"]').prop("selected",!1)):(y.verbose("Input is csv removing value"),t=y.remove.delimitedValue(e,t),z.val(t).trigger("change")),y.check.maxSelections()},delimitedValue:function(t,n){return"string"!=typeof n?!1:(n=n.split(x.delimiter),n=e.grep(n,function(e){return t!=e}),n=n.join(x.delimiter),y.verbose("Removed value from delimited string",t,n),n)},label:function(e){var t=O.find(A.label),n=t.filter('[data-value="'+e+'"]'),i=t.length,o=t.index(n)+1==i,a=(!y.is.searchSelection()||!y.is.focusedOnSearch())&&o;a?(y.verbose("Animating and removing label",n),n.transition(x.label.transition,x.label.duration,function(){n.remove()})):(y.verbose("Removing label",n),n.remove())},labels:function(t){t=t||O.find(A.label).filter("."+C.active),y.verbose("Removing active label selections",t),t.each(function(){var t=e(this).data("value"),n=y.is.userValue(t);n?(y.remove.value(t),y.remove.label(t)):y.remove.selected(t)})},tabbable:function(){y.has.search()?(y.debug("Searchable dropdown initialized"),q.attr("tabindex","-1"),I.attr("tabindex","-1")):(y.debug("Simple selection dropdown initialized"),O.attr("tabindex","-1"),I.attr("tabindex","-1"))}},has:{search:function(){return q.length>0},input:function(){return z.length>0},menu:function(){return I.length>0},message:function(){return 0!==I.children(A.message).length},label:function(e){var t=O.find(A.label);return t.filter('[data-value="'+e+'"]').length>0},maxSelections:function(){return x.maxSelections&&y.get.selectionCount()>=x.maxSelections},allResultsFiltered:function(){return V.filter("."+C.filtered).length===V.length},value:function(t){var n=y.get.values(),i=e.isArray(n)?n&&-1!==e.inArray(t,n):n==t;return i?!0:!1}},is:{active:function(){return O.hasClass(C.active)},alreadySetup:function(){return O.is("select")&&O.parent(A.dropdown).length>0&&0===O.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):I.transition&&I.transition("is animating")},focused:function(){return n.activeElement===O[0]},focusedOnSearch:function(){return
  14. }},setting:function(t,n){if(a.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,a,t);else{if(n===i)return a[t];a[t]=n}},debug:function(){m.debug&&(m.performance?a.performance.log(arguments):(a.debug=Function.prototype.bind.call(console.info,console,m.name+":"),a.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?a.performance.log(arguments):(a.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),a.verbose.apply(console,arguments)))},error:function(){a.error=Function.prototype.bind.call(console.error,console,m.name+":"),a.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(a.performance.timer),a.performance.timer=setTimeout(a.performance.display,500)},display:function(){var t=m.name+":",n=0;s=!1,clearTimeout(a.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,r){var s,c,l,u=C;return n=n||d,r=x||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var r=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==i)return c=u[r],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(c=u[o],!1):(a.error(g.method,t),!1);u=u[o]}})),e.isFunction(c)?l=c.apply(r,n):c!==i&&(l=c),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),c}},u?(C===i&&a.initialize(),a.invoke(l)):(C!==i&&C.invoke("destroy"),a.initialize())}),o!==i?o:this},e.fn.nag.settings={name:"Nag",debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noCookieStorage:"$.cookie is not included. A storage solution is required.",noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.popup=function(o){var a,r=e(this),s=e(n),c=r.selector||"",l="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],m=arguments[0],f="string"==typeof m,g=[].slice.call(arguments,1);return r.each(function(){var n,r,p,v,h,b=e.isPlainObject(o)?e.extend(!0,{},e.fn.popup.settings,o):e.extend({},e.fn.popup.settings),y=b.selector,x=b.className,C=b.error,w=b.metadata,k=b.namespace,T="."+b.namespace,S="module-"+k,A=e(this),P=e(b.context),E=b.target?e(b.target):A,R=e(t),F=e("body"),O=0,D=!1,q=this,z=A.data(S);h={initialize:function(){h.debug("Initializing",A),h.createID(),h.bind.events(),!h.exists()&&b.preserve&&h.create(),h.instantiate()},instantiate:function(){h.verbose("Storing instance",h),z=h,A.data(S,z)},refresh:function(){b.popup?n=e(b.popup).eq(0):b.inline&&(n=E.next(y.popup).eq(0),b.popup=n),b.popup?(n.addClass(x.loading),r=h.get.offsetParent(),n.removeClass(x.loading),b.movePopup&&h.has.popup()&&h.get.offsetParent(n)[0]!==r[0]&&(h.debug("Moving popup to the same offset parent as activating element"),n.detach().appendTo(r))):r=b.inline?h.get.offsetParent(E):h.has.popup()?h.get.offsetParent(n):F,r.is("html")&&(h.debug("Setting page as offset parent"),r=F)},reposition:function(){h.refresh(),h.set.position()},destroy:function(){h.debug("Destroying previous module"),n&&!b.preserve&&h.removePopup(),clearTimeout(h.hideTimer),clearTimeout(h.showTimer),R.off(p),A.off(T).removeData(S)},event:{start:function(){var t=e.isPlainObject(b.delay)?b.delay.show:b.delay;clearTimeout(h.hid
  15. return n}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.search=function(o){var a,r=e(this),s=r.selector||"",c=(new Date).getTime(),l=[],u=arguments[0],d="string"==typeof u,m=[].slice.call(arguments,1);return e(this).each(function(){var f,g=e.isPlainObject(o)?e.extend(!0,{},e.fn.search.settings,o):e.extend({},e.fn.search.settings),p=g.className,v=g.metadata,h=g.regExp,b=g.selector,y=g.error,x=g.namespace,C="."+x,w=x+"-module",k=e(this),T=k.find(b.prompt),S=k.find(b.searchButton),A=k.find(b.results),P=(k.find(b.result),k.find(b.category),this),E=k.data(w);f={initialize:function(){f.verbose("Initializing module"),f.determine.searchFields(),f.bind.events(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),E=f,k.data(w,f)},destroy:function(){f.verbose("Destroying instance"),k.off(C).removeData(w)},bind:{events:function(){f.verbose("Binding events to search"),g.automatic&&(k.on(f.get.inputEvent()+C,b.prompt,f.throttle),T.attr("autocomplete","off")),k.on("focus"+C,b.prompt,f.event.focus).on("blur"+C,b.prompt,f.event.blur).on("keydown"+C,b.prompt,f.handleKeyboard).on("click"+C,b.searchButton,f.query).on("mousedown"+C,b.results,f.event.result.mousedown).on("mouseup"+C,b.results,f.event.result.mouseup).on("click"+C,b.result,f.event.result.click)}},determine:{searchFields:function(){o&&o.searchFields!==i&&(g.searchFields=o.searchFields)}},event:{focus:function(){f.set.focus(),f.has.minimumCharacters()&&(f.query(),f.showResults())},blur:function(){var e=n.activeElement===this;e||f.resultsClicked||(f.cancel.query(),f.remove.focus(),f.timer=setTimeout(f.hideResults,g.hideDelay))},result:{mousedown:function(){f.resultsClicked=!0},mouseup:function(){f.resultsClicked=!1},click:function(n){f.debug("Search result selected");var i=e(this),o=i.find(b.title).eq(0),a=i.find("a[href]").eq(0),r=a.attr("href")||!1,s=a.attr("target")||!1,c=(o.html(),o.length>0?o.text():!1),l=f.get.results(),u=i.data(v.result)||f.get.result(c,l);return e.isFunction(g.onSelect)&&g.onSelect.call(P,u,l)===!1?void f.debug("Custom onSelect callback cancelled default select action"):(f.hideResults(),c&&f.set.value(c),void(r&&(f.verbose("Opening search link found in result",a),"_blank"==s||n.ctrlKey?t.open(r):t.location.href=r)))}}},handleKeyboard:function(e){var t,n=k.find(b.result),i=k.find(b.category),o=n.index(n.filter("."+p.active)),a=n.length,r=e.which,s={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(r==s.escape&&(f.verbose("Escape key pressed, blurring search field"),T.trigger("blur")),f.is.visible())if(r==s.enter){if(f.verbose("Enter key pressed, selecting active result"),n.filter("."+p.active).length>0)return f.event.result.click.call(n.filter("."+p.active),e),e.preventDefault(),!1}else r==s.upArrow?(f.verbose("Up key pressed, changing active result"),t=0>o-1?o:o-1,i.removeClass(p.active),n.removeClass(p.active).eq(t).addClass(p.active).closest(i).addClass(p.active),e.preventDefault()):r==s.downArrow&&(f.verbose("Down key pressed, changing active result"),t=o+1>=a?o:o+1,i.removeClass(p.active),n.removeClass(p.active).eq(t).addClass(p.active).closest(i).addClass(p.active),e.preventDefault());else r==s.enter&&(f.verbose("Enter key pressed, executing query"),f.query(),f.set.buttonPressed(),T.one("keyup",f.remove.buttonFocus))},setup:{api:function(){var e={debug:g.debug,on:!1,action:"search",onFailure:f.error};f.verbose("First request, initializing API"),k.api(e)}},can:{useAPI:function(){return e.fn.api!==i},transition:function(){return g.transition&&e.fn.transition!==i&&k.transition("is supported")}},is:{empty:function(){return""===A.html()},visible:function(){return A.filter(":visible").length>0},focused:function(){return T.filter(":focus").length>0}},get:{inputEvent:function(){var e=T[0],t=e!==i&&e.oninput!==i?"input":e!==i&&e.onpropertychange!==i?"propertychange":"keyup";return t},value:function(){return T.val()},results:function(){var e=k.data(v.results);return e},result:function(t,n){var o=["title","id"],a=!1;return t=t!==i?t:f.get.value(),n=n!==i?n:f.get.results(),"category"===g.type?(f.debug("Find
  16. },i=function(e){e.target==a[0]&&(a.off(C+b,i),w.remove.animating(),w.remove.transition(),w.remove.bodyCSS(),("scale down"==o||k.returnScroll&&w.is.mobile())&&w.scrollBack(),t.call(N))},a.off(C+b),a.on(C+b,i),h(n)},legacyPushPage:function(t){var n=O.width(),i=w.get.direction(),o={};n=n||O.width(),t=e.isFunction(t)?t:function(){},o[i]=n,w.debug("Using javascript to push context",o),w.set.visible(),w.set.transition(),w.set.animating(),k.dimPage&&j.addClass(S.dimmed),D.css("position","relative").animate(o,k.duration,k.easing,function(){w.remove.animating(),w.bind.clickaway(),t.call(N)})},legacyPullPage:function(t){var n=0,i=w.get.direction(),o={};n=n||O.width(),t=e.isFunction(t)?t:function(){},o[i]="0px",w.debug("Using javascript to pull context",o),w.unbind.clickaway(),w.set.animating(),w.remove.visible(),k.dimPage&&!w.othersActive()&&j.removeClass(S.dimmed),D.css("position","relative").animate(o,k.duration,k.easing,function(){w.remove.animating(),t.call(N)})},scrollToTop:function(){w.verbose("Scrolling to top of page to avoid animation issues"),x=e(t).scrollTop(),O.scrollTop(0),t.scrollTo(0,0)},scrollBack:function(){w.verbose("Scrolling back to original page position"),t.scrollTo(0,x)},clear:{cache:function(){w.verbose("Clearing cached dimensions"),w.cache={}}},set:{ios:function(){l.addClass(S.ios)},pushed:function(){D.addClass(S.pushed)},pushable:function(){D.addClass(S.pushable)},dimmed:function(){j.addClass(S.dimmed)},active:function(){O.addClass(S.active)},animating:function(){O.addClass(S.animating)},transition:function(e){e=e||w.get.transition(),O.addClass(e)},direction:function(e){e=e||w.get.direction(),O.addClass(S[e])},visible:function(){O.addClass(S.visible)},overlay:function(){O.addClass(S.overlay)}},remove:{bodyCSS:function(){w.debug("Removing body css styles",r),r&&r.length>0&&r.remove()},pushed:function(){D.removeClass(S.pushed)},pushable:function(){D.removeClass(S.pushable)},active:function(){O.removeClass(S.active)},animating:function(){O.removeClass(S.animating)},transition:function(e){e=e||w.get.transition(),O.removeClass(e)},direction:function(e){e=e||w.get.direction(),O.removeClass(S[e])},visible:function(){O.removeClass(S.visible)},overlay:function(){O.removeClass(S.overlay)}},get:{direction:function(){return O.hasClass(S.top)?S.top:O.hasClass(S.right)?S.right:O.hasClass(S.bottom)?S.bottom:S.left},transition:function(){var e,t=w.get.direction();return e=w.is.mobile()?"auto"==k.mobileTransition?k.defaultTransition.mobile[t]:k.mobileTransition:"auto"==k.transition?k.defaultTransition.computer[t]:k.transition,w.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]}},is:{ie:function(){var e=!t.ActiveXObject&&"ActiveXObject"in t,n="ActiveXObject"in t;return e||n},legacy:function(){var e,o=n.createElement("div"),a={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var r in a)o.style[r]!==i&&(o.style[r]="translate3d(1px,1px,1px)",e=t.getComputedStyle(o).getPropertyValue(a[r]));return n.body.removeChild(o),!(e!==i&&e.length>0&&"none"!==e)},ios:function(){var e=navigator.userAgent,t=e.match(P.ios);return t?(w.verbose("Browser was found to be iOS",e),!0):!1},mobile:function(){var e=navigator.userAgent,t=e.match(P.mobile);return t?(w.verbose("Browser was found to be mobile",e),!0):(w.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!w.is.visible()},visible:function(){return O.hasClass(S.visible)},open:function(){return w.is.visible()},closed:function(){return w.is.hidden()},vertical:function(){return O.hasClass(S.top)},animating:function(){return D.hasClass(S.animating)},rtl:function(){return w.cache.rtl===i&&(w.cache.rtl="rtl"==O.css("direction")),w.cache.rtl}},setting:function(t,n){if(w.debug("Changing setting",t,n),e.isPlainObject(t))
  17. },conditions:function(){w.removeClass(f.animation),C.remove.direction(),C.cache={className:w.attr("class"),style:C.get.style()},C.verbose("Saving original attributes",C.cache)}},restore:{conditions:function(){return C.cache===i?!1:(C.cache.className?w.attr("class",C.cache.className):w.removeAttr("class"),C.cache.style?(C.verbose("Restoring original style attribute",C.cache.style),w.attr("style",C.cache.style)):(C.verbose("Clearing style attribute"),w.removeAttr("style")),void C.verbose("Restoring original attributes",C.cache))}},add:{failSafe:function(){var e=C.get.duration();C.timer=setTimeout(function(){w.trigger(b)},e+f.failSafeDelay),C.verbose("Adding fail safe timer",C.timer)}},remove:{animating:function(){w.removeClass(v.animating)},animation:function(){w.css({"-webkit-animation":"","-moz-animation":"","-ms-animation":"","-o-animation":"",animation:""})},animationCallbacks:function(){C.remove.queueCallback(),C.remove.completeCallback()},queueCallback:function(){w.off(".queue"+x)},completeCallback:function(){w.off(".complete"+x)},display:function(){w.css("display","")},direction:function(){w.removeClass(v.inward).removeClass(v.outward)},failSafe:function(){C.verbose("Removing fail safe timer",C.timer),C.timer&&clearTimeout(C.timer)},hidden:function(){w.removeClass(v.hidden)},visible:function(){w.removeClass(v.visible)},looping:function(){C.debug("Transitions are no longer looping"),C.is.looping()&&(C.reset(),w.removeClass(v.looping))},transition:function(){w.removeClass(v.visible).removeClass(v.hidden)}},get:{settings:function(t,n,i){return"object"==typeof t?e.extend(!0,{},e.fn.transition.settings,t):"function"==typeof i?e.extend({},e.fn.transition.settings,{animation:t,onComplete:i,duration:n}):"string"==typeof n||"number"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,duration:n}):"object"==typeof n?e.extend({},e.fn.transition.settings,n,{animation:t}):"function"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,onComplete:n}):e.extend({},e.fn.transition.settings,{animation:t})},direction:function(t){return t=t||f.animation,"string"==typeof t&&(t=t.split(" "),e.each(t,function(e,t){return t===v.inward?v.inward:t===v.outward?v.outward:void 0})),C.can.transition()?w.is(":visible")&&!C.is.hidden()?v.outward:v.inward:"static"},duration:function(e){return e=e||f.duration,e===!1&&(e=w.css("animation-duration")||0),"string"==typeof e?e.indexOf("ms")>-1?parseFloat(e):1e3*parseFloat(e):e},displayType:function(){return f.displayType?f.displayType:(w.data(h.displayType)===i&&C.can.transition(!0),w.data(h.displayType))},style:function(){var e=w.attr("style")||"";return e.replace(/display.*?;/,"")},transitionExists:function(t){return e.fn.transition.exists[t]},animationStartEvent:function(){var e,t=n.createElement("div"),o={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in o)if(t.style[e]!==i)return o[e];return!1},animationEndEvent:function(){var e,t=n.createElement("div"),o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in o)if(t.style[e]!==i)return o[e];return!1}},can:{transition:function(t){var n,o,a,r,s,c,l,u=f.animation,d=C.get.transitionExists(u);if(d===i||t){if(C.verbose("Determining whether animation exists"),n=w.attr("class"),o=w.prop("tagName"),a=e("<"+o+" />").addClass(n).insertAfter(w),r=a.addClass(u).removeClass(v.inward).removeClass(v.outward).addClass(v.animating).addClass(v.transition).css("animationName"),s=a.addClass(v.inward).css("animationName"),l=a.attr("class",n).removeAttr("style").removeClass(v.hidden).removeClass(v.visible).show().css("display"),C.verbose("Determining final display state",l),C.save.displayType(l),a.remove(),r!=s)C.debug("Direction exists for animation",u),c=!0;else{if("none"==r||!r)return void C.debug("No animation defined in css",u);C.debug("Static animation found",u,l),c=!1}C.save.transitionExists(u,c)}return d!==i?d:c},animate:function(){return C.can.transition()!==i}},is:{animating:function()
  18. },bottomVisible:function(e){var t=f.get.elementCalculations(),n=e||g.onBottomVisible,o="bottomVisible";return e&&(f.debug("Adding callback for bottom visible",e),g.onBottomVisible=e),t.bottomVisible?f.execute(n,o):g.once||f.remove.occurred(o),e===i?t.bottomVisible:void 0},topPassed:function(e){var t=f.get.elementCalculations(),n=e||g.onTopPassed,o="topPassed";return e&&(f.debug("Adding callback for top passed",e),g.onTopPassed=e),t.topPassed?f.execute(n,o):g.once||f.remove.occurred(o),e===i?t.topPassed:void 0},bottomPassed:function(e){var t=f.get.elementCalculations(),n=e||g.onBottomPassed,o="bottomPassed";return e&&(f.debug("Adding callback for bottom passed",e),g.onBottomPassed=e),t.bottomPassed?f.execute(n,o):g.once||f.remove.occurred(o),e===i?t.bottomPassed:void 0},passingReverse:function(e){var t=f.get.elementCalculations(),n=e||g.onPassingReverse,o="passingReverse";return e&&(f.debug("Adding callback for passing reverse",e),g.onPassingReverse=e),t.passing?g.once||f.remove.occurred(o):f.get.occurred("passing")&&f.execute(n,o),e!==i?!t.passing:void 0},topVisibleReverse:function(e){var t=f.get.elementCalculations(),n=e||g.onTopVisibleReverse,o="topVisibleReverse";return e&&(f.debug("Adding callback for top visible reverse",e),g.onTopVisibleReverse=e),t.topVisible?g.once||f.remove.occurred(o):f.get.occurred("topVisible")&&f.execute(n,o),e===i?!t.topVisible:void 0},bottomVisibleReverse:function(e){var t=f.get.elementCalculations(),n=e||g.onBottomVisibleReverse,o="bottomVisibleReverse";return e&&(f.debug("Adding callback for bottom visible reverse",e),g.onBottomVisibleReverse=e),t.bottomVisible?g.once||f.remove.occurred(o):f.get.occurred("bottomVisible")&&f.execute(n,o),e===i?!t.bottomVisible:void 0},topPassedReverse:function(e){var t=f.get.elementCalculations(),n=e||g.onTopPassedReverse,o="topPassedReverse";return e&&(f.debug("Adding callback for top passed reverse",e),g.onTopPassedReverse=e),t.topPassed?g.once||f.remove.occurred(o):f.get.occurred("topPassed")&&f.execute(n,o),e===i?!t.onTopPassed:void 0},bottomPassedReverse:function(e){var t=f.get.elementCalculations(),n=e||g.onBottomPassedReverse,o="bottomPassedReverse";return e&&(f.debug("Adding callback for bottom passed reverse",e),g.onBottomPassedReverse=e),t.bottomPassed?g.once||f.remove.occurred(o):f.get.occurred("bottomPassed")&&f.execute(n,o),e===i?!t.bottomPassed:void 0},execute:function(e,t){var n=f.get.elementCalculations(),i=f.get.screenCalculations();e=e||!1,e&&(g.continuous?(f.debug("Callback being called continuously",t,n),e.call(S,n,i)):f.get.occurred(t)||(f.debug("Conditions met",t,n),e.call(S,n,i))),f.save.occurred(t)},remove:{occurred:function(e){e?f.cache.occurred[e]!==i&&f.cache.occurred[e]===!0&&(f.debug("Callback can now be called again",e),f.cache.occurred[e]=!1):f.cache.occurred={}}},save:{calculations:function(){f.verbose("Saving all calculations necessary to determine positioning"),f.save.direction(),f.save.screenCalculations(),f.save.elementCalculations()},occurred:function(e){e&&(f.cache.occurred[e]===i||f.cache.occurred[e]!==!0)&&(f.verbose("Saving callback occurred",e),f.cache.occurred[e]=!0)},scroll:function(e){e=e+g.offset||w.scrollTop()+g.offset,f.cache.scroll=e},direction:function(){var e,t=f.get.scroll(),n=f.get.lastScroll();return e=t>n&&n?"down":n>t&&n?"up":"static",f.cache.direction=e,f.cache.direction},elementPosition:function(){var e=f.cache.element,t=f.get.screenSize();return f.verbose("Saving element position"),e.fits=e.height<t.height,e.offset=C.offset(),e.width=C.outerWidth(),e.height=C.outerHeight(),f.cache.element=e,e},elementCalculations:function(){var e=f.get.screenCalculations(),t=f.get.elementPosition();return g.includeMargin?(t.margin={},t.margin.top=parseInt(C.css("margin-top"),10),t.margin.bottom=parseInt(C.css("margin-bottom"),10),t.top=t.offset.top-t.margin.top,t.bottom=t.offset.top+t.height+t.margin.bottom):(t.top=t.offset.top,t.bottom=t.offset.top+t.height),t.topVisible=e.bottom>=t.top,t.topPassed=e.top>=t.top,t.bottomVisible=e.bottom>=t.bottom,t.bottomPassed=e.top>=t.bottom,t.pixelsPassed=0,t.percentagePassed=