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.

19 lines
227 KiB

9 years ago
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. m.performance.timer=setTimeout(m.performance.display,500)},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("Show
  13. o=x.onLabelCreate.call(o,t,n),y.has.label(t)?void y.debug("Label already exists, skipping",t):(x.label.variation&&o.addClass(x.label.variation),void(i===!0?(y.debug("Animating in label",o),o.addClass(C.hidden).insertBefore(a).transition(x.label.transition,x.label.duration)):(y.debug("Adding selection label",o),o.insertBefore(a))))},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
  14. !0}},animate:{show:function(t){t=e.isFunction(t)?t:function(){},b.transition&&e.fn.transition!==i&&A.transition("is supported")?(h.set.visible(),n.transition({animation:b.transition+" in",queue:!1,debug:b.debug,verbose:b.verbose,duration:b.duration,onComplete:function(){h.bind.close(),t.call(n,q),b.onVisible.call(n,q)}})):h.error(C.noTransition),b.onShow.call(n,q)},hide:function(t){t=e.isFunction(t)?t:function(){},h.debug("Hiding pop-up"),b.transition&&e.fn.transition!==i&&A.transition("is supported")?n.transition({animation:b.transition+" out",queue:!1,duration:b.duration,debug:b.debug,verbose:b.verbose,onComplete:function(){h.reset(),t.call(n,q),b.onHidden.call(n,q)}}):h.error(C.noTransition),b.onHide.call(n,q)}},get:{id:function(){return v},startEvent:function(){return"hover"==b.on?l?"touchstart mouseenter":"mouseenter":"focus"==b.on?"focus":!1},scrollEvent:function(){return l?"touchmove scroll":"scroll"},endEvent:function(){return"hover"==b.on?"mouseleave":"focus"==b.on?"blur":!1},offsetParent:function(t){var n=t!==i?t[0]:A[0],o=n.parentNode,a=e(o);if(o)for(var r="none"===a.css("transform"),s="static"===a.css("position"),c=a.is("html");o&&!c&&s&&r;)o=o.parentNode,a=e(o),r="none"===a.css("transform"),s="static"===a.css("position"),c=a.is("html");return a&&a.length>0?a:e()},offstagePosition:function(i){var o={top:e(t).scrollTop(),bottom:e(t).scrollTop()+e(t).height(),left:0,right:e(t).width()},a={width:n.width(),height:n.height(),offset:n.offset()},r={},s=[];return i=i||!1,a.offset&&i&&(h.verbose("Checking if outside viewable area",a.offset),r={top:a.offset.top<o.top,bottom:a.offset.top+a.height>o.bottom,right:a.offset.left+a.width>o.right,left:a.offset.left<o.left}),e.each(r,function(e,t){t&&s.push(e)}),s.length>0?s.join(" "):!1},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],i=t[1],o={top:"bottom",bottom:"top",left:"right",right:"left"},a={left:"center",center:"right",right:"left"},r={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==n||"bottom"==n,c=!1,l=!1,u=!1;return D||(h.verbose("All available positions available"),D=h.get.positions()),h.debug("Recording last position tried",e),D[e]=!0,"opposite"===b.prefer&&(u=[o[n],i],u=u.join(" "),c=D[u]===!0,h.debug("Trying opposite strategy",u)),"adjacent"===b.prefer&&s&&(u=[n,a[i]],u=u.join(" "),l=D[u]===!0,h.debug("Trying adjacent strategy",u)),(l||c)&&(h.debug("Using backup position",u),u=r[e]),u}},set:{position:function(o,a){if(0===E.length||0===n.length)return void h.error(C.notFound);var s,c,l,u=(e(t).width(),e(t).height(),E.outerWidth()),d=E.outerHeight(),m=n.outerWidth(),f=n.outerHeight(),g=r.outerWidth(),p=r.outerHeight(),v=b.distanceAway,y=E[0],k=b.inline?parseInt(t.getComputedStyle(y).getPropertyValue("margin-top"),10):0,T=b.inline?h.is.rtl()?parseInt(t.getComputedStyle(y).getPropertyValue("margin-right"),10):parseInt(t.getComputedStyle(y).getPropertyValue("margin-left"),10):0,S=b.inline||b.popup?E.position():E.offset();if(o=o||A.data(w.position)||b.position,a=a||A.data(w.offset)||b.offset,0===S.top&&0===S.left)return h.debug("Popup target is hidden, no action taken"),!1;switch(O==b.maxSearchDepth&&b.lastResort&&(h.debug("Using last resort position to display",b.lastResort),o=b.lastResort),b.inline&&(h.debug("Adding targets margin to calculation"),"left center"==o||"right center"==o?(a+=k,v+=-T):"top left"==o||"top center"==o||"top right"==o?(a+=T,v-=k):(a+=T,v+=k)),h.debug("Calculating popup positioning",o),s=o,h.is.rtl()&&(s=s.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),h.debug("RTL: Popup positioning updated",s)),s){case"top left":c={top:"auto",bottom:p-S.top+v,left:S.left+a,right:"auto"};break;case"top center":c={bottom:p-S.top+v,left:S.left+u/2-m/2+a,top:"auto",right:"auto"};break;case"top rig
  15. results:e.results}),f.save.results(e.results))}},throttle:function(){clearTimeout(f.timer),f.has.minimumCharacters()?f.timer=setTimeout(f.query,g.searchDelay):f.hideResults()},cancel:{query:function(){f.can.useAPI()&&k.api("abort")}},has:{minimumCharacters:function(){var e=f.get.value(),t=e.length;return t>=g.minCharacters}},clear:{cache:function(e){var t=k.data(v.cache);e?e&&t&&t[e]&&(f.debug("Removing value from cache",e),delete t[e],k.data(v.cache,t)):(f.debug("Clearing cache",e),k.removeData(v.cache))}},read:{cache:function(e){var t=k.data(v.cache);return g.cache?(f.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==i?t[e]:!1):!1}},create:{id:function(e,t){var n=97,o=t!==i?String.fromCharCode(n+t):"",a=e,r=o+a;return f.verbose("Creating unique id",r),r}},inject:{result:function(e,t,n){f.verbose("Injecting result into results");var o=t-1,a=n-1,r=n!==i?A.children().eq(a).children().eq(o):A.children().eq(o);f.verbose("Injecting results metadata",r),r.data(v.result,e)},id:function(t){f.debug("Injecting unique ids into results");var n=1,o=1;return"category"===g.type?(o=1,e.each(t,function(t,a){e.each(a.results,function(e,t){var r=a.results[e];r.id===i&&(r.id=f.create.id(o,n)),f.inject.result(r,o,n),o++}),n++})):e.each(t,function(e,n){var a=t[e];a.id===i&&(a.id=f.create.id(o)),f.inject.result(a,o),o++}),t}},save:{results:function(e){f.verbose("Saving current search results to metadata",e),k.data(v.results,e)}},write:{cache:function(e,t){var n=k.data(v.cache)!==i?k.data(v.cache):{};g.cache&&(f.verbose("Writing generated html to cache",e,t),n[e]=t,k.data(v.cache,n))}},addResults:function(t){return e.isFunction(g.onResultsAdd)&&g.onResultsAdd.call(A,t)===!1?(f.debug("onResultsAdd callback cancelled default action"),!1):(A.html(t),void f.showResults())},showResults:function(){f.is.visible()||!f.is.focused()||f.is.empty()||(f.can.transition()?(f.debug("Showing results with css animations"),A.transition({animation:g.transition+" in",debug:g.debug,verbose:g.verbose,duration:g.duration,queue:!0})):(f.debug("Showing results with javascript"),A.stop().fadeIn(g.duration,g.easing)),g.onResultsOpen.call(A))},hideResults:function(){f.is.visible()&&(f.can.transition()?(f.debug("Hiding results with css animations"),A.transition({animation:g.transition+" out",debug:g.debug,verbose:g.verbose,duration:g.duration,queue:!0})):(f.debug("Hiding results with javascript"),A.stop().fadeOut(g.duration,g.easing)),g.onResultsClose.call(A))},generateResults:function(t){f.debug("Generating html from response",t);var n=g.templates[g.type],i=e.isPlainObject(t.results)&&!e.isEmptyObject(t.results),o=e.isArray(t.results)&&t.results.length>0,a="";return i||o?(g.maxResults>0&&(i?"standard"==g.type&&f.error(y.maxResults):t.results=t.results.slice(0,g.maxResults)),e.isFunction(n)?a=n(t):f.error(y.noTemplate,!1)):a=f.displayMessage(y.noResults,"empty"),g.onResults.call(P,t),a},displayMessage:function(e,t){return t=t||"standard",f.debug("Displaying message",e,t),f.addResults(g.templates.message(e,t)),g.templates.message(e,t)},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){g.debug&&(g.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,g.name+":"),f.debug.apply(console,arguments)))},verbose:function(){g.verbose&&g.debug&&(g.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,g.name+":"),f.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;g.performance&&(t=(new Date).getTime(),i=c||t,n=t-i,c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=g.name+":",n=0;c=!1,clearTimeout(f.perfor
  16. delaySetup:!1,useLegacy:!1,duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},e.extend(e.easing,{easeInOutQuint:function(e,t,n,i,o){return(t/=o/2)<1?i/2*t*t*t*t*t+n:i/2*((t-=2)*t*t*t*t+2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.sticky=function(n){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,m,f,g=e.isPlainObject(n)?e.extend(!0,{},e.fn.sticky.settings,n):e.extend({},e.fn.sticky.settings),p=g.className,v=g.namespace,h=g.error,b="."+v,y="module-"+v,x=e(this),C=e(t),w=x.offsetParent(),k=e(g.scrollContext),T=(x.selector||"",x.data(y)),S=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},A=this;f={initialize:function(){f.determineContext(),f.verbose("Initializing sticky",g,w),f.save.positions(),f.checkErrors(),f.bind.events(),g.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),T=f,x.data(y,f)},destroy:function(){f.verbose("Destroying previous instance"),f.reset(),m&&m.disconnect(),C.off("load"+b,f.event.load).off("resize"+b,f.event.resize),k.off("scrollchange"+b,f.event.scrollchange),x.removeData(y)},observeChanges:function(){var e=a[0];"MutationObserver"in t&&(m=new MutationObserver(function(e){clearTimeout(f.timer),f.timer=setTimeout(function(){f.verbose("DOM tree modified, updating sticky menu",e),f.refresh()},100)}),m.observe(A,{childList:!0,subtree:!0}),m.observe(e,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",m))},determineContext:function(){return a=g.context?e(g.context):w,0===a.length?void f.error(h.invalidContext,g.context,x):void 0},checkErrors:function(){return f.is.hidden()&&f.error(h.visible,x),f.cache.element.height>f.cache.context.height?(f.reset(),void f.error(h.elementSize,x)):void 0},bind:{events:function(){C.on("load"+b,f.event.load).on("resize"+b,f.event.resize),k.off("scroll"+b).on("scroll"+b,f.event.scroll).on("scrollchange"+b,f.event.scrollchange)}},event:{load:function(){f.verbose("Page contents finished loading"),S(f.refresh)},resize:function(){f.verbose("Window resized"),S(f.refresh)},scroll:function(){S(function(){k.trigger("scrollchange"+b,k.scrollTop())})},scrollchange:function(e,t){f.stick(t),g.onScroll.call(A)}},refresh:function(e){f.reset(),e&&(w=x.offsetParent()),f.save.positions(),f.stick(),g.onReposition.call(A)},supports:{sticky:function(){{var t=e("<div/>");t.get()}return t.addClass(p.supported),t.css("position").match("sticky")}},save:{lastScroll:function(e){f.lastScroll=e},elementScroll:function(e){f.elementScroll=e},positions:function(){var e={height:C.height()},t={margin:{top:parseInt(x.css("margin-top"),10),bottom:parseInt(x.css("margin-bottom"),10)},offset:x.offset(),width:x.outerWidth(),height:x.outerHeight()},n={offset:a.offset(),height:a.outerHeight(),bottomPadding:parseInt(a.css("padding-bottom"),10)};f.cache={fits:t.height<e.height,
  17. },display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(C.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(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=g;return n=n||d,a=k||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):!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!==i?s:!1}},C.initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"There is no css animation matching the one you specified.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.video=function(n){{var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return a.each(function(){var m,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.video.settings,n):e.extend({},e.fn.video.settings),g=f.selector,p=f.className,v=f.error,h=f.metadata,b=f.namespace,y=f.templates,x="."+b,C="module-"+b,w=(e(t),e(this)),k=w.find(g.placeholder),T=w.find(g.playButton),S=w.find(g.embed),A=this,P=w.data(C);m={initialize:function(){m.debug("Initializing video"),m.create(),w.on("click"+x,g.placeholder,m.play).on("click"+x,g.playButton,m.play),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),P=m,w.data(C,m)},create:function(){var e=w.data(h.image),t=y.video(e);w.html(t),m.refresh(),e||m.play(),m.debug("Creating html for video element",t)},destroy:function(){m.verbose("Destroying previous instance of video"),m.reset(),w.removeData(C).off(x)},refresh:function(){m.verbose("Refreshing selector cache"),k=w.find(g.placeholder),T=w.find(g.playButton),S=w.find(g.embed)},change:function(e,t,n){m.debug("Changing video to ",e,t,n),w.data(h.source,e).data(h.id,t).data(h.url,n),f.onChange()},reset:function(){m.debug("Clearing video embed and showing placeholder"),w.removeClass(p.active),S.html(" "),k.show(),f.onReset()},play:function(){m.debug("Playing video");var e=w.data(h.source)||!1,t=w.data(h.url)||!1,n=w.data(h.id)||!1;S.html(m.generate.html(e,n,t)),w.addClass(p.active),f.onPlay()},get:{source:function(e){return"string"!=typeof e?!1:-1!==e.search("youtube.com")?"youtube":-1!==e.search("vimeo.com")?"vimeo":!1},id:function(e){return e.match(f.regExp.youtube)?e.match(f.regExp.youtube)[1]:e.match(f.regExp.vimeo)?e.match(f.regExp.vimeo)[2]:!1}},generate:{html:function(e,t,n){m.debug("Generating embed html");var i;return e=e||f.source,t=t||f.id,e&&t||n?(e&&t||(e=m.get.source(n),t=m.get.id(n)),"vimeo"==e?i='<iframe src="//player.vimeo.com/video/'+t+"?="+m.generate.url(e)+'" width="100%" height="100%" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>':"youtube"==e&&(i='<iframe src="//www.youtube.com/embed/'+t+"?="+m.generate.url(e)+'" width="100%"
  18. },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=0,t.visible=t.topVisible||t.bottomVisible,t.passing=t.topPassed&&!t.bottomPassed,t.hidden=!t.topVisible&&!t.bottomVisible,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),f.cache.element=t,f.verbose("Updated element calculations",t),t},sc