-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaneui.min.js
3 lines (3 loc) · 63.5 KB
/
planeui.min.js
1
2
3
/*! PlaneUI v0.1.0 | planeui.min.js | The Modern HTML5 Cross-Device Responsive Front-end UI Framework. | MIT License | By: Pandao | https://github.com/pandao/planeui | 2015-06-27 */
!function(e){"use strict";"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&(define.amd||define.cmd)?define(e):window.PUI=window.PlaneUI=window.$=e()}(function(){return function(e,t){var n=PUI=t;n.extend({version:"0.1.0",homePage:"https://github.com/pandao/planeui",dialogIndex:1e3,getPixelRatio:function(t){var n=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/n},mouseOrTouch:function(e,t){e=e||"click",t=t||"touchend";var n=e;try{document.createEvent("TouchEvent"),n=t}catch(i){}return n},clickOrTouch:function(e){return this.mouseOrTouch("click",e)},contextMenuOrTouch:function(){return this.mouseOrTouch("contextmenu","touchend")},jsonEncode:function(e){return JSON.stringify(e)},jsonDecode:function(e){return JSON.parse(e)},support:{touchEvent:function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}},canvas:function(){try{return document.createElement("canvas").getContext("2d"),!0}catch(e){return!1}},worker:function(){return"undefined"==typeof Worker?!1:!0},placeholder:function(){return"placeholder"in document.createElement("input")}},responsive:{xs:function(){return t(e).width()<640},sm:function(){return t(e).width()>=640&&t(e).width()<768},md:function(){return t(e).width()>=768&&t(e).width()<992},lg:function(){return t(e).width()>=992&&t(e).width()<1200},xl:function(){return t(e).width()>=1200&&t(e).width()<1400},xxl:function(){return t(e).width()>=1400}}}),e.PUI=e.PlaneUI=e.$=n,t(function(){t("*").bind("touchstart",function(e){t(this).addClass("hover")}).bind("touchcancel touchend",function(){t(this).removeClass("hover")}),t("a").click(function(){t(this).blur()})})}(window,jQuery),function(e){e(function(){e(".pui-button-sheets-more").each(function(){var t=e(this);t.bind(e.clickOrTouch(),function(){var e=t.parent(),n=e.next(),i=e.parent().attr("pui-button-sheets-show-more-height");e.parent().height(i),n.fadeIn(1e3);var o=n.find("a").eq(0);n.append('<a href="javascript:;"></a>'),e.append(o),t.remove()})})})}(PlaneUI),function(e){e(function(){e("pui-checkbox").each(function(t){var n=e(this),i=e('<input type="checkbox"/>');i.attr("name",n.attr("name")),i.val(n.attr("value")),n.hasClass("checked")&&i.attr("checked","checked"),"disabled"==n.attr("disabled")&&i.attr("disabled","disabled"),n.append(i),n.bind(e.clickOrTouch(),function(){if("disabled"!=e(this).attr("disabled")){e(this).toggleClass("checked");var t=e(this).find("input");"checked"==t.attr("checked")?t.removeAttr("checked"):t.attr("checked","checked")}})}),e("[checkbox-checked-all]").bind(e.clickOrTouch(),function(){var t=e(this).attr("checkbox-checked-all");e("[name='"+t+"']").each(function(){if("disabled"!=e(this).attr("disabled")){e(this).addClass("checked");var t=e(this).find("input");t.attr("checked","checked")}})}),e("[checkbox-cancel]").bind(e.clickOrTouch(),function(){var t=e(this).attr("checkbox-cancel");e("[name='"+t+"']").each(function(){if("disabled"!=e(this).attr("disabled")){e(this).removeClass("checked");var t=e(this).find("input");t.removeAttr("checked")}})}),e("[checkbox-inverse]").bind(e.clickOrTouch(),function(){var t=e(this).attr("checkbox-inverse");e("[name='"+t+"']").each(function(){if("disabled"!=e(this).attr("disabled")){var t=e(this).find("input");"checked"==e(this).attr("class")?(e(this).removeClass("checked"),t.removeAttr("checked")):(e(this).addClass("checked"),t.attr("checked","checked"))}})})})}(PlaneUI),function(e){function t(t){t=t||{};var n={path:"",width:"",height:""},i=e(this),o=e.extend(n,t);e.getJSON(o.path+"dist/data/material.design.colors.json",function(t){var n=[],r=[],a="";for(var s in t)for(var c in t[s]){var l=s+(500==c?"":"-"+c),d=t[s][c];d&&(r.push(l),n.push(d),a+='<a href="javascript:;" class="pui-bg-'+l+'" name="'+l+'" color="'+d+' "title="'+l+'" style="z-index:'+u--+'"></a>')}var u=r.length;i.each(function(){var t='<div class="pui-color-picker"></div>',n=e(this);n.wrap(t);var i=e(this).parent();i.append('<div class="pui-button-sheet-list" style="display:none;"></div>');var r=i.children(".pui-button-sheet-list").eq(0);n.bind("click focus touchend",function(){r.show()}),r.append(a);var s=r.find("a");""!==o.width&&s.width(o.width),""!==o.height&&s.height(o.height),s.bind(e.clickOrTouch(),function(){var t=e(this).attr("color").replace(" ",""),i=e(this).attr("name").replace(" ","");n.val(t).css({color:"white"===i?"#555":"#fff",borderColor:"white"===i?"#ddd":t,backgroundColor:t})}),i.mouseleave(function(){r.hide()})})})}e.fn.puiColorPicker=e.fn.materialDesignColorPicker=t}(PlaneUI),function(e){function t(e,n,i){return new t.creater(e,n,i)}t.creater=function(n,i,o,r){this.guid=(new Date).getTime();var a={id:"pui-dialog-"+this.guid,type:"default",url:"",title:"",header:{subTitle:"",icon:"",titleStyle:"",style:"",className:""},radius:!0,cache:!1,from:"",content:"",footer:"",toolbar:"close",buttons:{values:{yes:"确定",no:"否",cancel:"取消"},styles:{},"class":{},yes:function(){},no:function(){},cancel:function(){}},animated:!0,speed:800,fixed:!0,width:"",height:"",padding:25,style:{},addClass:"",top:"center",left:"center",autozIndex:!1,zIndex:e.dialogIndex,target:"",drag:!0,dragEvent:"all",dragTarget:"header",mask:!0,maskColor:"#000",maskStyle:{},maskOpacity:.5,maskClickClosed:!0,lockScreen:!0,timeout:!1,ajax:!1,yes:function(){},no:function(){},cancel:function(){},onload:function(){},onshow:function(){},onclose:function(){},onreset:function(){},onremove:function(){},onmin:function(){},onblank:function(){},onrefresh:function(){},onbeforeload:function(){}},s=this.settings=e.extend(!0,a,n);this.id=s.id,this.url=s.url,this.type=s.type,this.title=s.title,this.yes=i||s.yes,this.no=r||s.no,this.cancel=o||s.cancel,this.onload=s.onload,this.onshow=s.onshow,this.onclose=s.onclose,this.onreset=s.onreset,this.onremove=s.onremove,this.onmin=s.onmin,this.onmax=s.onmax,this.onblank=s.onblank,this.onrefresh=s.onrefresh,this.onbeforeload=s.onbeforeload;var c=this,l=e('<div class="pui-dialog">');this.target=l,l.hide(),this.mask({show:s.mask,fixed:s.fixed,color:s.maskColor,style:s.maskStyle,zIndex:s.zIndex-1,opacity:s.maskOpacity}),e("body").append(l),l.attr({id:s.id,type:s.type}),s.radius&&l.addClass("pui-radius");s.type;if(this.signleCloseBtn='<label class="pui-close"></label>',this.header(s.header),this.content({url:s.url,from:s.from,padding:s.padding,content:s.content,buttons:s.buttons}),this.footer(s.footer),this.width(s.width),this.height(s.height),this.fixed(s.fixed),this.zIndex(s.zIndex),this.toolbar(s.toolbar),l.css(s.style).addClass(s.addClass),this.show(),s.drag){var d=l.children(s.dragTarget);l.draggable({target:d,parent:!0,touch:"all"===s.dragEvent||"touch"===s.dragEvent?!0:!1})}return/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(l.children("section.has-iframe").css("overflow","auto"),l.children("section").bind("touchmove",function(t){e("html, body").css("overflow","hidden"),t.stopPropagation()})),e(".pui-dialog > *").bind(e.clickOrTouch(),function(){e.dialogIndex++,e(this).parent().css("zIndex",e.dialogIndex)}),l.bind("dialog.reset",function(){c.reset(c.onreset)}),e(window).resize(function(){l.trigger("dialog.reset")}),e.dialogIndex++,t.list[this.id]=this,this.timeout(s.timeout),this},t.proxy=function(e){var t=this;return function(){return e.apply(t,arguments)}},t.creater.fn=t.creater.prototype={proxy:t.proxy,status:"",parent:"",children:"",title:function(e){var t=this.settings,n=this.target;if("window"==this.type||"iframe"==this.type){var i=n.children("header"),e=(i.length>0,e||t.title||i.find("strong").text()||"");i.find("strong").html(e)}return this},lockScreen:function(t){e("body,html").css("overflow",t?"hidden":"")},mask:function(t){var n=this.settings;this.target;if(t.show){var i=t.color||"#000",o="number"==typeof t.opacity?t.opacity:.5,r=t.style||{},a=(t.fixed||!0,this.id+"-mask"),s=e("#"+a).length>0,c=e(s?"#"+a:'<div class="pui-mask pui-mask-bg" id="'+a+'"></div>');t.fixed&&c.addClass("pui-mask-fixed"),c.hide(),c.css({backgroundColor:i,zIndex:t.zIndex||e.dialogIndex-1,opacity:o}).css(r),s||e("body").append(c),c.fadeIn(),n.maskClickClosed?c.css("cursor","pointer").bind(e.clickOrTouch(),this.proxy(function(){this.close()})):c.css("cursor","default")}return this},header:function(e){var t=this.settings,n=this.target;this.type;if("window"==t.type||"iframe"==t.type){var i=n.children("header"),o=i.length>0,r=e.title||t.title||i.find("strong").text()||"",a=e.subTitle,s=e.style,c=e.className,l=e.icon,d=e.titleStyle;if(o)"boolean"!=typeof e||e?(s="undefined"==typeof s?i.attr("style")||"":s,c="undefined"==typeof c?i.attr("class")||"":c,d="undefined"==typeof d?i.children("strong").attr("style")||"":d,a="undefined"==typeof a?i.find("small")[0].outerHTML||"":a,l="undefined"==typeof l?i.find(".fa")[0].outerHTML||"":l,i.attr({style:s,"class":c}),i.find("strong").attr("style",d).html(l+r+a)):i.remove();else{s=s||"",s=""!=s?' style="'+s+'"':"",c=c||"",c=""!=c?' class="'+c+'"':"",d=d||"",d=""!=d?' style="'+d+'"':"",a=a||"",l=l||"";var u="<header"+c+s+"><strong"+d+">"+l+r+a+"</strong></header>";n.children("section").length>0?n.children("section").before(u):n.append(u)}n.trigger("dialog.reset")}return this},content:function(t){var n=this.target,i=this.type,o=this.settings,r=n.children("section"),a=t.padding,s=t.content,c=t.from||"",l=t.buttons||o.buttons;if("string"==typeof t&&(s=t),"iframe"===i&&(a=0),"iframe"!==i&&""!==c&&(s=e(c).html()),r.length>0)"iframe"!==i?(a="undefined"==typeof a?r.css("padding")||0:a,s="undefined"==typeof s?r.html()||"":s,r.css("padding",a).html(s)):r.children("iframe").attr("src",t.url||s);else{if("iframe"===i&&(a=0,s='<iframe src="'+(t.url||"")+(t.url.indexOf("?")>0?"&":"?")+"_dialog="+this.id+'" width="99.99%" height="100%" frameborder="0"></iframe>'),("prompt"===i||"prompt-app"===i)&&("prompt"===i&&(a=a+"px "+a+"px 0 "+a),s='<p class="pui-font-bold pui-text-md">'+o.title+"</p><p>"+s+'</p><input type="text" pui-dialog-prompt-input />'),"loading"===i&&""===s&&(s='<div class="pui-loading pui-loading-spinner pui-animation-rotate pui-animation-repeat pui-animation-reverse"><span class="fa fa-spinner fa-3x"></span></div><p>loading....</p>'),"image"===i)var d=s;var u=l["class"],f='<section style="padding:'+(a||0)+'px;"'+("iframe"==i?' class="has-iframe"':"")+">"+(s||"")+"</section>";if("alert"===i&&(f+='<div class="pui-btn-center"><a href="javascript:;" button="yes" class="pui-btn pui-btn-warning pui-btn-shadow pui-btn-small '+(u.yes||"")+'">'+l.values.yes+"</a></div>"),"alert-app"===i&&(f+='<div class="pui-btn-group pui-btn-group-justify"><a href="javascript:;" button="yes" class="pui-btn pui-btn-default '+(u.yes||"")+'">'+l.values.yes+"</a></div>"),"confirm"===i&&(f+='<div class="pui-btn-center"><a href="javascript:;" button="yes" class="pui-btn pui-btn-warning '+(u.yes||"")+'">'+l.values.yes+'</a><a href="javascript:;" button="cancel" class="pui-btn pui-btn-default '+(u.cancel||"")+'">'+l.values.cancel+"</a></div>"),"confirm-app"===i&&(f+='<div class="pui-btn-group pui-btn-group-justify"><a href="javascript:;" button="cancel" class="pui-btn pui-btn-default '+(u.cancel||"")+'">'+l.values.cancel+'</a><a href="javascript:;" button="yes" class="pui-btn pui-btn-default '+(u.yes||"")+'">'+l.values.yes+"</a></div>"),"prompt"===i&&(f+='<div class="pui-btn-center"><a href="javascript:;" button="yes" class="pui-btn pui-btn-warning '+(u.yes||"")+'">'+l.values.yes+'</a><a href="javascript:;" button="cancel" class="pui-btn pui-btn-default '+(u.cancel||"")+'">'+l.values.cancel+"</a></div>"),"prompt-app"===i&&(f+='<div class="pui-btn-group pui-btn-group-justify"><a href="javascript:;" button="cancel" class="pui-btn pui-btn-default '+(u.cancel||"")+'">'+l.values.cancel+'</a><a href="javascript:;" button="yes" class="pui-btn pui-btn-default '+(u.yes||"")+'">'+l.values.yes+"</a></div>"),n.append(f),"image"===i)if(n.children("section").html("图片加载中..."),"object"==typeof d);else{var h=new Image;h.className="pui-size-auto",h.onload=function(){n.children("section").html(h),n.trigger("dialog.reset")},h.src=d}}if("iframe"===i){r=n.children("section");var p=r.children("iframe");this.proxy(this.onbeforeload)(),p[0].contentWindow.onload=p[0].contentWindow.onreadystatechange=this.proxy(this.onload)}return("alert"===i||"alert-app"===i||"confirm"===i||"confirm-app"===i)&&n.find('[button="yes"]').bind(e.clickOrTouch(),this.proxy(function(){this.proxy(this.yes||new Function)(),this.close()})),("prompt"===i||"prompt-app"===i)&&n.find('[button="yes"]').bind(e.clickOrTouch(),this.proxy(function(){this.proxy(this.yes||new Function)()})),("confirm"===i||"confirm-app"===i||"prompt"===i||"prompt-app"===i)&&n.find('[button="cancel"]').bind(e.clickOrTouch(),this.proxy(function(){this.proxy(this.cancel||new Function)(),this.close()})),n.trigger("dialog.reset"),this},footer:function(e){var t=this.settings;if("window"===t.type||"iframe"===t.type){var n=this.target,i=n.children("footer");i.length>0?"boolean"!=typeof e||e?(e="undefined"==typeof e?i.html()||"":e,i.html(e)):i.remove():""!==e&&n.append("<footer>"+e+"</footer>"),n.trigger("dialog.reset")}return this},toolbar:function(t){var n=this.settings,i=this.target,o=i.children(".pui-close"),r=o.length>0;if("boolean"!=typeof t||t||r&&o.remove(),"string"==typeof t&&"close"===t&&o.length<1&&(i.append(this.signleCloseBtn),i.children(".pui-close").bind(e.clickOrTouch(),this.proxy(function(){this.close()}))),"window"===n.type||"iframe"===n.type){var a=i.children(".pui-dialog-toolbar"),s=a.length>0;if("boolean"!=typeof t||t||s&&a.remove(),"object"==typeof t){r&&o.remove();var c=t;console.log(c);var l={close:{show:!0,title:"关闭"},min:{show:!1,title:"最小化"},max:{show:!1,title:"最大化"},blank:{show:!1,title:"新窗口打开"},refresh:{show:!1,title:"刷新窗口"}};t=e.extend(l,t);var d=this,u=t.close,f=t.min,h=t.max,p=t.blank,m=t.refresh;if(s)u||a.find(".pui-dialog-close").remove(),f||a.find(".pui-dialog-min").remove(),h||a.find(".pui-dialog-max").remove(),p||a.find(".pui-dialog-blank").remove(),m||a.find(".pui-dialog-refresh").remove();else{a=e('<div class="pui-dialog-toolbar"></div>'),i.append(a);for(var g in c){var v=c[g];if("boolean"==typeof v&&v||v.show||"function"==typeof v){var y="";switch(g){case"close":y='<a href="javascript:;" class="fa fa-close pui-dialog-close" type="'+g+'" title="'+(g.title||"关闭")+'"></a>';break;case"min":y='<a href="javascript:;" class="fa fa-minus pui-dialog-min" type="'+g+'" title="'+(g.title||"最小化")+'"></a>';break;case"max":y='<a href="javascript:;" class="fa fa-plus pui-dialog-max" type="'+g+'" title="'+(g.title||"最大化")+'"></a>';break;case"blank":y='<a href="'+this.url+'" class="fa fa-external-link pui-dialog-blank" target="_blank" type="'+g+'" title="'+(g.title||"新窗口打开")+'"></a>';break;case"refresh":y='<a href="javascript:;" class="fa fa-refresh pui-dialog-refresh" type="'+g+'" title="'+(g.title||"刷新窗口")+'"></a>'}a.append(y);var b="function"==typeof v?this.proxy(v):new Function;i.find(".pui-dialog-"+g).bind(e.clickOrTouch(),function(){var t=e(this).attr("type");d[t](b)})}}}}}return i.trigger("dialog.reset"),this},width:function(t){var n=this.target;return t="number"==typeof t?t+"px":t,"undefined"==typeof this._width&&(this._width=t),"string"==typeof t&&t.indexOf("%")>0&&(t=e(window).width()*(parseFloat(t)/100)),n.width(t),n.trigger("dialog.reset"),this},height:function(t){var n=this.target;return t="number"==typeof t?t+"px":t,"undefined"==typeof this._height&&(this._height=t),"string"==typeof t&&t.indexOf("%")>0&&(t=e(window).height()*(parseFloat(t)/100)),n.height(t),n.trigger("dialog.reset"),this},resize:function(e,t){return this.width(e),this.height(t),this},reset:function(e){var t,n=this.target,i=this.type,o=n.children("section");("iframe"==i||"window"==i)&&(t=n.height()-n.children("header").outerHeight()-n.children("footer").outerHeight(),o.height(t)),this.position({top:this.settings.top,left:this.settings.left}),this.proxy(e||this.onreset)()},min:function(e){return this.status="min",this.proxy(e||this.onmin)(),this},max:function(e){return this.status="max",this.resize("100%","100%"),this.position({top:0,left:0}),this.proxy(e||this.onmax)(),this},blank:function(e){return this.proxy(e||this.onblank)(),this},refresh:function(e){if(this.status="refresh","iframe"==this.type){var t=this.target,n=t.children("section"),i=n.children("iframe");this.proxy(this.onbeforeload)(),i[0].contentWindow.onload=i[0].contentWindow.onreadystatechange=this.proxy(this.onload),i[0].contentWindow.location.reload(),this.proxy(e||this.onrefresh)()}return this},css:function(e){return this.target.css(e),this},fixed:function(e){return e="boolean"==typeof e&&e?"fixed":e,this.css("position",e),this},parentDialog:function(e){var n=(this.target,"");e=e.slice(1,e.length).split("&");for(var i=0,o=e.length;o>i;i++){var r=e[i].split("=");"_dialog"==r[0]&&(n=r[1])}return t.get(n)},position:function(t){var n=this.target,i=this.settings,o=e(window),r=t.top||"center",a=t.left||"center";switch(r){case"top":r=0;break;case"bottom":r=o.height()-n.outerHeight();break;case"center":r=(o.height()-n.outerHeight())/2;break;default:r=r}switch(a){case"left":a=0;break;case"right":a=o.width()-n.outerWidth();break;case"center":a=(o.width()-n.outerWidth())/2;break;default:a=a}return i._top=r,i._left=a,n.css({top:r+"px",left:a+"px"}),this},zIndex:function(e){return this.target.css("z-index",e),this},on:function(e,t){},show:function(t){this.status="show";var n=this.target,i=this.settings,o=e("#"+this.id+"-mask"),r=o.length>0;return this.position({top:i.top,left:i.left}),this.lockScreen(i.lockScreen),n.length>0&&(r&&o.fadeIn(),i.animated?n.css({top:"-"+e(window).height()+"px"}).stop().animate({top:i._top+"px",opacity:"show"},i.speed):(n.fadeIn(),this.proxy(t||this.onshow)())),this},hide:function(e){return this.close(e),this},close:function(t){this.status="close";var n=this,i=this.target,o=this.settings,r=e("#"+this.id+"-mask"),a=r.length>0;return o.cache?(a&&r.fadeOut(),o.animated?(t=this.proxy(t||this.onclose),i.stop().animate({top:2*e(window).height()+"px",opacity:"hide"},o.speed,e.proxy(function(){t()}))):(i.fadeOut(),this.proxy(t||this.onclose)())):(a&&r.fadeOut(function(){r.remove()}),o.animated?i.stop().animate({top:2*e(window).height()+"px",opacity:"hide"},o.speed,e.proxy(function(){n.remove(t)})):this.remove(t)),this.lockScreen(!1),this},remove:function(e){return this.status="remove",this.target.remove(),this.proxy(e||this.onremove)(),this},buttons:function(){return this},loading:function(){return this},mediaQuery:function(e){e=e||[]},timeout:function(e){if("boolean"==typeof e&&!arguments[0])return this;var t=this,n="boolean"==typeof e&&e?3e3:e[0]||3e3;n="number"==typeof e?e:n;var i="function"==typeof e?e:e[1];i=i||new Function;var o=setTimeout(function(){clearTimeout(o),t.close(i)},n);return this}},t.list=[],t.get=function(e){return this.list[e]},e.dialog=t}(PlaneUI),function(e){e.draggableIndex=1e3,e.fn.draggable=function(t){t=t||{};var n,i,o={target:null,container:null,touch:!0,x:!0,y:!0},r=e.extend(o,t),a=e("body"),s="pui-";e(this).each(function(){var t=e(this),o=r.target;o||(o=t),o.css("cursor","move").bind(e.mouseOrTouch("mousedown","touchstart"),function(a){a=a||window.event,n=a.clientX-parseInt(t.position().left),i=a.clientY-parseInt(t.position().top),r.target||(e.draggableIndex++,o.css("z-index",e.draggableIndex)),document.onmousemove=d}),r.touch&&o.touchDraggable(r);var c=function(e){e.removeClass(s+"user-unselect").off("selectstart")},l=function(e){e.addClass(s+"user-unselect").on("selectstart",function(e){return!1})},d=function(o){o=o||window.event;var s,c,d=parseInt(t.position().left),u=parseInt(t.position().top),f=r.container?r.container.width():e(window).width();if(d>=0?d+t.width()<=f?s=o.clientX-n:(s=f-t.width(),document.onmousemove=null):(s=0,document.onmousemove=null),u>=0)if(r.container){var h=r.container.height();u+t.outerHeight()<=h?c=o.clientY-i:(c=h-t.outerHeight(),document.onmousemove=null)}else c=o.clientY-i;else c=0,document.onmousemove=null;document.onselectstart=function(){return!1},l(a),l(t),r.x&&(t[0].style.left=s+"px"),r.y&&(t[0].style.top=c+"px")};document.onmouseup=function(){c(a),c(t),document.onselectstart=null,document.onmousemove=null}})}}(PlaneUI),function(e){e.fn.touchDraggable=function(t){t=t||{};var n={container:null,parent:!1,x:!0,y:!0},i=e.extend(n,t);e(this).each(function(){var t=null,n=function(n){var r=n.originalEvent,a=i.parent?e(this).parent():e(this),s=a.position();i.parent&&(e.dialogIndex++,a.css("zIndex",e.dialogIndex)),t={x:r.changedTouches[0].pageX-s.left,y:r.changedTouches[0].pageY-s.top},e(this).bind("touchmove",o)},o=function(n){n.preventDefault();var r,a,s=n.originalEvent,c=i.parent?e(this).parent():e(this),l=parseInt(c.position().left),d=parseInt(c.position().top),u=i.container?i.container.width():e(window).width();if(l>=0?l+c.width()<=u?a=s.changedTouches[0].pageX-t.x:(a=u-c.width(),e(this).unbind("touchmove",o)):(a=0,e(this).unbind("touchmove",o)),d>=0)if(i.container){var f=i.container.height();d+c.outerHeight()<=f?r=s.changedTouches[0].pageY-t.y:(r=f-c.outerHeight(),e(this).unbind("touchmove",o))}else r=s.changedTouches[0].pageY-t.y;else r=0,e(this).unbind("touchmove",o);i.x&&c.css("left",a),i.y&&c.css("top",r)};e(this).bind("touchstart",n)})}}(PlaneUI),function(e){e.fn.fileInput=function(t){e(this.selector?this.selector:".pui-file-input").each(function(){var n=e(this),i=n.find('input[type="file"]'),o=n.find(".pui-file-input-btn");i.bind("change",function(){e.proxy(t||function(){},this)()}),o.bind("click",function(){i.trigger("click")})})}}(PlaneUI),function(e){e(function(){e(".pui-font-sizer > span").bind(e.clickOrTouch(),function(){var t=e(this),n=e(this).parent().attr("target");t.each(function(){var t=e(this).attr("size");"default"==t?e(n).removeAttr("style"):e(n).css({fontSize:t})})})})}(PUI),function(e){e.formValidatorImageFormats=["jpg","jpeg","png","gif","webp"],e.formValidatorRules={username:/^[a-zA-Z]\w{4,15}$/,password:/^[a-zA-Z][a-zA-Z0-9\.\-\_]{5,15}$/,enName:/^[a-zA-Z]{2,}$/,uppercase:/^[A-Z]+$/,lowercase:/^[a-z]+$/,chinese:/^[\u4e00-\u9fa5]+$/,email:/^[0-9a-z][_.0-9a-z-]{0,31}@([0-9a-z][0-9a-z-]{0,30}[0-9a-z]\.){1,3}[a-z]{2,4}$/,tel:/^\d{3}-\d{8}|\d{4}-\d{7,8}$/,telExt:/^\d{3}-\d{8}|\d{4}-\d{7,8}-?\d+?$/,mobile:/^1(30|31|32|33|34|35|36|37|38|39|45|47|50|51|52|53|55|56|57|58|59|76|77|78|80|81|82|83|84|85|86|87|88|89)\d{8}$/,mobileI18n:/^(\+86)1(30|31|32|33|34|35|36|37|38|39|45|47|50|51|52|53|55|56|57|58|59|76|77|78|80|81|82|83|84|85|86|87|88|89)\d{8}$/,zipcode:/^[1-9]\d{5}$/,qq:/^[1-9]\\d{4,10}$/,domain:/^([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-]+)\.(com|net|cn|jp|tw|hk|edu|biz|gov|org|info|asia|mobi|co|cc|tt|me|tv|name|de)\.?(cn|hk|tw|jp)?$/,url:/^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/,ipv4:/^((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))$/,idcard:/^\d{17}([0-9]|X)$/,idcard1518:/(^\d{15}$)|(^\d{17}([0-9]|X)$)/,integer:/^\d+$/,number:function(e){return!isNaN(e)},image:function(t){return e.inArray(t,e.formValidatorImageFormats)>=0}},e.formValidatorRules.fax=e.formValidatorRules.telExt,e.formValidatorRules.confirmPassword=e.formValidatorRules.password,e.formValidatorIcons={error:'<i class="fa fa-close"></i>',success:'<i class="fa fa-check-circle"></i>'},e.formValidatorRuleMessages={username:{normal:"* 用户名必须以英文字母开头的英文字母、数字或下划线的5-16位组合。",empty:e.formValidatorIcons.error+" 错误:用户名不能为空。",error:e.formValidatorIcons.error+" 错误:用户名必须以英文字母开头的英文字母、数字或下划线的5-16位组合。"},password:{normal:"* 密码由5-16位以英文字母开头的英文字母、数字、小数点、横线或下划线的组成。",empty:e.formValidatorIcons.error+" 错误:密码不能为空。",error:e.formValidatorIcons.error+" 错误:密码由5-16位以英文字母开头的英文字母、数字、小数点、横线或下划线的组成。"},confirmPassword:{normal:"* 再次填写刚刚输入的密码,以便确认密码。",empty:e.formValidatorIcons.error+" 错误:确认密码不能为空。",error:e.formValidatorIcons.error+" 错误:两次输入的密码不一致或密码不正确。"},enName:{normal:"* 请填写英文名字。",empty:e.formValidatorIcons.error+" 错误:英文名字不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的英文名字。"},uppercase:{normal:"* 请填写大写的英文字母。",error:e.formValidatorIcons.error+" 错误:请填写大写的英文字母。"},lowercase:{normal:"* 请填写小写的英文字母。",error:e.formValidatorIcons.error+" 错误:请填写小写的英文字母。"},chinese:{normal:"* 请填写中文字符。",error:e.formValidatorIcons.error+" 错误:只能填写中文字符。"},email:{normal:"* 请填写邮箱地址。",empty:e.formValidatorIcons.error+" 错误:邮箱地址不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的邮箱地址。"},tel:{normal:"* 格式:区号-固定电话号码。",empty:e.formValidatorIcons.error+" 错误:固定电话号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的固定电话号码。"},telExt:{normal:"* 格式:区号-固定电话号码、区号-固定电话号码-分机号。",empty:e.formValidatorIcons.error+" 错误:固定电话号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的固定电话号码。"},fax:{normal:"* 格式:区号-固定电话号码、区号-固定电话号码-分机号。",empty:e.formValidatorIcons.error+" 错误:传真号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的传真号码。"},moblie:{empty:e.formValidatorIcons.error+" 错误:手机号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的手机号码。"},moblieI18n:{normal:"* 格式:+86手机号码",empty:e.formValidatorIcons.error+" 错误:手机号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的手机号码,格式:+86手机号码。"},zipcode:{empty:e.formValidatorIcons.error+" 错误:邮政编码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的邮政编码。"},qq:{empty:e.formValidatorIcons.error+" 错误:QQ号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的QQ号码(5-10位数字)。"},domain:{normal:"* 格式:www.xxx.com | xxx.xxx.com 。",empty:e.formValidatorIcons.error+" 错误:域名不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的域名。"},url:{normal:"* (http|https|ftp)://www.xxx.com/xxx/xxx.html?xxx",empty:e.formValidatorIcons.error+" 错误:URL(网址)不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的URL(网址)。"},ipv4:{normal:"* IPv4地址:0~255.0~255.0~255.0~255",empty:e.formValidatorIcons.error+" 错误:IP地址不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的IP地址。"},idcard:{normal:"* 填写18位的身份证号码",empty:e.formValidatorIcons.error+" 错误:身份证号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的身份证号码。"},idcard1518:{normal:"* 填写15或18位的身份证号码",empty:e.formValidatorIcons.error+" 错误:身份证号码不能为空。",error:e.formValidatorIcons.error+" 错误:请填写正确的身份证号码(15或18位)。"},integer:{normal:"* 只能填写正整数(0及以上)。",error:e.formValidatorIcons.error+" 错误:请填写正确的正整数(0及以上)。"},number:{normal:"* 只能填写数字值。",error:e.formValidatorIcons.error+" 错误:请填写正确的数字值。"},image:{normal:"* 只能上传 "+e.formValidatorImageFormats.join(", ")+" 格式的图片文件。",error:e.formValidatorIcons.error+" 错误:只能上传 "+e.formValidatorImageFormats.join(", ")+" 格式的图片文件。"}};var t=function(e){return"undefined"==typeof e};e.fn.formValidator=function(n,i,o){i=i||!1;var r=e(this),a=r.parent("form"),s=function(i){var o=i.attr("name"),r=i.val(),s=n[o],c=s.empty||!1,l=(a.find('[name="'+o+'"]'),a.find('[fv-role="'+o+'"]')),d=(l.find('[type="normal"]'),l.find('[type="empty"]')),u=l.find('[type="success"]'),f=l.find('[type="error"]'),h=a.find('[name="'+s.equalTo+'"]'),p=0,m=!1;t(s.checked)||(p=a.find('[name="'+o+'"]:checked').length);var g={min:!t(s.min)&&parseFloat(r)<s.min,max:!t(s.max)&&parseFloat(r)>s.max,minLength:!t(s.minLength)&&r.length<s.minLength,maxLength:!t(s.maxLength)&&r.length>s.maxLength,checkedEmpty:!t(s.checked)&&0==p,checked:!t(s.checked)&&"number"==typeof s.checked&&p<s.checked,checkedMin:!t(s.checked)&&"object"==typeof s.checked&&p<s.checked[0],checkedMax:!t(s.checked)&&"object"==typeof s.checked&&p>s.checked[1],equalTo:!t(s.equalTo)&&r!==h.val()},v=function(){i.removeClass("fv-error").addClass("fv-success"),l.find("span").hide(),u.show(),m=!0},y=function(){i.removeClass("fv-success").addClass("fv-error"),l.find("span").hide(),f.fadeIn(),m=!1};if(!c)if(""==r||g.checkedEmpty)i.removeClass("fv-success").addClass("fv-error"),l.find("span").hide(),d.show();else if(g.min||g.max||g.minLength||g.maxLength||g.equalTo||g.checked||g.checkedMin||g.checkedMax)y();else if(t(s.ajax))if(t(s.rule))t(s.min)&&t(s.max)||i.val(parseFloat(r)||0),v();else{var b=s.rule,x=r.split("."),E="function"==typeof b?b:e.formValidatorRules[b];x=x[x.length-1],"function"==typeof E?E("image"==b?x:r)?v():y():"object"==typeof E&&(E.test(r)?v():y()),console.log(typeof E,E)}else e.ajax({type:"get",async:!1,dataType:(s.jsonp?"jsonp":"json")||"json",url:s.ajax+"&"+o+"="+r,success:function(e){1==e.status?v():y()}});return m};for(var c in n){var l,d={normal:"* 必填项",empty:e.formValidatorIcons.error+" 错误:不能为空。",error:e.formValidatorIcons.error+" 错误:请正确填写。",success:e.formValidatorIcons.success+" 正确"},u=a.find('[name="'+c+'"]'),f=a.find('[fv-role="'+c+'"]'),h=n[c],p=u.attr("type"),m=e.formValidatorRuleMessages;t(h.message)&&m[h.rule]&&(h.message="rule"),t(h.message)||t(h.rule)||"rule"!=h.message?(l=e.extend(d,o),l=e.extend(l,h.message)):l=e.extend(d,m[h.rule]||{});for(var g in l){if("boolean"==typeof h&&"error"==g)break;f.append('<span type="'+g+'">'+l[g]+"</span>")}u.bind("file"==p||"SELECT"==u[0].tagName?"change":"blur",function(t){s(e(this))})}return r.bind(e.clickOrTouch()||"click",function(){var t=0;for(var o in n){var r=a.find('[name="'+o+'"]');s(r)||t++}return console.log("errors =>",t),t>0?!1:"object"==typeof i?(e.ajax(e.extend({type:"post",data:a.serializeArray()},i)),!1):void a.submit()}),this}}(PlaneUI),function(e){e.fn.hoverScroller=function(t){t=t||{};var n={target:"img",scrollType:"marginTop",speed:600},i=e.extend(n,t);e(this).each(function(){function t(){var t=0,n=parseInt(a.height());e(this).css("cursor","pointer"),o=setInterval(function(){t+=Math.floor(n/200),a.css({marginTop:"-"+t+"px"});var e=parseInt(a.css("marginTop"));-e>=n-r.height()&&(a.css({marginTop:"-"+(n-r.height())+"px)"}),clearInterval(o))},i.speed/10)}function n(){e(this).css("cursor",""),clearInterval(o),a.animate({marginTop:0},i.speed)}var o,r=e(this),a=e(this).find(i.target);r.css("overflow","hidden").hover(t,n)})}}(PlaneUI),function(e){e.inScreenAbove=function(t,n){var i=e(window).scrollTop(),o=e(t);if(o.length<1)throw new TypeError("$.inScreenAbove(): element don't exist.");return i>=o.offset().top+o.height()-(n||0)},e.inScreenBelow=function(t,n){var i=e(window),o=e(t);if(o.length<1)throw new TypeError("$.inScreenBelow(): element don't exist.");return i.height()+i.scrollTop()<=o.offset().top-(n||0)},e.inScreenLeft=function(t,n){var i=e(window).scrollLeft(),o=e(t);if(o.length<1)throw new TypeError("$.inScreenLeft(): element don't exist.");return i>=o.offset().left+o.width()-(n||0)},e.inScreenRight=function(t,n){var i=e(window),o=e(t);if(o.length<1)throw new TypeError("$.inScreenRight(): element don't exist.");return i.width()+i.scrollLeft()<=o.offset().left-(n||0)},e.inViewport=function(t,n){if(e(t).length<1)throw new TypeError("$.inViewport(): element don't exist.");return!(e.inScreenLeft(t,n)||e.inScreenRight(t,n)||e.inScreenAbove(t,n)||e.inScreenBelow(t,n))},e.extend(e.expr[":"],{"in-screen-below":function(t){return e.inScreenBelow(t)},"in-screen-above":function(t){return e.inScreenAbove(t)},"in-screen-left":function(t){return e.inScreenLeft(t)},"in-screen-right":function(t){return e.inScreenRight(t)},"in-viewport":function(t){return e.inViewport(t)}})}(PlaneUI),function(e){e(function(){var t=".pui-sub-menu";e(".pui-menu-accordion.click-toggle > li > a").bind(e.clickOrTouch(),function(){e(this).parent().toggleClass("submenu-open").children(t).slideToggle()}),e(".pui-menu-accordion.click > li > a").bind(e.clickOrTouch(),function(){var n=e(this).parent();n.hasClass("submenu-open")||(n.parent().find("li").removeClass("submenu-open").find(t).slideUp(),n.toggleClass("submenu-open").children(t).slideDown())})})}(PUI),function(e){e.menuDropdown=function(t){var n={bind:"click",target:"menu-dropdown-target",direction:"default",hasArrow:!1,contextMenuTarget:"show-context-menu",callback:new Function},i=e.extend(n,t);e("["+i.contextMenuTarget+"]").bind(e.contextMenuOrTouch(),function(t){t=t||window.event;var n=e(this),o=n.attr(i.contextMenuTarget),r=e(o),a=t.pageX,s=t.pageY;return"touchend"==t.type&&(a=n.offset().left,s=n.offset().top+n.outerHeight()),r.show().css({top:s,left:a}),e(document).bind(e.clickOrTouch(),function(){r.hide()}),r.mouseleave(function(){r.hide()}),!1}),e("["+i.target+"]").bind(e.clickOrTouch(),function(){
var t=e(this),n=t.attr(i.target),o=e(n),r=t.attr("menu-dropdown-direction");switch(("undefined"==typeof r||""==r)&&(r=i.direction),t.find(".pui-btn").addClass("active"),o.show(),r){case"left-top":o.css({top:t.offset().top,left:t.offset().left-o.outerWidth()-4});break;case"left-bottom":o.css({top:t.offset().top-o.outerHeight()+t.outerHeight(),left:t.offset().left-o.outerWidth()-4});break;case"right-top":o.css({top:t.offset().top,left:t.offset().left+t.outerWidth()+4});break;case"right-bottom":o.css({top:t.offset().top-o.outerHeight()+t.outerHeight(),left:t.offset().left+t.outerWidth()+4});break;case"top-left":o.css({top:t.offset().top-2-(i.hasArrow?8:0)-o.outerHeight(),left:t.offset().left});break;case"top-right":o.css({top:t.offset().top-2-(i.hasArrow?8:0)-o.outerHeight(),left:t.offset().left+t.outerWidth()-o.outerWidth()});break;case"bottom-right":o.css({top:t.offset().top+t.outerHeight()+2+(i.hasArrow?8:0),left:t.offset().left+t.outerWidth()-o.outerWidth()});break;case"bottom-left":default:o.css({top:t.offset().top+t.outerHeight()+2+(i.hasArrow?8:0),left:t.offset().left})}return e(document).bind(e.clickOrTouch(),function(){o.hide(),t.find(".pui-btn").removeClass("active")}),!1})},e(function(){e(".pui-menu > li").bind("touchend",function(){e(this).children(".pui-menu-dropdown").show().mouseleave(function(){e(this).hide()})}),e.menuDropdown()})}(PlaneUI),function(e){e(function(){e(".pui-notice").each(function(){var t=e(this).attr("notice-timeout"),n=e(this).find(".pui-close");if("undefined"!=typeof t){t=parseInt(t);var i=setTimeout(function(){n.trigger(e.clickOrTouch()),clearTimeout(i)},t)}n.bind(e.clickOrTouch(),function(){e(this).parent().css({minHeight:0}).slideUp(500,function(){e(this).remove()})})})})}(PlaneUI),function(e){e.fn.extend({ringProgress:function(t){t=t||{};var n={redraw:!1,sector:!1,ringColor:"#30C4E9",ringWidth:6,bgColor:"#fff",textColor:"#666",textFontSize:"16px",textFontFamily:"Arial",textAlign:"center",textBaseline:"middle",zero:!1},i=e.extend(n,t);return this.settings=i,this.test=function(){alert("test")},this.each(function(t){var n=e(this),o=this,r=n.text(),a=parseInt(r),s=o.getContext("2d"),c=o.width,l=o.height;window.devicePixelRatio>1&&i.redraw&&(c/=2,l/=2);var d=c/2;i.zero&&(a=1,r="0%");var u=n.attr("sector"),f=n.attr("ring-color"),h=n.attr("ring-width"),p=n.attr("bg-color"),m=n.attr("text-color"),g=n.attr("text-font-size"),v=n.attr("text-font-family"),y=n.attr("text-align"),b=n.attr("text-baseline");("undefined"==typeof u||""==u)&&(this.sector=u=i.sector),("undefined"==typeof f||""==f)&&(this.ringColor=f=i.ringColor),("undefined"==typeof h||""==h)&&(this.ringWidth=h=i.ringWidth),("undefined"==typeof p||""==p)&&(this.bgColor=p=i.bgColor),("undefined"==typeof m||""==m)&&(this.textColor=m=i.textColor),("undefined"==typeof g||""==g)&&(this.textFontSize=g=i.textFontSize),("undefined"==typeof v||""==v)&&(this.textFontFamily=v=i.textFontFamily),("undefined"==typeof y||""==y)&&(this.textAlign=y=i.textAlign),("undefined"==typeof b||""==b)&&(this.textBaseline=b=i.textBaseline),a>=100?a=99.9999:1>a&&(a=1),function(e,t){if(!i.redraw){var n=window.devicePixelRatio||1,o=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,r=n/o;r>1&&(e.style.height=e.height+"px",e.style.width=e.width+"px",e.width*=r,e.height*=r,t.scale(r,r))}}(o,s),s.clearRect(0,0,c,l),s.beginPath(),s.moveTo(c/2,l/2),s.arc(c/2,l/2,d,0,2*Math.PI,!1),s.closePath(),s.fillStyle=p,s.fill(),s.beginPath(),s.moveTo(c/2,l/2);var x=2*Math.PI*(a/100)-.5*Math.PI;s.arc(c/2,l/2,d,1.5*Math.PI,x,!1),s.closePath(),s.fillStyle=f,s.fill(),"false"!==u&&u||(s.beginPath(),s.moveTo(c/2,l/2),s.arc(c/2,l/2,d-h,0,2*Math.PI,!0),s.closePath(),s.fillStyle="#fff",s.fill()),s.font=g+" "+v,s.fillStyle=m,s.textAlign=y,s.textBaseline=b,s.moveTo(c/2,l/2),s.fillText(r,c/2,l/2)}),this},ringProgressAnimation:function(t,n){var i={start:0,end:100,speed:1e3},o={redraw:!0},r=e.extend(i,t),a=e.extend(o,n),s=this,c=setInterval(function(){r.start++,e(s).html(r.start+"%").ringProgress(a),r.start>=r.end&&clearInterval(c)},r.speed);return this}})}(PlaneUI),function(e){e(function(){e("pui-radio").each(function(t){var n=e(this),i=e('<input type="radio" />');i.attr("name",n.attr("name")),i.val(n.attr("value")),n.hasClass("checked")&&i.attr("checked","checked"),"disabled"==n.attr("disabled")&&i.attr("disabled","disabled"),n.append(i),n.bind(e.clickOrTouch(),function(){if("disabled"!=e(this).attr("disabled")){var t=e(this).find("input");if("checked"!=t.attr("checked")){var n=e(this).attr("name");e('input[name="'+n+'"]').removeAttr("checked"),e(this).addClass("checked").siblings().removeClass("checked"),t[0].checked=!0}}})})})}(PlaneUI),function(e){e.fn.rating=function(t){var n={score:0,total:5,titles:"非常差,很差,好,很好,非常好",showTotal:!0,showScore:!0,ajaxURL:"",clickHandler:null,clickCallback:new Function},i=e.extend(n,t);e(this).each(function(){var t=e(this),n=function(){return"undefined"==typeof t.attr("score")?i.score:t.attr("score")},o=Math.floor(n()),r=Math.ceil(n()),a=t.attr("total"),s=t.attr("titles"),c=t.attr("show-total"),l=t.attr("show-score"),d=t.attr("ajax-url"),u=t.attr("click-callback");a="undefined"==typeof a?i.total:parseInt(a),s="undefined"==typeof s?i.titles.split(","):s.split(","),"undefined"==typeof c&&(c=i.showTotal),"undefined"==typeof l&&(l=i.showScore),"undefined"==typeof d&&(d=i.ajaxURL),u="undefined"==typeof u||""==u?i.clickCallback:window[u],console.log(a,s,c,l,u);for(var f=1,h=a+1;h>f;f++){var p="";o>=f?p=' class="full"':f>n()&&f==r?p=' class="half"':(f>r||0==n())&&(p="");var m=e('<span title="'+s[f-1]+'" value="'+f+'"'+p+"></span>");t.append(m)}(c||"true"==c)&&t.append("<small>总分:"+a+"分 </small>"),(l||"true"==l)&&t.append("<small>平均分:"+n()+"分</small>"),t.find("span").bind({mouseenter:function(n){var i=e(this).index();t.find("span").each(function(t){e(this).removeClass(),i>=t&&e(this).addClass("full")})},mouseleave:function(i){e(this).index();t.find("span").each(function(t){t+=1,e(this).removeClass(),t<=Math.floor(n())?e(this).addClass("full"):t>n()&&t==Math.ceil(n())&&e(this).addClass("half")})},click:function(){if("function"==typeof i.clickHandler)return void i.clickHandler(t);if(""==d)return void console.error("错误:URL不能为空,Rating评价组件默认通过Ajax执行点击操作。");var o=e(this).index();e.post(d,{score:n(),newscore:o+1,total:a},function(n){t.attr("score",n).find("small").remove(),(c||"true"==c)&&t.append("<small>总分:"+a+"分 </small>"),(l||"true"==l)&&t.append("<small>平均分:"+n+"分</small>"),t.find("span").each(function(t){t+=1,e(this).removeClass(),t<=Math.floor(n)?e(this).addClass("full"):t>n&&t==Math.ceil(n)&&e(this).addClass("half")}),u(t)})}})})}}(PlaneUI),function(e){e.fn.scrollTo=function(t){t=t||{};var n={speed:800,direction:"top",top:null,left:null,targetHash:!0,hashEmpty:!0,callback:function(){},scrollTarget:"html, body"},i=e.extend(n,"object"==typeof t?t:{});"function"==typeof t&&(i.callback=t),e(this.selector?this.selector:"[scrollto]").bind(e.clickOrTouch(),function(){var t=function(t,n){var o={};0===i.top&&(i.top="0px"),0===i.left&&(i.left="0px"),i.top||i.left||(o="left"===i.direction?{scrollLeft:n.offset().left}:{scrollTop:n.offset().top}),i.top&&(o.scrollTop=i.top),i.left&&(o.scrollLeft=i.left),e(i.scrollTarget).animate(o,i.speed,function(){i.hashEmpty&&window.addEventListener&&(location.hash=""),e.proxy(i.callback,t)(n)})};if(i.targetHash){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var n=this.hash,o=e(n);e(this);o=o.length&&o||e("[name="+n.slice(1)+"]"),o.length>0&&t(e(this),o)}}else t(e(this),i.scrollTarget);return!1})}}(PlaneUI),function(e){e(function(){e(document).keyup(function(t){13==t.keyCode&&e(".pui-search-submit").trigger("click")}),e(".pui-search-single-button").hover(function(){var t=e(this),n=t.attr("hover-width"),i=t.find(".pui-search-keywords");return t.width(n),i.removeClass("pui-search-keywords-slide-reverse").addClass("pui-search-keywords-slide"),!1},function(){var t=e(this),n=t.attr("width"),i=t.find(".pui-search-keywords");return t.width(n),i.removeClass("pui-search-keywords-slide-reverse").addClass("pui-search-keywords-slide-reverse"),!1})})}(PlaneUI),function(e){e.fn.sidePosition=function(t){var n={zIndexTop:!1,attr:"pui-side-position",showMode:"slide",speed:300,mask:!1,maskFullOpacity:!1},i=e.extend(n,t),o=""===e(this).selector?"["+i.attr+"]":this;e(o).each(function(){var t=e(this),n=t.attr(i.attr),o=e("."+i.attr+"-"+n);i.zIndexTop&&o.addClass("pui-side-position-zindex-top");var r=function(){if(i.mask){var t=e(".pui-side-position-mask");i.maskFullOpacity&&t.css({opacity:0}),t.fadeToggle(i.speed),t.is(":hidden")||t.bind(e.clickOrTouch(),function(){switch(t.fadeOut(i.speed),n){case"top":o.animate({top:"-"+o.outerHeight()+e(".pui-app-header").outerHeight()+"px",opacity:"hide"},i.speed);case"bottom":o.animate({bottom:"-"+o.outerHeight()+"px",opacity:"hide"},i.speed);break;case"right":case"left":}return!1})}("left"===n||"right"===n)&&o.height(e("body").outerHeight()),"fade"===i.showMode?o.fadeToggle(i.speed):"slide"===i.showMode?("left"===n&&(o.is(":hidden")?o.css({left:"-"+o.outerWidth()+"px"}).animate({left:0,opacity:"show"},i.speed):o.animate({left:"-"+o.outerWidth()+"px",opacity:"hide"},i.speed)),"right"===n&&(o.is(":hidden")?o.css({right:"-"+o.outerWidth()+"px"}).animate({right:0,opacity:"show"},i.speed):o.animate({right:"-"+o.outerWidth()+"px",opacity:"hide"},i.speed)),"top"===n&&(o.is(":hidden")?o.css({top:"-"+o.outerHeight()+e(".pui-app-header").outerHeight()+"px"}).animate({top:e(".pui-app-header").outerHeight(),opacity:"show"},i.speed):o.animate({top:"-"+o.outerHeight()+e(".pui-app-header").outerHeight()+"px",opacity:"hide"},i.speed)),"bottom"===n&&(o.is(":hidden")?o.css({bottom:"-"+o.outerHeight()+"px"}).animate({bottom:0,opacity:"show"},i.speed):o.animate({bottom:"-"+o.outerHeight()+"px",opacity:"hide"},i.speed))):o.toggle()};t.bind(e.clickOrTouch(),r),o.bind("click",r)})}}(PlaneUI),function(e){e.fn.sideSlide=function(t){var n={attr:"pui-side-slide",speed:300,mask:!1,maskFullOpacity:!1},i=e.extend(n,t);e("["+i.attr+"]").each(function(){var t=e(this),n=t.attr(i.attr),o=e("."+i.attr+"-"+n),r=e(".pui-app-main"),a=e(".pui-app-layout");t.bind(e.clickOrTouch(),function(){if("top"==n||"bottom"==n?a.css("overflow-y","hidden"):a.css("overflow-x","hidden"),i.mask){var t=r.find(".pui-mask-bg");i.maskFullOpacity&&t.css({opacity:0}),t.fadeToggle(i.speed),t.is(":hidden")||t.bind(e.clickOrTouch(),function(){switch(t.fadeOut(i.speed),o.hide(),n){case"top":case"bottom":r.animate({marginTop:0},i.speed,function(){a.css("overflow","auto")});break;case"right":case"left":default:r.animate({marginLeft:0},i.speed,function(){a.css("overflow","auto")})}return!1})}switch(n){case"top":o.toggle(),o.is(":hidden")?r.animate({marginTop:0},i.speed,function(){a.css("overflow","auto")}):r.animate({marginTop:o.outerHeight()+"px"},i.speed);break;case"bottom":o.is(":hidden")?r.animate({marginTop:"-"+o.outerHeight()+"px"},i.speed,function(){o.show()}):(o.hide(),r.animate({marginTop:0},i.speed,function(){a.css("overflow","auto")}));break;case"right":o.is(":hidden")?r.animate({marginLeft:"-"+o.outerWidth()+"px"},i.speed,function(){o.show()}):(o.hide(),r.animate({marginLeft:0},i.speed,function(){a.css("overflow","auto")}));break;case"left":default:o.toggle(),o.is(":hidden")?r.animate({marginLeft:0},i.speed,function(){a.css("overflow","auto")}):r.animate({marginLeft:o.outerWidth()+"px"},i.speed)}return!1})})}}(PlaneUI),function(e){e(function(){e("pui-switch").each(function(){var t=e(this),n=t.attr("value").split(",");try{var i=t.attr("text").split(",")}catch(o){return alert("致命错误:请设置switch组件的text属性。"),!1}var r,a=t.attr("switched"),s=t.attr("name"),c="",l=t.html();t.html(""),"undefined"==typeof a&&(a=n[0]);for(var d=0,u=n.length;u>d;d++){var f=a==n[d]?' class="switched"':"";a==n[d]&&(r=n[d]),c+='<span value="'+n[d]+'"'+f+">"+i[d]+"</span>"}t.append("<switches>"+c+"</switches>"),t.append('<input type="hidden" name="'+s+'" value="'+r+'" />'),""!=l&&t.append(l);var h=t.find("switches > span"),p=t.find("input");"disabled"!=t.attr("disabled")&&h.bind(e.clickOrTouch(),function(){e(this).addClass("switched").siblings().removeClass("switched"),p.val(e(this).attr("value"))})})})}(PlaneUI),function(e){e(function(){e("pui-switch-slide").each(function(){var t=e(this),n=t.attr("width"),i=t.attr("name"),o=t.attr("color"),r=t.attr("on-color"),a=t.attr("off-color"),s=e(this).find("span"),c=t.attr("animated"),l="off"==s.attr("class")?0:1,d=e('<input type="hidden" name="'+i+'" value="'+l+'" />');t.append(d),"undefined"!=typeof n&&t.width(n),"undefined"!=typeof o&&t.css({backgroundColor:o,color:o});var u=s.attr("class");"off"!=u&&"undefined"!=typeof r&&t.css({backgroundColor:r,color:r}),"off"==u&&"undefined"!=typeof a&&t.css({backgroundColor:a,color:a}),t.bind(e.clickOrTouch(),function(){if("disabled"!=t.attr("disabled")){"undefined"!=typeof c&&"true"==c&&t.addClass("pui-switch-slide-animation"),s.toggleClass("off"),"off"==s.attr("class")&&"undefined"!=typeof a?t.css({backgroundColor:a,color:a}):t.css({backgroundColor:r,color:r}),e(this).find("input").val("off"==s.attr("class")?"0":"1");var n=s.attr("change");return s.attr("change",s.html()),s.html(n),!1}})})})}(PlaneUI),function(e){e.fn.tab=function(t){var n={speed:0,ajax:!1,ajaxLoading:"loading...",cached:!1,showMode:"show",callback:new Function},i=e.extend(n,t);e(this).each(function(){var t=e(this),n=t.find(".pui-tab-head li"),o=t.find(".pui-tab-box");n.bind(e.clickOrTouch(),function(){var r=e(this);if(!r.hasClass("disabled")){var a=r.index(),s=i.speed,c=i.showMode,l=r.attr("tab-ajax-url"),d=r.attr("tab-ajax-cached");if(("undefined"==typeof d||""==d)&&(d=i.cached),r.addClass("active").siblings().removeClass("active"),o.removeClass("show"),"fade"==c)o.eq(a).fadeIn(s).siblings().fadeOut(s);else if("slide"==c)o.eq(a).slideDown(s).siblings().slideUp(s);else if("scroll-x"==c){var u=o.parent(),f=o.parent(),h=o.eq(a),p=0;o.each(function(){p+=e(this).outerWidth()}),u.outerHeight(h.outerHeight()),f.outerWidth(p+50).animate({marginLeft:"-"+a*h.outerWidth()+"px"},s)}else if("scroll-y"==c){var u=o.parent(),f=o.parent(),h=o.eq(a),m=0;o.each(function(){m+=e(this).outerHeight()}),u.outerHeight(h.outerHeight()),f.outerHeight(m+50).animate({marginTop:"-"+a*h.outerHeight()+"px"},s)}else o.eq(a).show(s).siblings().hide(s);if(console.log("undefined"!=typeof l,i.ajax,!i.cached,r.data("cached")),"undefined"!=typeof l&&i.ajax&&"undefined"==typeof r.data("cached")){o.eq(a).html(i.ajaxLoading);var l=n.eq(a).attr("tab-ajax-url");e.get(l,{},function(e){d&&r.data("cached",!0),o.eq(a).html(e),i.callback(t,n,o,a,i)})}i.ajax||i.callback(t,n,o,a,i)}})}),e("[tab-onready-ajax*=true]").each(function(){var t=e(this),n=t.index(),o=t.parent().parent().find(".pui-tab-box"),r=t.attr("tab-ajax-cached");("undefined"==typeof r||""==r)&&(r=i.cached),o.eq(n).html(i.ajaxLoading);var a=t.attr("tab-ajax-url");"undefined"!=typeof a&&"undefined"==typeof t.data("cached")&&e.get(a,{},function(e){r&&t.data("cached",!0),o.eq(n).html(e),i.callback(t,t.parent(),o,n,i)})})}}(PlaneUI),function($){$.fn.tooltip=function(options){var defaults={target:"",auto:!1,position:["bottom","center"],positionClassPrefix:"pui-tooltip-arrow-",addClass:"pui-tooltip-bordered pui-tooltip-primary-light",cached:!1,ajax:new Function,showMode:"show",touch:!0,content:new Function,callback:new Function},settings=$.extend(defaults,options),$this=$(this);$this.each(function(){var body=$("body"),_this=$(this),parseJSON=function(){var json={},string=_this.attr("pui-tooltip");try{json=$.jsonDecode(string)}catch(e){json=eval("("+string+")")}return json},jsonData=function(e){return parseJSON()[e]},setJSONData=function(e,t){var n=parseJSON();n[e]=t,_this.attr("pui-tooltip",$.jsonEncode(n))},target=function(){return"undefined"==typeof jsonData("target")?settings.target:jsonData("target")},content=jsonData("content"),position=jsonData("position"),addClass=jsonData("addClass"),cached=jsonData("cached"),callback=jsonData("callback"),showMode=jsonData("showMode"),touch=jsonData("touch");"undefined"==typeof content&&(content=settings.content),"undefined"==typeof position&&(position=settings.position),"undefined"==typeof addClass&&(addClass=settings.addClass),"undefined"==typeof cached&&(cached=settings.cached),"undefined"==typeof callback&&(callback=settings.callback),"undefined"==typeof showMode&&(showMode=settings.showMode),"undefined"==typeof touch&&(touch=settings.touch);var tooltip,arrowHeight=12,setTooltipStyle=function(e){var t="",n=position[0],i=position[1],o=_left=0,r=_this[0].offsetWidth,a=_this[0].offsetHeight,s=_this.offset().top,c=_this.offset().left,l=e[0].offsetWidth,d=e[0].offsetHeight,u=(document.all?document.getElementsByTagName("html")[0].offsetWidth:window.innerWidth,document.all?document.getElementsByTagName("html")[0].offsetHeight:window.innerHeight,function(e){var t={};switch(e){case"tc":t={top:s+a+arrowHeight,left:c+(r-l)/2,posX:"bottom",posY:"center"};break;case"tl":t={top:s+a+arrowHeight,left:c,posX:"bottom",posY:"left"};break;case"tr":t={top:s+a+arrowHeight,left:c+r-l,posX:"bottom",posY:"right"};break;case"bc":t={top:s-d-arrowHeight,left:c+(r-l)/2,posX:"top",posY:"center"};break;case"bl":t={top:s-d-arrowHeight,left:c,posX:"top",posY:"left"};break;case"br":t={top:s-d-arrowHeight,left:c+r-l,posX:"top",posY:"right"};break;case"lc":t={top:s+(a-d)/2,left:c+(r+arrowHeight),posX:"right",posY:"center"};break;case"lt":t={top:s,left:c+(r+arrowHeight),posX:"right",posY:"top"};break;case"lb":t={top:s+a-d,left:c+(r+arrowHeight),posX:"right",posY:"bottom"};break;case"rc":t={top:s+(a-d)/2,left:c-(l+arrowHeight),posX:"left",posY:"center"};break;case"rt":t={top:s,left:c-(l+arrowHeight),posX:"left",posY:"top"};break;case"rb":t={top:s+a-d,left:c-(l+arrowHeight),posX:"left",posY:"bottom"}}return t});"top"==n&&"center"==i&&(t="bc"),"top"==n&&"left"==i&&(t="bl"),"top"==n&&"right"==i&&(t="br"),"bottom"==n&&"center"==i&&(t="tc"),"bottom"==n&&"left"==i&&(t="tl"),"bottom"==n&&"right"==i&&(t="tr"),"left"==n&&"center"==i&&(t="rc"),"left"==n&&"top"==i&&(t="rt"),"left"==n&&"bottom"==i&&(t="rb"),"right"==n&&"center"==i&&(t="lc"),"right"==n&&"top"==i&&(t="lt"),"right"==n&&"bottom"==i&&(t="lb"),o=u(t).top,_left=u(t).left;var f=settings.positionClassPrefix+t;if("center"==i){var h=document.getElementsByTagName("head")[0],p=document.createElement("style");p.id=e.attr("id")+"-style";var m="";m+="#"+e.attr("id")+"."+f+":before, ",m+="#"+e.attr("id")+"."+f+":after","top"==n&&"center"==i&&(m+="{left:"+(l/2-7)+"px;}"),"bottom"==n&&"center"==i&&(m+="{left:"+(l/2-7)+"px;}"),"left"==n&&"center"==i&&(m+="{top:"+(d/2-7)+"px;}"),"right"==n&&"center"==i&&(m+="{top:"+(d/2-7)+"px;}"),p.innerText=m,h.appendChild(p)}e.addClass(f).css({position:"absolute",top:o,left:_left})},showAction=function(){"undefined"==typeof target()||""==target()?(tooltip=$('<div class="pui-tooltip '+addClass+'"></div>'),tooltip.data("id","tooltip-"+(new Date).getTime()),tooltip.attr("id",tooltip.data("id")),cached&&setJSONData("target","#"+tooltip.data("id")),body.append(tooltip),"function"==typeof content?content(_this,tooltip,setTooltipStyle):(tooltip.html(content),setTooltipStyle(tooltip))):(tooltip=$(target()),tooltip.removeClass("pui-hide"),cached||tooltip.data("targetStyled")||(tooltip.data("targetStyled",!0),setTooltipStyle(tooltip))),tooltip["fade"==showMode?"fadeIn":"show"]()},hideAction=function(){tooltip["fade"==showMode?"fadeOut":"hide"](),("undefined"==typeof target()&&!cached||""==target())&&($("#"+tooltip.attr("id")+"-style").remove(),tooltip.remove()),callback(_this,tooltip)};_this.bind({mouseenter:showAction,mouseleave:hideAction}),touch&&_this.bind({touchstart:showAction,touchend:hideAction,touchcancel:hideAction})})}}(PlaneUI),window.Modernizr=function(e,t,n){function i(e){b.cssText=e}function o(e,t){return i(T.join(e+";")+(t||""))}function r(e,t){return typeof e===t}function a(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){var o=e[i];if(!a(o,"-")&&b[o]!==n)return"pfx"==t?o:!0}return!1}function c(e,t,i){for(var o in e){var a=t[e[o]];if(a!==n)return i===!1?e[o]:r(a,"function")?a.bind(i||t):a}return!1}function l(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+I.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?s(o,t):(o=(e+" "+S.join(i+" ")+i).split(" "),c(o,t,n))}function d(){p.input=function(n){for(var i=0,o=n.length;o>i;i++)P[n[i]]=!!(n[i]in x);return P.list&&(P.list=!(!t.createElement("datalist")||!e.HTMLDataListElement)),P}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),p.inputtypes=function(e){for(var i,o,r,a=0,s=e.length;s>a;a++)x.setAttribute("type",o=e[a]),i="text"!==x.type,i&&(x.value=E,x.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(o)&&x.style.WebkitAppearance!==n?(g.appendChild(x),r=t.defaultView,i=r.getComputedStyle&&"textfield"!==r.getComputedStyle(x,null).WebkitAppearance&&0!==x.offsetHeight,g.removeChild(x)):/^(search|tel)$/.test(o)||(i=/^(url|email)$/.test(o)?x.checkValidity&&x.checkValidity()===!1:x.value!=E)),C[e[a]]=!!i;return C}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u,f,h="2.8.3",p={},m=!0,g=t.documentElement,v="modernizr",y=t.createElement(v),b=y.style,x=t.createElement("input"),E=":)",w={}.toString,T=" -webkit- -moz- -o- -ms- ".split(" "),k="Webkit Moz O ms",I=k.split(" "),S=k.toLowerCase().split(" "),R={svg:"http://www.w3.org/2000/svg"},L={},C={},P={},O=[],_=O.slice,N=function(e,n,i,o){var r,a,s,c,l=t.createElement("div"),d=t.body,u=d||t.createElement("body");if(parseInt(i,10))for(;i--;)s=t.createElement("div"),s.id=o?o[i]:v+(i+1),l.appendChild(s);return r=["­",'<style id="s',v,'">',e,"</style>"].join(""),l.id=v,(d?l:u).innerHTML+=r,u.appendChild(l),d||(u.style.background="",u.style.overflow="hidden",c=g.style.overflow,g.style.overflow="hidden",g.appendChild(u)),a=n(l,e),d?l.parentNode.removeChild(l):(u.parentNode.removeChild(u),g.style.overflow=c),!!a},D=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var i;return N("@media "+t+" { #"+v+" { position: absolute; } }",function(t){i="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),i},M=function(){function e(e,o){o=o||t.createElement(i[e]||"div"),e="on"+e;var a=e in o;return a||(o.setAttribute||(o=t.createElement("div")),o.setAttribute&&o.removeAttribute&&(o.setAttribute(e,""),a=r(o[e],"function"),r(o[e],"undefined")||(o[e]=n),o.removeAttribute(e))),o=null,a}var i={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e}(),F={}.hasOwnProperty;f=r(F,"undefined")||r(F.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(e,t){return F.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=_.call(arguments,1),i=function(){if(this instanceof i){var o=function(){};o.prototype=t.prototype;var r=new o,a=t.apply(r,n.concat(_.call(arguments)));return Object(a)===a?a:r}return t.apply(e,n.concat(_.call(arguments)))};return i}),L.flexbox=function(){return l("flexWrap")},L.flexboxlegacy=function(){return l("boxDirection")},L.canvas=function(){var e=t.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},L.canvastext=function(){return!(!p.canvas||!r(t.createElement("canvas").getContext("2d").fillText,"function"))},L.webgl=function(){return!!e.WebGLRenderingContext},L.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:N(["@media (",T.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},L.geolocation=function(){return"geolocation"in navigator},L.postmessage=function(){return!!e.postMessage},L.websqldatabase=function(){return!!e.openDatabase},L.indexedDB=function(){return!!l("indexedDB",e)},L.hashchange=function(){return M("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},L.history=function(){return!(!e.history||!history.pushState)},L.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},L.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},L.rgba=function(){return i("background-color:rgba(150,255,150,.5)"),a(b.backgroundColor,"rgba")},L.hsla=function(){return i("background-color:hsla(120,40%,100%,.5)"),a(b.backgroundColor,"rgba")||a(b.backgroundColor,"hsla")},L.multiplebgs=function(){return i("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(b.background)},L.backgroundsize=function(){return l("backgroundSize")},L.borderimage=function(){return l("borderImage")},L.borderradius=function(){return l("borderRadius")},L.boxshadow=function(){return l("boxShadow")},L.textshadow=function(){return""===t.createElement("div").style.textShadow},L.opacity=function(){return o("opacity:.55"),/^0.55$/.test(b.opacity)},L.cssanimations=function(){return l("animationName")},L.csscolumns=function(){return l("columnCount")},L.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return i((e+"-webkit- ".split(" ").join(t+e)+T.join(n+e)).slice(0,-e.length)),a(b.backgroundImage,"gradient")},L.cssreflections=function(){return l("boxReflect")},L.csstransforms=function(){return!!l("transform")},L.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in g.style&&N("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight}),e},L.csstransitions=function(){return l("transition")},L.fontface=function(){var e;return N('@font-face {font-family:"font";src:url("https://")}',function(n,i){var o=t.getElementById("smodernizr"),r=o.sheet||o.styleSheet,a=r?r.cssRules&&r.cssRules[0]?r.cssRules[0].cssText:r.cssText||"":"";e=/src/i.test(a)&&0===a.indexOf(i.split(" ")[0])}),e},L.generatedcontent=function(){var e;return N(["#",v,"{font:0/0 a}#",v,':after{content:"',E,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){e=t.offsetHeight>=3}),e},L.video=function(){var e=t.createElement("video"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(i){}return n},L.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(i){}return n},L.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(e){return!1}},L.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(e){return!1}},L.webworkers=function(){return!!e.Worker},L.applicationcache=function(){return!!e.applicationCache},L.svg=function(){return!!t.createElementNS&&!!t.createElementNS(R.svg,"svg").createSVGRect},L.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==R.svg},L.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(w.call(t.createElementNS(R.svg,"animate")))},L.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(w.call(t.createElementNS(R.svg,"clipPath")))};for(var A in L)f(L,A)&&(u=A.toLowerCase(),p[u]=L[A](),O.push((p[u]?"":"no-")+u));return p.input||d(),p.addTest=function(e,t){if("object"==typeof e)for(var i in e)f(e,i)&&p.addTest(i,e[i]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof m&&m&&(g.className+=" "+(t?"":"no-")+e),p[e]=t}return p},i(""),y=x=null,function(e,t){function n(e,t){var n=e.createElement("p"),i=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=v[e[m]];return t||(t={},g++,e[m]=g,v[g]=t),t}function r(e,n,i){if(n||(n=t),d)return n.createElement(e);i||(i=o(n));var r;return r=i.cache[e]?i.cache[e].cloneNode():p.test(e)?(i.cache[e]=i.createElem(e)).cloneNode():i.createElem(e),!r.canHaveChildren||h.test(e)||r.tagUrn?r:i.frag.appendChild(r)}function a(e,n){if(e||(e=t),d)return e.createDocumentFragment();n=n||o(e);for(var r=n.frag.cloneNode(),a=0,s=i(),c=s.length;c>a;a++)r.createElement(s[a]);return r}function s(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?r(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function c(e){e||(e=t);var i=o(e);return!y.shivCSS||l||i.hasCSS||(i.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||s(e,i),e}var l,d,u="3.7.0",f=e.html5||{},h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,m="_html5shiv",g=0,v={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",l="hidden"in e,d=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){l=!0,d=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:u,shivCSS:f.shivCSS!==!1,supportsUnknownElements:d,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:r,createDocumentFragment:a};e.html5=y,c(t)}(this,t),p._version=h,p._prefixes=T,p._domPrefixes=S,p._cssomPrefixes=I,p.mq=D,p.hasEvent=M,p.testProp=function(e){return s([e])},p.testAllProps=l,p.testStyles=N,p.prefixed=function(e,t,n){return t?l(e,t,n):l(e,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(m?" js "+O.join(" "):""),p}(this,this.document),PlaneUI});