| 1 |
- !function(){const t=["bookVersionId","currentGradeNum"];function e(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},a=Object.keys(t);for(n=0;n<a.length;n++)i=a[n],e.indexOf(i)>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)i=a[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e,i,n,r,a,s){try{var o=t[a](s),l=o.value}catch(h){return void i(h)}o.done?e(l):Promise.resolve(l).then(n,r)}function s(t){return function(){var e=this,i=arguments;return new Promise((function(n,r){var s=t.apply(e,i);function o(t){a(s,n,r,o,l,"next",t)}function l(t){a(s,n,r,o,l,"throw",t)}o(void 0)}))}}System.register(["./index-legacy-4df54f25.js","./api-legacy-b1cf5786.js","./base-legacy-f60ccc23.js","./api-legacy-e42dfa11.js","./deep-clone-legacy-0f45d9f6.js","./Image-legacy-688d5376.js","./index-legacy-2d4cb240.js","./index-legacy-e08463cd.js","./fade-in-scale-up.cssr-legacy-d066cd06.js","./use-tab-status-legacy-ecab531d.js","./index-legacy-f0d92fd8.js"],(function(i,r){"use strict";var a,o,l,h,c,d,p,u,g,f,m,v,y,x,w,b,_,A,P,S,T,k,C,M,D,E,N,I,L,F,j,O,B,R,W,H,z,q,G,U=document.createElement("style");return U.textContent="._container_1xc3a_1{position:relative;width:100vw;height:100vh;overflow:hidden;background:url("+new URL("icon_bg-f94bd665.png",r.meta.url).href+') no-repeat center center / cover;display:flex;flex-direction:column}._head_1xc3a_10{position:relative;display:flex;align-items:center;justify-content:space-between;padding:.50667rem .61333rem .21333rem 1.09333rem;transition:opacity .3s ease-in-out}._head_1xc3a_10 ._back_1xc3a_18 img{display:block}._head_1xc3a_10 ._tabs_1xc3a_21 .van-tab{color:rgba(255,255,255,.9);font-size:.4rem;padding:0 .42667rem}._head_1xc3a_10 ._tabs_1xc3a_21 .van-tab.van-tab--active{color:#fff}._head_1xc3a_10 ._tabs_1xc3a_21 .van-tabs__nav.van-tabs__nav--line{background:transparent}._head_1xc3a_10 ._tabs_1xc3a_21 .van-tabs__line{background:#fff;width:.48rem;height:.10667rem}._downBtn_1xc3a_37{width:2.24rem;height:.85333rem;background:#f8f9fc;border-radius:.42667rem;border:none;padding:0;display:flex;justify-content:center;align-items:center}._downBtn_1xc3a_37._activeBtn_1xc3a_48 ._icon_1xc3a_48{color:var(--van-primary-color)!important}._downBtn_1xc3a_37._activeBtn_1xc3a_48 .van-button__text{color:var(--van-primary-color)}._downBtn_1xc3a_37 .van-button__content{width:100%}._downBtn_1xc3a_37 .van-button__text{width:100%;height:100%;display:flex;justify-content:center;align-items:center;font-size:.34667rem;color:#333;font-weight:400}._downBtn_1xc3a_37 ._icon_1xc3a_48{width:.21333rem;height:.13333rem;margin-left:.10667rem;transition:transform .2s ease}._downBtn_1xc3a_37 ._iconUp_1xc3a_73{color:var(--van-primary-color);transform:rotate(180deg);transition:transform .2s ease}._popover_1xc3a_78{width:2.21333rem;border:none}._popover_1xc3a_78 .van-popover__action{display:flex;justify-content:center;align-items:center;padding:0;width:100%;height:.96rem;color:#999;font-size:.34667rem}._popover_1xc3a_78 .van-popover__content{max-height:70vh;overflow-x:hidden;overflow-y:auto}._content_1xc3a_97{flex:1;overflow-y:hidden;overflow-x:auto;display:flex}._content_1xc3a_97 ._wrap_1xc3a_103{position:relative;display:flex;height:100%;padding:.53333rem 1.68rem 0}._content_1xc3a_97 ._wrap_1xc3a_103._emtpyWrap_1xc3a_109{width:100%}._content_1xc3a_97 .van-empty__description{font-size:.37333rem;color:#fff}._content_1xc3a_97 .van-empty__image{width:5.33333rem;height:5.33333rem}._wrapItem_1xc3a_120{position:relative;width:4.10667rem;display:flex;flex-direction:column;align-items:center;padding:0 .42667rem;flex-shrink:0;z-index:1}._wrapItem_1xc3a_120 ._item_1xc3a_130{position:relative;margin-bottom:.4rem;width:100%;height:4.53333rem;background-color:#edeff2;box-shadow:0 .13333rem .37333rem rgba(0,0,0,.4)}._wrapItem_1xc3a_120 ._item_1xc3a_130 img{position:absolute}._wrapItem_1xc3a_120 ._item_1xc3a_130:before{content:"";position:absolute;top:.10667rem;right:-.10667rem;width:.10667rem;height:calc(100% - .21333rem);background-color:#c5c5c5;z-index:1}._wrapItem_1xc3a_120 ._item_1xc3a_130:after{content:"";position:absolute;top:.05333rem;right:-.05333rem;width:.10667rem;height:calc(100% - .10667rem);background-color:#e7e7e7;z-index:2}._wrapItem_1xc3a_120 ._name_1xc3a_161{font-size:.29333rem;font-weight:400;color:#fff;line-height:.42667rem;text-align:center}._wrapItem_1xc3a_120 ._favoriteBtn_1xc3a_168{position:absolute;top:3.6rem;right:.53333rem;z-index:3}._containerImg_1xc3a_174{position:relative;display:block;width:100%;height:4.53333rem}._containerImg_1xc3a_174:before{content:"";position:absolute;top:.10667rem;right:-.10667rem;width:.10667rem;height:calc(100% - .21333rem);background-color:#c5c5c5;z-index:1}._containerImg_1xc3a_174:after{content:"";position:absolute;top:.05333rem;right:-.05333rem;width:.10667rem;height:calc(100% - .10667rem);background-color:#e7e7e7;z-index:2}._cover_1xc3a_200{position:relative;z-index:3;display:block;width:100%;height:4.53333rem;background-color:#edeff2;background-image:url('+new URL("icon_default-c2fa566e.svg",r.meta.url).href+');background-repeat:no-repeat;background-position:center center}._cover_1xc3a_200:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;background-repeat:no-repeat;background-image:linear-gradient(to right,rgba(0,0,0,.2) 0,rgba(255,255,255,.08) 0%,transparent .5%),linear-gradient(to right,rgba(0,0,0,.1) .3%,rgba(255,255,255,.09) 1.1%,transparent 1.3%);background-size:50% 100%,50% 100%;background-position:0% top,9% top}._cover_1xc3a_200 img{width:100%;height:100%;opacity:0;transition:opacity .3s ease-in-out}._cover_1xc3a_200._loaded_1xc3a_230 img{opacity:1}._book_1xc3a_233{position:fixed;top:50%;left:50%;width:50vw;transform:translate(-50%,-50%) scale(0);z-index:20;background-color:#fff;transition:all .3s ease-in-out;visibility:hidden;pointer-events:none;border-radius:.21333rem;box-shadow:0 0 .26667rem rgba(0,0,0,.2)}._book_1xc3a_233 ._bookWrap_1xc3a_247{height:60vh;overflow-y:auto}._book_1xc3a_233 ._bookWrap_1xc3a_247 ul{list-style:circle;padding:.26667rem 1.06667rem}._book_1xc3a_233._show_1xc3a_255{visibility:visible;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}._popupContainer_1xc3a_260{background:#FFFFFF;border-radius:.32rem;width:7.94667rem;padding-top:.32rem}._popupContainer_1xc3a_260 ._searchList_1xc3a_266{padding:0 0 0 .29333rem;max-height:58vh;overflow-x:hidden;overflow-y:auto}._popupContainer_1xc3a_260 ._popoverTitle_1xc3a_272{display:flex;align-items:center;font-size:.37333rem;font-weight:600;color:#333}._popupContainer_1xc3a_260 ._popoverTitle_1xc3a_272:before{content:" ";display:inline-block;width:.10667rem;height:.29333rem;background:#2AA4FE;border-radius:.05333rem;margin-right:.16rem}._popupContainer_1xc3a_260 ._popupList_1xc3a_288{display:flex;flex-flow:wrap;justify-content:flex-start;padding-top:.29333rem;padding-bottom:.37333rem}._popupContainer_1xc3a_260 ._popupList_1xc3a_288 .van-tag{padding:.18667rem .64rem;height:.8rem;font-size:.32rem;background:#F6F6F6;border:none;color:#333;margin-right:.21333rem;margin-bottom:.24rem}._popupContainer_1xc3a_260 ._popupList_1xc3a_288 .van-tag--plain{background:rgba(42,164,254,.08);border:none;color:#2aa4fe}._popupContainer_1xc3a_260 ._btnGroup_1xc3a_310{border:.02667rem solid #F2F2F2;padding:.42667rem .32rem;display:flex;align-items:center;justify-content:space-between}._popupContainer_1xc3a_260 ._btnGroup_1xc3a_310 .van-button{font-size:.4rem;color:#333;line-height:.58667rem;padding:0 1.28rem;height:.98667rem;font-weight:400}._popupContainer_1xc3a_260 ._btnGroup_1xc3a_310 ._btnSure_1xc3a_325{background:linear-gradient(135deg,#19F1E1 0%,#0094FF 100%),linear-gradient(73deg,#5BECFF 0%,#259CFE 100%);border:none;color:#fff}.favoriteWrap{width:.74667rem;height:.74667rem;background:rgba(255,255,255,.61);border:.02667rem solid #FFFFFF;border-radius:50%;cursor:pointer;display:flex;justify-content:center;align-items:center}.liked .favoritIcon{animation:blink 1s forwards}.favoritIcon{width:.45333rem;height:.4rem}@keyframes blink{10%{transform:scale(1.4)}to{transform:scale(1)}}._book_1xtvx_1{position:fixed;left:0;top:0;right:0;bottom:0;inset:0;z-index:100;padding-top:10vh}._book_1xtvx_1 ._back_1xtvx_11{position:absolute;left:1.09333rem;top:.64rem}._book_1xtvx_1._bookHide_1xtvx_16{visibility:hidden;pointer-events:none;opacity:0}._book_1xtvx_1 .bookWrap{margin:0 auto}._book_1xtvx_1 .animated{transition:margin-left .2s ease-in-out}._book_1xtvx_1 .page{background:white}._book_1xtvx_1 .shadow{box-shadow:0 0 .53333rem rgba(0,0,0,.4)}._book_1xtvx_1 .page-wrapper{perspective:53.33333rem}._wrap_1xtvx_36{position:relative;height:100%;overflow:hidden;background-color:#ffd8a1;width:calc(100% + 1Px)}._wrap_1xtvx_36:before{content:"";position:absolute;left:10Px;right:10Px;top:10Px;bottom:10Px;background-color:#fff;z-index:1}._wrap_1xtvx_36 ._wrapItem_1xtvx_53{position:relative;padding:20Px;height:100%;overflow:hidden;z-index:2}._wrap_1xtvx_36 ._item_1xtvx_60{display:flex;font-size:.37333rem;font-weight:600;color:#333;line-height:20Px;padding:13Px 0;word-break:break-all}._wrap_1xtvx_36 ._des_1xtvx_69{line-height:16Px;font-size:.32rem;font-weight:400}._wrap_1xtvx_36 ._icon_1xtvx_74{width:20Px;height:20Px;margin-right:6Px}._wrap_1xtvx_36 ._last_1xtvx_79{font-size:12Px;color:#ff5a56;margin-left:.16rem;font-weight:400}.even ._wrap_1xtvx_36{left:-1Px}.even ._wrap_1xtvx_36:before{right:0;border-radius:4Px 0 0 4Px}.even ._wrap_1xtvx_36:after{content:"";position:absolute;right:0;top:0;bottom:0;width:24Px;background:linear-gradient(to right,rgba(255,255,255,0) 20%,rgba(229,199,156,.4) 100%);z-index:3}.odd ._wrap_1xtvx_36{left:-1Px}.odd ._wrap_1xtvx_36:before{left:0;border-radius:0 4Px 4Px 0}.odd ._wrap_1xtvx_36:after{content:"";position:absolute;left:0;top:0;bottom:0;width:24Px;background:linear-gradient(to right,rgba(255,225,183,.35) 8%,rgba(255,255,255,0) 100%);z-index:2}.odd ._wrapItem_1xtvx_53{padding-left:20Px}\n',document.head.appendChild(U),{setters:[t=>{a=t.d,o=t.a,l=t.x,h=t.r,c=t.y,d=t.a7,p=t.V,u=t.A,g=t.F,f=t.C,t.ah,m=t.q,v=t.M,y=t.al,x=t.w,w=t.z,b=t.E,_=t.a5,A=t.e,P=t.h,S=t.a0,T=t.Q},t=>{k=t.a,C=t.b,M=t.c,D=t.d,E=t.e,N=t.f,I=t.g,L=t.h},t=>{F=t.q},t=>{j=t.g,O=t.s,B=t.a,R=t.b},t=>{W=t.d},t=>{H=t.N},t=>{z=t.T,q=t.a},t=>{G=t.T},null,null,null],execute:function(){const U={container:"_container_1xc3a_1",head:"_head_1xc3a_10",back:"_back_1xc3a_18",tabs:"_tabs_1xc3a_21",downBtn:"_downBtn_1xc3a_37",activeBtn:"_activeBtn_1xc3a_48",icon:"_icon_1xc3a_48",iconUp:"_iconUp_1xc3a_73",popover:"_popover_1xc3a_78",content:"_content_1xc3a_97",wrap:"_wrap_1xc3a_103",emtpyWrap:"_emtpyWrap_1xc3a_109",wrapItem:"_wrapItem_1xc3a_120",item:"_item_1xc3a_130",name:"_name_1xc3a_161",favoriteBtn:"_favoriteBtn_1xc3a_168",containerImg:"_containerImg_1xc3a_174",cover:"_cover_1xc3a_200",loaded:"_loaded_1xc3a_230",book:"_book_1xc3a_233",bookWrap:"_bookWrap_1xc3a_247",show:"_show_1xc3a_255",popupContainer:"_popupContainer_1xc3a_260",searchList:"_searchList_1xc3a_266",popoverTitle:"_popoverTitle_1xc3a_272",popupList:"_popupList_1xc3a_288",btnGroup:"_btnGroup_1xc3a_310",btnSure:"_btnSure_1xc3a_325"},V=""+new URL("icon_back-b80c2fc2.svg",r.meta.url).href,X=a({name:"the-favorite",props:{isFavorite:{type:Boolean,default:!1}},setup:t=>()=>o("div",{class:["favoriteWrap",t.isFavorite?"liked":""]},[o("img",{class:"favoritIcon",src:t.isFavorite?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAJKADAAQAAAABAAAAIAAAAADfjkU8AAAHv0lEQVRYCZVXW6hWRRReM/u/HM/xclRCUzHLEFIkyqfwIUylG5pKIFqBhSgUkj1kGYT2ENJDUQhhF4QgDBRJPGZHo9KkHoISzUsmPQl5yfvlePz33jN935qZ39+T132Yf9bMrMs331ozex8jN3h6X180Nqv1e8kb+4QxdoR3MsSXZSGFOyul32tco6s6+O41ZuVK1+rCr1+f5bt2LYTNLG+z8eL8MKwbyd1ZnxfH/JX8+0Zv8cnADWsPtdol2SQh9X75K0Pzava+qdTniStrxnmBUwGgqz2mxBvB2lFTuhWVj1Z/Rvti6dKFpmJXOicjDQ2g5wv+wL6kDzSMvTO5uXy5q7jc83L/zV8dp216rgHUeHvJQ1m1vskbP9rAK4EI+zLK6himAOOxaf4xqHi7UaMaedZgTedowzXaF0435NXeYIqgsFy4E9JzZU775i9+/h+gxhuLH8wGDNjpnRtkXIHdw6JaExkzTmT/HjgtuVExaJ5BxUYf6BkYT1hDDzbAbtgQOmWYDKktl7AhjB03Vvqesrd3+sBvvvxFffDHL13aWXaa3djwGAsw6mz0WDHzF4u09RNZ9abIqZO6KwYnC5pCgrIEBL7SHDZisJfALoGRjYgEQFQkVgiUnbcE9a87f2r8wB1dJysElHcU71mfjTG6K2gbK2beIpH2DpEtG0ROHIMlphkITiApgIAqZh3zzXWkSBWVqTAP5jFFOyiSNcji2JBOsXeZen/W4WzTs2zhqGq945A1rt2UOZRLhIPRYzNE9u0W+fswjDHW7cAEq+oMU/pghwqS47Bl9H1kXYMa5/Gw595DaYI1+ARTeS1vPFDJfH2BuKJdte4bJ2bkPSLbN4OZ9cFCdwmPdBYdq1ewGAKnKJjVnVMPirRL+uwxvppW6pA52LKedGirufOvVcDM44KyMQbeJk8TGTdBZOc2kfMNBORWoN4KhtZkCUwG2oPzZnAuN8HQFo3poR39YKxXiW40+NHTiiWsTK1A6V54wAio1n0qMrBT5MJFTMGaTmhIAAmYynFNgTIgA8WGLtjFnmu6jp8ElL4pg50AGDJFa4dXfOmGWnjjSTDnzomcPoMVesdDEKqJjrvkoyDQ666xTpUkt65TTmvJhr4AhjUUWIKAGFpbvDMy6QBDuDsJALN6AijH2zU4pGMGjrvBsj4E2wwYZa5xTtegr+ucg6AnKuiBhHBjs2eDb1wC3LuzvpEfxztKkZNGRdt0lJzHQATFRxmJfQKWwNCWTCQfaZ1YdA4/0NW7SeNhjPgat5Dz1pTmKG/NAAYsUaZzbZA1eGRHmeJanG8JdhVAWk89bYM90xSAMG2BHX2tgCWiRYZO4WLODyRmPI9gWIMCHKadJgCca7JDUBynFscYNnVa7NUvAfH80B/Z0XSFrBAgoh+y1rnP9Q3M25UKrCEijqwpG3RMJ5i+yk4CwrkIQoFTpm5s9KPA6BsyY7Dx3YjeUVbmwZDYDxFJpPeF5w8bKe/HW0Usql2LWymkc2pEQJTZFECU01jBQK9VJ26gyQg27QDENUopiwLYUMpopcFNVK2eGLxn6zBct3hyt5HXkL6B+akAWvVqUuSQGUx3SRmNTxNIlLnOR+fxowBjzUBmypSNnAVMIGGsajA11m6huQKqnxu6AiCO8UWvOWZ+1UOoKQVB6hnsmsa5OB/ZCKkKTNEFCxrfPSFFZAd+SrwznZ4sxMGflex8z/GjS5qAzLerr5iyXEXlAIoswRFBNHMMdTJHQAzEXllrSZOucYwwyTYFJhiwo0CwpqcMTljKlazywYh/fuuJHtmF5/LsufvgaYIlhagl1hTfMxjiwScJAyoQ9IlrBYEf7aGp6cEAoLV4Wbg5NkgwrBsAK7lx5MzZTGy1emTw/u7RjMAn1FCQxRbFXOhddDl2gObwNcKdKvXax8CQ9W5REFEmewoGPY829QGkCQaACEazQNahZozprbnqrBheu2sA1bs27pfSvkrwNCQQrSm+SjCpaUhB6bEFGEspAIIRPnbSsQ7MhFQ5njKmEH8OKcjq/ZZ3HOz6vRVQyEbrDORLT85Zi9p5kWg1fRCQMIxwU+jeMh0pc0DCL8XAIgMCGRrTw2LWY57SBDAlLlYPp5W22qbOfdtm9wkdy6PvLMaXps/eiAtrjkWkjPcE4Wgfq4pAmHEWsLJFNskMmIynimyUjcCKgxLLDsxIVm/7YfCB7qnXCXtjQFS+MG3mJsn9MxnQWDhTQFEmW9oYRQGRjZBWpovMlDqGjHVegh5gKvXajs6D3025HhjO0etNn54ps9ahGOfx9iYwfoaCdDSwg7pSenjXsFAJAHMKBDIKES0ww/9OAGbroAPbn75ZQJbJTZ/2HzfNN9YsQ/p6SxS3Hlse4bxAY4+ADRznPA9rkHUN6dJ/CLlna/JKve2dW4EhkFsylNBemDxzCnhfhzoZTrb4KaH3EutGixopURkAyQrm1Lu1Z+qVtnn9/+zGh/qtn9sGRFdHRj3Sb9DIIR9Lo3gO76Nq+gzVLwQFwTQRB1JopMhqta97zp1ekG7hW8O5A4ZanV2aNOPhoszXoHAn4drFQQQKANKjbywuYPuH9ZVFg/7a9mur3e3Id8RQX4cXJz41sTTuXXxKPIoaM3gn/YR/M98asq97b1/d2x3/B8k9N3E67sAEAAAAAElFTkSuQmCC":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAkCAYAAAD7PHgWAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAJAAAAAC/FoutAAADKklEQVRYCc2YW4hNYRiGx3FyaJxPMUYOOZWSUBgjE8odk3AhXChR5E5qTG5QUmhScoFxNXKIckiZUk4hlJBcGJPzIeVYzOB5prWy7TFr9p7Zs9d+69nrX+v7//97117/+tbaOy8vx9UhBX/j6VMG82AYDIFv8AKuwQmogV+QqMnsLAXHFUIBvAbHXYaTcBtarXGMvAC/U+AufUpAeRLVkMq4W/SbCWlrIyN+gkk+wkFYCCOhG/SDqVABtWA/v8Hd8DbY/8x2DxTDAMiHIiiFvfASHCeV0AlS0k56hQn30+7bwigTl0MDhAnP0R4KUfJEt4LLxXFnwGORWkPUzj9geWTPpkHXWz1UQeem4WaPTCfyDsx7qNleBCZAeDbLojpGxOYTS/lSJcwzkfYX0OTKhOP/NE8FHVxvcWgFSTX4Bppcas/ARf4V+kNcukpiTW5KNrArCOxLDmR530qhwYfJee8FgdnJgSzvu34ta5osDHNbRsLL2zU8GOP2OLk1uEoPHcHK7yPvCVhe4tb9wECRWw0ODA5Yi3JBPonUID802MMG8g7OBVkPVU8/NPjKBvItJRcU+mj0pcHngauWnp3ZMu89oRp9adDK/RN07ltK3JoUGKhLNHKaHW/tDYkHY2iPIKclz3XYuAbZNmoRnxq0YMepbSTXx5FkE1044KU2uDo5mKX9UeTxJVcP/32i+T5n0E6jIZvy/fE6mL8qKvHRoNMdtn2iOmY4VhnkrWXbK2ruAoKPwTNxPfpboj1lFTkA5vsOs6BFWW4egIMeQViXaGZUrvvwivkUK01ndl9avcya9OYpgUxqMJNdAef/BMWQtnoz4iI4iYV8M3hJ2qq5TBD+5KyjPaUtE2poO1g8NXoJWvtI9E7dAQ3gXDWQsTW+gMn828KJP8ASSEdj6XwTHF8P5ZCJq8E0f+V741kwibjAI0sCcbUOvAkc8xRmQLtqLbOHCZ/RntNMNqvBeQhP6DBty1hWNIYsN8Dkrk9/FeZDKJ/t78G42zLIulz0FeAdrhF/Ki6G6mDfY36DfpOxahrZLegaCvF1aT3kjLy8W0Bjx2A45KS6Z9rVH+dMzG9PPT/rAAAAAElFTkSuQmCC"},null)])}),K={book:"_book_1xtvx_1",back:"_back_1xtvx_11",bookHide:"_bookHide_1xtvx_16",wrap:"_wrap_1xtvx_36",wrapItem:"_wrapItem_1xtvx_53",item:"_item_1xtvx_60",des:"_des_1xtvx_69",icon:"_icon_1xtvx_74",last:"_last_1xtvx_79"},Y=a({name:"courseware-detail",emits:["close"],setup(t,{emit:e}){const i=l({box:{},show:!1,steps:[{ele:"",eleRect:{},img:j("courseware-detail1.png"),handStyle:{top:"-0.4rem",left:"0.98rem",transform:"rotate(-90deg)"},boxStyle:{borderRadius:"0.1rem"},imgStyle:{top:"-1.3rem",left:"2.2rem"},btnsStyle:{top:"1.5rem",left:"3.5rem"}}],step:0}),r=h(!1),a=h({}),m=function(){var t=s((function*(){try{const e=yield B({guideTag:"guideInfo"});var t;if(e.data)a.value=JSON.parse(null===(t=e.data)||void 0===t?void 0:t.guideValue)||null;else a.value={};a.value&&a.value.coursewareDetail?r.value=!1:r.value=!0}catch(e){console.log(e)}}));return function(){return t.apply(this,arguments)}}();m();const v=()=>{console.log(`coursewareDetail-${i.step}`);const t=document.getElementById(`coursewareDetail-${i.step}`);if(t){const e=t.getBoundingClientRect();i.box={left:e.x+"px",top:e.y+"px",width:e.width+"px",height:e.height+"px"}}else x()};c((()=>{v(),window.addEventListener("resize",y)}));const y=()=>{v()};d((()=>{window.removeEventListener("resize",y)}));const x=()=>{i.step>=2?w():(i.step=i.step+1,v())},w=function(){var t=s((function*(){a.value?a.value.coursewareDetail=!0:a.value={coursewareDetail:!0};try{yield R({guideTag:"guideInfo",guideValue:JSON.stringify(a.value)})}catch(t){console.log(t)}r.value=!1}));return function(){return t.apply(this,arguments)}}();return()=>o(p,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",O.guidePopup],show:r.value,"onUpdate:show":t=>r.value=t},{default:()=>{var t;return[o("div",{class:O.content,onClick:()=>x()},[i.step!=i.steps.length-1&&o("div",{class:O.backBtn,onClick:t=>{t.stopPropagation(),w()}},[u("跳过")]),o("div",{class:O.box,style:n(n({},i.box),null===(t=i.steps[i.step])||void 0===t?void 0:t.boxStyle),id:`modeType-${i.step}`},[i.steps.map(((t,e)=>{var n,r;return o("div",{onClick:t=>t.stopPropagation(),class:O.item,style:{display:e===i.step?"":"none",left:`${null===(n=t.eleRect)||void 0===n?void 0:n.left}px`,top:`${null===(r=t.eleRect)||void 0===r?void 0:r.top}px`}},[o("img",{class:O.img,style:t.imgStyle,src:t.img},null),o("img",{class:O.iconHead,style:t.handStyle,src:j("indexDot.png")},null),o("div",{class:O.btns,style:t.btnsStyle},[i.step+1==i.steps.length?o(g,null,[o(f,{class:[O.btn,O.endBtn],round:!0,type:"primary",onClick:()=>w()},{default:()=>[u("完成")]})]):o(f,{class:O.btn,round:!0,type:"primary",onClick:()=>x()},{default:()=>[u("下一步 ("),i.step+1,u("/"),i.steps.length,u(")")]})])])}))])])]}})}});var Q={};!function(t,e){!function(t){class e{constructor(t,e){this.state={angle:0,area:[],position:{x:0,y:0},hardAngle:0,hardDrawingAngle:0},this.createdDensity=e,this.nowDrawingDensity=this.createdDensity,this.render=t}setDensity(t){this.createdDensity=t,this.nowDrawingDensity=t}setDrawingDensity(t){this.nowDrawingDensity=t}setPosition(t){this.state.position=t}setAngle(t){this.state.angle=t}setArea(t){this.state.area=t}setHardDrawingAngle(t){this.state.hardDrawingAngle=t}setHardAngle(t){this.state.hardAngle=t,this.state.hardDrawingAngle=t}setOrientation(t){this.orientation=t}getDrawingDensity(){return this.nowDrawingDensity}getDensity(){return this.createdDensity}getHardAngle(){return this.state.hardAngle}}class i extends e{constructor(t,e,i){super(t,i),this.image=null,this.isLoad=!1,this.loadingAngle=0,this.image=new Image,this.image.src=e}draw(t){const e=this.render.getContext(),i=this.render.convertToGlobal(this.state.position),n=this.render.getRect().pageWidth,r=this.render.getRect().height;e.save(),e.translate(i.x,i.y),e.beginPath();for(let a of this.state.area)null!==a&&(a=this.render.convertToGlobal(a),e.lineTo(a.x-i.x,a.y-i.y));e.rotate(this.state.angle),e.clip(),this.isLoad?e.drawImage(this.image,0,0,n,r):this.drawLoader(e,{x:0,y:0},n,r),e.restore()}simpleDraw(t){const e=this.render.getRect(),i=this.render.getContext(),n=e.pageWidth,r=e.height,a=1===t?e.left+e.pageWidth:e.left,s=e.top;this.isLoad?i.drawImage(this.image,a,s,n,r):this.drawLoader(i,{x:a,y:s},n,r)}drawLoader(t,e,i,n){t.beginPath(),t.strokeStyle="rgb(200, 200, 200)",t.fillStyle="rgb(255, 255, 255)",t.lineWidth=1,t.rect(e.x+1,e.y+1,i-1,n-1),t.stroke(),t.fill();const r={x:e.x+i/2,y:e.y+n/2};t.beginPath(),t.lineWidth=10,t.arc(r.x,r.y,20,this.loadingAngle,3*Math.PI/2+this.loadingAngle),t.stroke(),t.closePath(),this.loadingAngle+=.07,this.loadingAngle>=2*Math.PI&&(this.loadingAngle=0)}load(){this.isLoad||(this.image.onload=()=>{this.isLoad=!0})}newTemporaryCopy(){return this}getTemporaryCopy(){return this}hideTemporaryCopy(){}}class n{constructor(t,e){this.pages=[],this.currentPageIndex=0,this.currentSpreadIndex=0,this.landscapeSpread=[],this.portraitSpread=[],this.render=e,this.app=t,this.currentPageIndex=0,this.isShowCover=this.app.getSettings().showCover}destroy(){this.pages=[]}createSpread(){this.landscapeSpread=[],this.portraitSpread=[];for(let e=0;e<this.pages.length;e++)this.portraitSpread.push([e]);let t=0;this.isShowCover&&(this.pages[0].setDensity("hard"),this.landscapeSpread.push([t]),t++);for(let e=t;e<this.pages.length;e+=2)e<this.pages.length-1?this.landscapeSpread.push([e,e+1]):(this.landscapeSpread.push([e]),this.pages[e].setDensity("hard"))}getSpread(){return"landscape"===this.render.getOrientation()?this.landscapeSpread:this.portraitSpread}getSpreadIndexByPage(t){const e=this.getSpread();for(let i=0;i<e.length;i++)if(t===e[i][0]||t===e[i][1])return i;return null}getPageCount(){return this.pages.length}getPages(){return this.pages}getPage(t){if(t>=0&&t<this.pages.length)return this.pages[t];throw new Error("Invalid page number")}nextBy(t){const e=this.pages.indexOf(t);return e<this.pages.length-1?this.pages[e+1]:null}prevBy(t){const e=this.pages.indexOf(t);return e>0?this.pages[e-1]:null}getFlippingPage(t){const e=this.currentSpreadIndex;if("portrait"===this.render.getOrientation())return 0===t?this.pages[e].newTemporaryCopy():this.pages[e-1];{const i=0===t?this.getSpread()[e+1]:this.getSpread()[e-1];return 1===i.length||0===t?this.pages[i[0]]:this.pages[i[1]]}}getBottomPage(t){const e=this.currentSpreadIndex;if("portrait"===this.render.getOrientation())return 0===t?this.pages[e+1]:this.pages[e-1];{const i=0===t?this.getSpread()[e+1]:this.getSpread()[e-1];return 1===i.length?this.pages[i[0]]:0===t?this.pages[i[1]]:this.pages[i[0]]}}showNext(){this.currentSpreadIndex<this.getSpread().length&&(this.currentSpreadIndex++,this.showSpread())}showPrev(){this.currentSpreadIndex>0&&(this.currentSpreadIndex--,this.showSpread())}getCurrentPageIndex(){return this.currentPageIndex}show(t=null){if(null===t&&(t=this.currentPageIndex),t<0||t>=this.pages.length)return;const e=this.getSpreadIndexByPage(t);null!==e&&(this.currentSpreadIndex=e,this.showSpread())}getCurrentSpreadIndex(){return this.currentSpreadIndex}setCurrentSpreadIndex(t){if(!(t>=0&&t<this.getSpread().length))throw new Error("Invalid page");this.currentSpreadIndex=t}showSpread(){const t=this.getSpread()[this.currentSpreadIndex];2===t.length?(this.render.setLeftPage(this.pages[t[0]]),this.render.setRightPage(this.pages[t[1]])):"landscape"===this.render.getOrientation()&&t[0]===this.pages.length-1?(this.render.setLeftPage(this.pages[t[0]]),this.render.setRightPage(null)):(this.render.setLeftPage(null),this.render.setRightPage(this.pages[t[0]])),this.currentPageIndex=t[0],this.app.updatePageIndex(this.currentPageIndex)}}class r extends n{constructor(t,e,i){super(t,e),this.imagesHref=i}load(){for(const t of this.imagesHref){const e=new i(this.render,t,"soft");e.load(),this.pages.push(e)}this.createSpread()}}class a{static GetDistanceBetweenTwoPoint(t,e){return null===t||null===e?1/0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}static GetSegmentLength(t){return a.GetDistanceBetweenTwoPoint(t[0],t[1])}static GetAngleBetweenTwoLine(t,e){const i=t[0].y-t[1].y,n=e[0].y-e[1].y,r=t[1].x-t[0].x,a=e[1].x-e[0].x;return Math.acos((i*n+r*a)/(Math.sqrt(i*i+r*r)*Math.sqrt(n*n+a*a)))}static PointInRect(t,e){return null===e?null:e.x>=t.left&&e.x<=t.width+t.left&&e.y>=t.top&&e.y<=t.top+t.height?e:null}static GetRotatedPoint(t,e,i){return{x:t.x*Math.cos(i)+t.y*Math.sin(i)+e.x,y:t.y*Math.cos(i)-t.x*Math.sin(i)+e.y}}static LimitPointToCircle(t,e,i){if(a.GetDistanceBetweenTwoPoint(t,i)<=e)return i;const n=t.x,r=t.y,s=i.x,o=i.y;let l=Math.sqrt(Math.pow(e,2)*Math.pow(n-s,2)/(Math.pow(n-s,2)+Math.pow(r-o,2)))+n;i.x<0&&(l*=-1);let h=(l-n)*(r-o)/(n-s)+r;return n-s+r===0&&(h=e),{x:l,y:h}}static GetIntersectBetweenTwoSegment(t,e,i){return a.PointInRect(t,a.GetIntersectBeetwenTwoLine(e,i))}static GetIntersectBeetwenTwoLine(t,e){const i=t[0].y-t[1].y,n=e[0].y-e[1].y,r=t[1].x-t[0].x,a=e[1].x-e[0].x,s=t[0].x*t[1].y-t[1].x*t[0].y,o=e[0].x*e[1].y-e[1].x*e[0].y,l=i*o-n*s,h=r*o-a*s,c=-(s*a-o*r)/(i*a-n*r),d=-(i*o-n*s)/(i*a-n*r);if(isFinite(c)&&isFinite(d))return{x:c,y:d};if(Math.abs(l-h)<.1)throw new Error("Segment included");return null}static GetCordsFromTwoPoint(t,e){const i=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y),r=Math.max(i,n),a=[t];function s(t,e,i,n,r){return e>t?t+r*(i/n):e<t?t-r*(i/n):t}for(let o=1;o<=r;o+=1)a.push({x:s(t.x,e.x,i,r,o),y:s(t.y,e.y,n,r,o)});return a}}class s extends e{constructor(t,e,i){super(t,i),this.copiedElement=null,this.temporaryCopy=null,this.isLoad=!1,this.element=e,this.element.classList.add("stf__item"),this.element.classList.add("--"+i)}newTemporaryCopy(){return"hard"===this.nowDrawingDensity?this:(null===this.temporaryCopy&&(this.copiedElement=this.element.cloneNode(!0),this.element.parentElement.appendChild(this.copiedElement),this.temporaryCopy=new s(this.render,this.copiedElement,this.nowDrawingDensity)),this.getTemporaryCopy())}getTemporaryCopy(){return this.temporaryCopy}hideTemporaryCopy(){null!==this.temporaryCopy&&(this.copiedElement.remove(),this.copiedElement=null,this.temporaryCopy=null)}draw(t){const e=t||this.nowDrawingDensity,i=this.render.convertToGlobal(this.state.position),n=this.render.getRect().pageWidth,r=this.render.getRect().height;this.element.classList.remove("--simple");const a=`\n display: block;\n z-index: ${this.element.style.zIndex};\n left: 0;\n top: 0;\n width: ${n}px;\n height: ${r}px;\n `;"hard"===e?this.drawHard(a):this.drawSoft(i,a)}drawHard(t=""){const e=this.render.getRect().left+this.render.getRect().width/2,i=this.state.hardDrawingAngle,n=t+"\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n clip-path: none;\n -webkit-clip-path: none;\n "+(0===this.orientation?`transform-origin: ${this.render.getRect().pageWidth}px 0; \n transform: translate3d(0, 0, 0) rotateY(${i}deg);`:`transform-origin: 0 0; \n transform: translate3d(${e}px, 0, 0) rotateY(${i}deg);`);this.element.style.cssText=n}drawSoft(t,e=""){let i="polygon( ";for(const r of this.state.area)if(null!==r){let t=1===this.render.getDirection()?{x:-r.x+this.state.position.x,y:r.y-this.state.position.y}:{x:r.x-this.state.position.x,y:r.y-this.state.position.y};t=a.GetRotatedPoint(t,{x:0,y:0},this.state.angle),i+=t.x+"px "+t.y+"px, "}i=i.slice(0,-2),i+=")";const n=e+`transform-origin: 0 0; clip-path: ${i}; -webkit-clip-path: ${i};`+(this.render.isSafari()&&0===this.state.angle?`transform: translate(${t.x}px, ${t.y}px);`:`transform: translate3d(${t.x}px, ${t.y}px, 0) rotate(${this.state.angle}rad);`);this.element.style.cssText=n}simpleDraw(t){const e=this.render.getRect(),i=e.pageWidth,n=e.height,r=1===t?e.left+e.pageWidth:e.left,a=e.top;this.element.classList.add("--simple"),this.element.style.cssText=`\n position: absolute; \n display: block; \n height: ${n}px; \n left: ${r}px; \n top: ${a}px; \n width: ${i}px; \n z-index: ${this.render.getSettings().startZIndex+1};`}getElement(){return this.element}load(){this.isLoad=!0}setOrientation(t){super.setOrientation(t),this.element.classList.remove("--left","--right"),this.element.classList.add(1===t?"--right":"--left")}setDrawingDensity(t){this.element.classList.remove("--soft","--hard"),this.element.classList.add("--"+t),super.setDrawingDensity(t)}}class o extends n{constructor(t,e,i,n){super(t,e),this.element=i,this.pagesElement=n}load(){for(const t of this.pagesElement){const e=new s(this.render,t,"hard"===t.dataset.density?"hard":"soft");e.load(),this.pages.push(e)}this.createSpread()}}class l{constructor(t,e,i,n){this.direction=t,this.corner=e,this.topIntersectPoint=null,this.sideIntersectPoint=null,this.bottomIntersectPoint=null,this.pageWidth=parseInt(i,10),this.pageHeight=parseInt(n,10)}calc(t){try{return this.position=this.calcAngleAndPosition(t),this.calculateIntersectPoint(this.position),!0}catch(t){return!1}}getFlippingClipArea(){const t=[];let e=!1;return t.push(this.rect.topLeft),t.push(this.topIntersectPoint),null===this.sideIntersectPoint?e=!0:(t.push(this.sideIntersectPoint),null===this.bottomIntersectPoint&&(e=!1)),t.push(this.bottomIntersectPoint),(e||"bottom"===this.corner)&&t.push(this.rect.bottomLeft),t}getBottomClipArea(){const t=[];return t.push(this.topIntersectPoint),"top"===this.corner?t.push({x:this.pageWidth,y:0}):(null!==this.topIntersectPoint&&t.push({x:this.pageWidth,y:0}),t.push({x:this.pageWidth,y:this.pageHeight})),null!==this.sideIntersectPoint?a.GetDistanceBetweenTwoPoint(this.sideIntersectPoint,this.topIntersectPoint)>=10&&t.push(this.sideIntersectPoint):"top"===this.corner&&t.push({x:this.pageWidth,y:this.pageHeight}),t.push(this.bottomIntersectPoint),t.push(this.topIntersectPoint),t}getAngle(){return 0===this.direction?-this.angle:this.angle}getRect(){return this.rect}getPosition(){return this.position}getActiveCorner(){return 0===this.direction?this.rect.topLeft:this.rect.topRight}getDirection(){return this.direction}getFlippingProgress(){return Math.abs((this.position.x-this.pageWidth)/(2*this.pageWidth)*100)}getCorner(){return this.corner}getBottomPagePosition(){return 1===this.direction?{x:this.pageWidth,y:0}:{x:0,y:0}}getShadowStartPoint(){return"top"===this.corner?this.topIntersectPoint:null!==this.sideIntersectPoint?this.sideIntersectPoint:this.topIntersectPoint}getShadowAngle(){const t=a.GetAngleBetweenTwoLine(this.getSegmentToShadowLine(),[{x:0,y:0},{x:this.pageWidth,y:0}]);return 0===this.direction?t:Math.PI-t}calcAngleAndPosition(t){let e=t;if(this.updateAngleAndGeometry(e),e="top"===this.corner?this.checkPositionAtCenterLine(e,{x:0,y:0},{x:0,y:this.pageHeight}):this.checkPositionAtCenterLine(e,{x:0,y:this.pageHeight},{x:0,y:0}),Math.abs(e.x-this.pageWidth)<1&&Math.abs(e.y)<1)throw new Error("Point is too small");return e}updateAngleAndGeometry(t){this.angle=this.calculateAngle(t),this.rect=this.getPageRect(t)}calculateAngle(t){const e=this.pageWidth-t.x+1,i="bottom"===this.corner?this.pageHeight-t.y:t.y;let n=2*Math.acos(e/Math.sqrt(i*i+e*e));i<0&&(n=-n);const r=Math.PI-n;if(!isFinite(n)||r>=0&&r<.003)throw new Error("The G point is too small");return"bottom"===this.corner&&(n=-n),n}getPageRect(t){return"top"===this.corner?this.getRectFromBasePoint([{x:0,y:0},{x:this.pageWidth,y:0},{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}],t):this.getRectFromBasePoint([{x:0,y:-this.pageHeight},{x:this.pageWidth,y:-this.pageHeight},{x:0,y:0},{x:this.pageWidth,y:0}],t)}getRectFromBasePoint(t,e){return{topLeft:this.getRotatedPoint(t[0],e),topRight:this.getRotatedPoint(t[1],e),bottomLeft:this.getRotatedPoint(t[2],e),bottomRight:this.getRotatedPoint(t[3],e)}}getRotatedPoint(t,e){return{x:t.x*Math.cos(this.angle)+t.y*Math.sin(this.angle)+e.x,y:t.y*Math.cos(this.angle)-t.x*Math.sin(this.angle)+e.y}}calculateIntersectPoint(t){const e={left:-1,top:-1,width:this.pageWidth+2,height:this.pageHeight+2};"top"===this.corner?(this.topIntersectPoint=a.GetIntersectBetweenTwoSegment(e,[t,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=a.GetIntersectBetweenTwoSegment(e,[t,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=a.GetIntersectBetweenTwoSegment(e,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])):(this.topIntersectPoint=a.GetIntersectBetweenTwoSegment(e,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]),this.sideIntersectPoint=a.GetIntersectBetweenTwoSegment(e,[t,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]),this.bottomIntersectPoint=a.GetIntersectBetweenTwoSegment(e,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}]))}checkPositionAtCenterLine(t,e,i){let n=t;const r=a.LimitPointToCircle(e,this.pageWidth,n);n!==r&&(n=r,this.updateAngleAndGeometry(n));const s=Math.sqrt(Math.pow(this.pageWidth,2)+Math.pow(this.pageHeight,2));let o=this.rect.bottomRight,l=this.rect.topLeft;if("bottom"===this.corner&&(o=this.rect.topRight,l=this.rect.bottomLeft),o.x<=0){const t=a.LimitPointToCircle(i,s,l);t!==n&&(n=t,this.updateAngleAndGeometry(n))}return n}getSegmentToShadowLine(){const t=this.getShadowStartPoint();return[t,t!==this.sideIntersectPoint&&null!==this.sideIntersectPoint?this.sideIntersectPoint:this.bottomIntersectPoint]}}class h{constructor(t,e){this.flippingPage=null,this.bottomPage=null,this.calc=null,this.state="read",this.render=t,this.app=e}fold(t){this.setState("user_fold"),null===this.calc&&this.start(t),this.do(this.render.convertToPage(t))}flip(t){if(this.app.getSettings().disableFlipByClick&&!this.isPointOnCorners(t))return;if(null!==this.calc&&this.render.finishAnimation(),!this.start(t))return;const e=this.getBoundsRect();this.setState("flipping");const i=e.height/10,n="bottom"===this.calc.getCorner()?e.height-i:i,r="bottom"===this.calc.getCorner()?e.height:0;this.calc.calc({x:e.pageWidth-i,y:n}),this.animateFlippingTo({x:e.pageWidth-i,y:n},{x:-e.pageWidth,y:r},!0)}start(t){this.reset();const e=this.render.convertToBook(t),i=this.getBoundsRect(),n=this.getDirectionByPoint(e),r=e.y>=i.height/2?"bottom":"top";if(!this.checkDirection(n))return!1;try{if(this.flippingPage=this.app.getPageCollection().getFlippingPage(n),this.bottomPage=this.app.getPageCollection().getBottomPage(n),"landscape"===this.render.getOrientation())if(1===n){const t=this.app.getPageCollection().nextBy(this.flippingPage);null!==t&&this.flippingPage.getDensity()!==t.getDensity()&&(this.flippingPage.setDrawingDensity("hard"),t.setDrawingDensity("hard"))}else{const t=this.app.getPageCollection().prevBy(this.flippingPage);null!==t&&this.flippingPage.getDensity()!==t.getDensity()&&(this.flippingPage.setDrawingDensity("hard"),t.setDrawingDensity("hard"))}return this.render.setDirection(n),this.calc=new l(n,r,i.pageWidth.toString(10),i.height.toString(10)),!0}catch(t){return!1}}do(t){if(null!==this.calc&&this.calc.calc(t)){const t=this.calc.getFlippingProgress();this.bottomPage.setArea(this.calc.getBottomClipArea()),this.bottomPage.setPosition(this.calc.getBottomPagePosition()),this.bottomPage.setAngle(0),this.bottomPage.setHardAngle(0),this.flippingPage.setArea(this.calc.getFlippingClipArea()),this.flippingPage.setPosition(this.calc.getActiveCorner()),this.flippingPage.setAngle(this.calc.getAngle()),0===this.calc.getDirection()?this.flippingPage.setHardAngle(90*(200-2*t)/100):this.flippingPage.setHardAngle(-90*(200-2*t)/100),this.render.setPageRect(this.calc.getRect()),this.render.setBottomPage(this.bottomPage),this.render.setFlippingPage(this.flippingPage),this.render.setShadowData(this.calc.getShadowStartPoint(),this.calc.getShadowAngle(),t,this.calc.getDirection())}}flipToPage(t,e){const i=this.app.getPageCollection().getCurrentSpreadIndex(),n=this.app.getPageCollection().getSpreadIndexByPage(t);try{n>i&&(this.app.getPageCollection().setCurrentSpreadIndex(n-1),this.flipNext(e)),n<i&&(this.app.getPageCollection().setCurrentSpreadIndex(n+1),this.flipPrev(e))}catch(t){}}flipNext(t){this.flip({x:this.render.getRect().left+2*this.render.getRect().pageWidth-10,y:"top"===t?1:this.render.getRect().height-2})}flipPrev(t){this.flip({x:10,y:"top"===t?1:this.render.getRect().height-2})}stopMove(){if(null===this.calc)return;const t=this.calc.getPosition(),e=this.getBoundsRect(),i="bottom"===this.calc.getCorner()?e.height:0;t.x<=0?this.animateFlippingTo(t,{x:-e.pageWidth,y:i},!0):this.animateFlippingTo(t,{x:e.pageWidth,y:i},!1)}showCorner(t){if(!this.checkState("read","fold_corner"))return;const e=this.getBoundsRect(),i=e.pageWidth;if(this.isPointOnCorners(t))if(null===this.calc){if(!this.start(t))return;this.setState("fold_corner"),this.calc.calc({x:i-1,y:1});const n=50,r="bottom"===this.calc.getCorner()?e.height-1:1,a="bottom"===this.calc.getCorner()?e.height-n:n;this.animateFlippingTo({x:i-1,y:r},{x:i-n,y:a},!1,!1)}else this.do(this.render.convertToPage(t));else this.setState("read"),this.render.finishAnimation(),this.stopMove()}animateFlippingTo(t,e,i,n=!0){const r=a.GetCordsFromTwoPoint(t,e),s=[];for(const a of r)s.push((()=>this.do(a)));const o=this.getAnimationDuration(r.length);this.render.startAnimation(s,o,(()=>{this.calc&&(i&&(1===this.calc.getDirection()?this.app.turnToPrevPage():this.app.turnToNextPage()),n&&(this.render.setBottomPage(null),this.render.setFlippingPage(null),this.render.clearShadow(),this.setState("read"),this.reset()))}))}getCalculation(){return this.calc}getState(){return this.state}setState(t){this.state!==t&&(this.app.updateState(t),this.state=t)}getDirectionByPoint(t){const e=this.getBoundsRect();if("portrait"===this.render.getOrientation()){if(t.x-e.pageWidth<=e.width/5)return 1}else if(t.x<e.width/2)return 1;return 0}getAnimationDuration(t){const e=this.app.getSettings().flippingTime;return t>=1e3?e:t/1e3*e}checkDirection(t){return 0===t?this.app.getCurrentPageIndex()<this.app.getPageCount()-1:this.app.getCurrentPageIndex()>=1}reset(){this.calc=null,this.flippingPage=null,this.bottomPage=null}getBoundsRect(){return this.render.getRect()}checkState(...t){for(const e of t)if(this.state===e)return!0;return!1}isPointOnCorners(t){const e=this.getBoundsRect(),i=e.pageWidth,n=Math.sqrt(Math.pow(i,2)+Math.pow(e.height,2))/5,r=this.render.convertToBook(t);return r.x>0&&r.y>0&&r.x<e.width&&r.y<e.height&&(r.x<n||r.x>e.width-n)&&(r.y<n||r.y>e.height-n)}}class c{constructor(t,e){this.leftPage=null,this.rightPage=null,this.flippingPage=null,this.bottomPage=null,this.direction=null,this.orientation=null,this.shadow=null,this.animation=null,this.pageRect=null,this.boundsRect=null,this.timer=0,this.safari=!1,this.setting=e,this.app=t;const i=new RegExp("Version\\/[\\d\\.]+.*Safari/");this.safari=null!==i.exec(window.navigator.userAgent)}render(t){if(null!==this.animation){const e=Math.round((t-this.animation.startedAt)/this.animation.durationFrame);e<this.animation.frames.length?this.animation.frames[e]():(this.animation.onAnimateEnd(),this.animation=null)}this.timer=t,this.drawFrame()}start(){this.update();const t=e=>{this.render(e),requestAnimationFrame(t)};requestAnimationFrame(t)}startAnimation(t,e,i){this.finishAnimation(),this.animation={frames:t,duration:e,durationFrame:e/t.length,onAnimateEnd:i,startedAt:this.timer}}finishAnimation(){null!==this.animation&&(this.animation.frames[this.animation.frames.length-1](),null!==this.animation.onAnimateEnd&&this.animation.onAnimateEnd()),this.animation=null}update(){this.boundsRect=null;const t=this.calculateBoundsRect();this.orientation!==t&&(this.orientation=t,this.app.updateOrientation(t))}calculateBoundsRect(){let t="landscape";const e=this.getBlockWidth(),i=e/2,n=this.getBlockHeight()/2,r=this.setting.width/this.setting.height;let a=this.setting.width,s=this.setting.height,o=i-a;return"stretch"===this.setting.size?(e<2*this.setting.minWidth&&this.app.getSettings().usePortrait&&(t="portrait"),a="portrait"===t?this.getBlockWidth():this.getBlockWidth()/2,a>this.setting.maxWidth&&(a=this.setting.maxWidth),s=a/r,s>this.getBlockHeight()&&(s=this.getBlockHeight(),a=s*r),o="portrait"===t?i-a/2-a:i-a):e<2*a&&this.app.getSettings().usePortrait&&(t="portrait",o=i-a/2-a),this.boundsRect={left:o,top:n-s/2,width:2*a,height:s,pageWidth:a},t}setShadowData(t,e,i,n){if(!this.app.getSettings().drawShadow)return;const r=100*this.getSettings().maxShadowOpacity;this.shadow={pos:t,angle:e,width:3*this.getRect().pageWidth/4*i/100,opacity:(100-i)*r/100/100,direction:n,progress:2*i}}clearShadow(){this.shadow=null}getBlockWidth(){return this.app.getUI().getDistElement().offsetWidth}getBlockHeight(){return this.app.getUI().getDistElement().offsetHeight}getDirection(){return this.direction}getRect(){return null===this.boundsRect&&this.calculateBoundsRect(),this.boundsRect}getSettings(){return this.app.getSettings()}getOrientation(){return this.orientation}setPageRect(t){this.pageRect=t}setDirection(t){this.direction=t}setRightPage(t){null!==t&&t.setOrientation(1),this.rightPage=t}setLeftPage(t){null!==t&&t.setOrientation(0),this.leftPage=t}setBottomPage(t){null!==t&&t.setOrientation(1===this.direction?0:1),this.bottomPage=t}setFlippingPage(t){null!==t&&t.setOrientation(0===this.direction&&"portrait"!==this.orientation?0:1),this.flippingPage=t}convertToBook(t){const e=this.getRect();return{x:t.x-e.left,y:t.y-e.top}}isSafari(){return this.safari}convertToPage(t,e){e||(e=this.direction);const i=this.getRect();return{x:0===e?t.x-i.left-i.width/2:i.width/2-t.x+i.left,y:t.y-i.top}}convertToGlobal(t,e){if(e||(e=this.direction),null==t)return null;const i=this.getRect();return{x:0===e?t.x+i.left+i.width/2:i.width/2-t.x+i.left,y:t.y+i.top}}convertRectToGlobal(t,e){return e||(e=this.direction),{topLeft:this.convertToGlobal(t.topLeft,e),topRight:this.convertToGlobal(t.topRight,e),bottomLeft:this.convertToGlobal(t.bottomLeft,e),bottomRight:this.convertToGlobal(t.bottomRight,e)}}}class d extends c{constructor(t,e,i){super(t,e),this.canvas=i,this.ctx=i.getContext("2d")}getContext(){return this.ctx}reload(){}drawFrame(){this.clear(),"portrait"!==this.orientation&&null!=this.leftPage&&this.leftPage.simpleDraw(0),null!=this.rightPage&&this.rightPage.simpleDraw(1),null!=this.bottomPage&&this.bottomPage.draw(),this.drawBookShadow(),null!=this.flippingPage&&this.flippingPage.draw(),null!=this.shadow&&(this.drawOuterShadow(),this.drawInnerShadow());const t=this.getRect();"portrait"===this.orientation&&(this.ctx.beginPath(),this.ctx.rect(t.left+t.pageWidth,t.top,t.width,t.height),this.ctx.clip())}drawBookShadow(){const t=this.getRect();this.ctx.save(),this.ctx.beginPath();const e=t.width/20;this.ctx.rect(t.left,t.top,t.width,t.height);const i={x:t.left+t.width/2-e/2,y:0};this.ctx.translate(i.x,i.y);const n=this.ctx.createLinearGradient(0,0,e,0);n.addColorStop(0,"rgba(0, 0, 0, 0)"),n.addColorStop(.4,"rgba(0, 0, 0, 0.2)"),n.addColorStop(.49,"rgba(0, 0, 0, 0.1)"),n.addColorStop(.5,"rgba(0, 0, 0, 0.5)"),n.addColorStop(.51,"rgba(0, 0, 0, 0.4)"),n.addColorStop(1,"rgba(0, 0, 0, 0)"),this.ctx.clip(),this.ctx.fillStyle=n,this.ctx.fillRect(0,0,e,2*t.height),this.ctx.restore()}drawOuterShadow(){const t=this.getRect();this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t.left,t.top,t.width,t.height);const e=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y});this.ctx.translate(e.x,e.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const i=this.ctx.createLinearGradient(0,0,this.shadow.width,0);0===this.shadow.direction?(this.ctx.translate(0,-100),i.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")"),i.addColorStop(1,"rgba(0, 0, 0, 0)")):(this.ctx.translate(-this.shadow.width,-100),i.addColorStop(0,"rgba(0, 0, 0, 0)"),i.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")")),this.ctx.clip(),this.ctx.fillStyle=i,this.ctx.fillRect(0,0,this.shadow.width,2*t.height),this.ctx.restore()}drawInnerShadow(){const t=this.getRect();this.ctx.save(),this.ctx.beginPath();const e=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.convertRectToGlobal(this.pageRect);this.ctx.moveTo(i.topLeft.x,i.topLeft.y),this.ctx.lineTo(i.topRight.x,i.topRight.y),this.ctx.lineTo(i.bottomRight.x,i.bottomRight.y),this.ctx.lineTo(i.bottomLeft.x,i.bottomLeft.y),this.ctx.translate(e.x,e.y),this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);const n=3*this.shadow.width/4,r=this.ctx.createLinearGradient(0,0,n,0);0===this.shadow.direction?(this.ctx.translate(-n,-100),r.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")"),r.addColorStop(.9,"rgba(0, 0, 0, 0.05)"),r.addColorStop(.7,"rgba(0, 0, 0, "+this.shadow.opacity+")"),r.addColorStop(0,"rgba(0, 0, 0, 0)")):(this.ctx.translate(0,-100),r.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")"),r.addColorStop(.1,"rgba(0, 0, 0, 0.05)"),r.addColorStop(.3,"rgba(0, 0, 0, "+this.shadow.opacity+")"),r.addColorStop(1,"rgba(0, 0, 0, 0)")),this.ctx.clip(),this.ctx.fillStyle=r,this.ctx.fillRect(0,0,n,2*t.height),this.ctx.restore()}clear(){this.ctx.fillStyle="white",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}}class p{constructor(t,e,i){this.touchPoint=null,this.swipeTimeout=250,this.onResize=()=>{this.update()},this.onMouseDown=t=>{if(this.checkTarget(t.target)){const e=this.getMousePos(t.clientX,t.clientY);this.app.startUserTouch(e),t.preventDefault()}},this.onTouchStart=t=>{if(this.checkTarget(t.target)&&t.changedTouches.length>0){const e=t.changedTouches[0],i=this.getMousePos(e.clientX,e.clientY);this.touchPoint={point:i,time:Date.now()},setTimeout((()=>{null!==this.touchPoint&&this.app.startUserTouch(i)}),this.swipeTimeout),this.app.getSettings().mobileScrollSupport||t.preventDefault()}},this.onMouseUp=t=>{const e=this.getMousePos(t.clientX,t.clientY);this.app.userStop(e)},this.onMouseMove=t=>{const e=this.getMousePos(t.clientX,t.clientY);this.app.userMove(e,!1)},this.onTouchMove=t=>{if(t.changedTouches.length>0){const e=t.changedTouches[0],i=this.getMousePos(e.clientX,e.clientY);this.app.getSettings().mobileScrollSupport?(null!==this.touchPoint&&(Math.abs(this.touchPoint.point.x-i.x)>10||"read"!==this.app.getState())&&t.cancelable&&this.app.userMove(i,!0),"read"!==this.app.getState()&&t.preventDefault()):this.app.userMove(i,!0)}},this.onTouchEnd=t=>{if(t.changedTouches.length>0){const e=t.changedTouches[0],i=this.getMousePos(e.clientX,e.clientY);let n=!1;if(null!==this.touchPoint){const t=i.x-this.touchPoint.point.x,e=Math.abs(i.y-this.touchPoint.point.y);Math.abs(t)>this.swipeDistance&&e<2*this.swipeDistance&&Date.now()-this.touchPoint.time<this.swipeTimeout&&(t>0?this.app.flipPrev(this.touchPoint.point.y<this.app.getRender().getRect().height/2?"top":"bottom"):this.app.flipNext(this.touchPoint.point.y<this.app.getRender().getRect().height/2?"top":"bottom"),n=!0),this.touchPoint=null}this.app.userStop(i,n)}},this.parentElement=t,t.classList.add("stf__parent"),t.insertAdjacentHTML("afterbegin",'<div class="stf__wrapper"></div>'),this.wrapper=t.querySelector(".stf__wrapper"),this.app=e;const n=this.app.getSettings().usePortrait?1:2;t.style.minWidth=i.minWidth*n+"px",t.style.minHeight=i.minHeight+"px","fixed"===i.size&&(t.style.minWidth=i.width*n+"px",t.style.minHeight=i.height+"px"),i.autoSize&&(t.style.width="100%",t.style.maxWidth=2*i.maxWidth+"px"),t.style.display="block",window.addEventListener("resize",this.onResize,!1),this.swipeDistance=i.swipeDistance}destroy(){this.app.getSettings().useMouseEvents&&this.removeHandlers(),this.distElement.remove(),this.wrapper.remove()}getDistElement(){return this.distElement}getWrapper(){return this.wrapper}setOrientationStyle(t){this.wrapper.classList.remove("--portrait","--landscape"),"portrait"===t?(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/this.app.getSettings().width*100+"%"),this.wrapper.classList.add("--portrait")):(this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/(2*this.app.getSettings().width)*100+"%"),this.wrapper.classList.add("--landscape")),this.update()}removeHandlers(){window.removeEventListener("resize",this.onResize),this.distElement.removeEventListener("mousedown",this.onMouseDown),this.distElement.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("touchend",this.onTouchEnd)}setHandlers(){window.addEventListener("resize",this.onResize,!1),this.app.getSettings().useMouseEvents&&(this.distElement.addEventListener("mousedown",this.onMouseDown),this.distElement.addEventListener("touchstart",this.onTouchStart),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!this.app.getSettings().mobileScrollSupport}),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("touchend",this.onTouchEnd))}getMousePos(t,e){const i=this.distElement.getBoundingClientRect();return{x:t-i.left,y:e-i.top}}checkTarget(t){return!this.app.getSettings().clickEventForward||!["a","button"].includes(t.tagName.toLowerCase())}}class u extends p{constructor(t,e,i,n){super(t,e,i),this.wrapper.insertAdjacentHTML("afterbegin",'<div class="stf__block"></div>'),this.distElement=t.querySelector(".stf__block"),this.items=n;for(const r of n)this.distElement.appendChild(r);this.setHandlers()}clear(){for(const t of this.items)this.parentElement.appendChild(t)}updateItems(t){this.removeHandlers(),this.distElement.innerHTML="";for(const e of t)this.distElement.appendChild(e);this.items=t,this.setHandlers()}update(){this.app.getRender().update()}}class g extends p{constructor(t,e,i){super(t,e,i),this.wrapper.innerHTML='<canvas class="stf__canvas"></canvas>',this.canvas=t.querySelectorAll("canvas")[0],this.distElement=this.canvas,this.resizeCanvas(),this.setHandlers()}resizeCanvas(){const t=getComputedStyle(this.canvas),e=parseInt(t.getPropertyValue("width"),10),i=parseInt(t.getPropertyValue("height"),10);this.canvas.width=e,this.canvas.height=i}getCanvas(){return this.canvas}update(){this.resizeCanvas(),this.app.getRender().update()}}class f extends c{constructor(t,e,i){super(t,e),this.outerShadow=null,this.innerShadow=null,this.hardShadow=null,this.hardInnerShadow=null,this.element=i,this.createShadows()}createShadows(){this.element.insertAdjacentHTML("beforeend",'<div class="stf__outerShadow"></div>\n <div class="stf__innerShadow"></div>\n <div class="stf__hardShadow"></div>\n <div class="stf__hardInnerShadow"></div>'),this.outerShadow=this.element.querySelector(".stf__outerShadow"),this.innerShadow=this.element.querySelector(".stf__innerShadow"),this.hardShadow=this.element.querySelector(".stf__hardShadow"),this.hardInnerShadow=this.element.querySelector(".stf__hardInnerShadow")}clearShadow(){super.clearShadow(),this.outerShadow.style.cssText="display: none",this.innerShadow.style.cssText="display: none",this.hardShadow.style.cssText="display: none",this.hardInnerShadow.style.cssText="display: none"}reload(){this.element.querySelector(".stf__outerShadow")||this.createShadows()}drawHardInnerShadow(){const t=this.getRect(),e=this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress;let i=(100-e)*(2.5*t.pageWidth)/100+20;i>t.pageWidth&&(i=t.pageWidth);let n=`\n display: block;\n z-index: ${(this.getSettings().startZIndex+5).toString(10)};\n width: ${i}px;\n height: ${t.height}px;\n background: linear-gradient(to right,\n rgba(0, 0, 0, ${this.shadow.opacity*e/100}) 5%,\n rgba(0, 0, 0, 0) 100%);\n left: ${t.left+t.width/2}px;\n transform-origin: 0 0;\n `;n+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0);":"transform: translate3d(0, 0, 0) rotateY(180deg);",this.hardInnerShadow.style.cssText=n}drawHardOuterShadow(){const t=this.getRect();let e=(100-(this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress))*(2.5*t.pageWidth)/100+20;e>t.pageWidth&&(e=t.pageWidth);let i=`\n display: block;\n z-index: ${(this.getSettings().startZIndex+4).toString(10)};\n width: ${e}px;\n height: ${t.height}px;\n background: linear-gradient(to left, rgba(0, 0, 0, ${this.shadow.opacity}) 5%, rgba(0, 0, 0, 0) 100%);\n left: ${t.left+t.width/2}px;\n transform-origin: 0 0;\n `;i+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0) rotateY(180deg);":"transform: translate3d(0, 0, 0);",this.hardShadow.style.cssText=i}drawInnerShadow(){const t=this.getRect(),e=3*this.shadow.width/4,i=0===this.getDirection()?e:0,n=0===this.getDirection()?"to left":"to right",r=this.convertToGlobal(this.shadow.pos),s=this.shadow.angle+3*Math.PI/2,o=[this.pageRect.topLeft,this.pageRect.topRight,this.pageRect.bottomRight,this.pageRect.bottomLeft];let l="polygon( ";for(const c of o){let t=1===this.getDirection()?{x:-c.x+this.shadow.pos.x,y:c.y-this.shadow.pos.y}:{x:c.x-this.shadow.pos.x,y:c.y-this.shadow.pos.y};t=a.GetRotatedPoint(t,{x:i,y:100},s),l+=t.x+"px "+t.y+"px, "}l=l.slice(0,-2),l+=")";const h=`\n display: block;\n z-index: ${(this.getSettings().startZIndex+10).toString(10)};\n width: ${e}px;\n height: ${2*t.height}px;\n background: linear-gradient(${n},\n rgba(0, 0, 0, ${this.shadow.opacity}) 5%,\n rgba(0, 0, 0, 0.05) 15%,\n rgba(0, 0, 0, ${this.shadow.opacity}) 35%,\n rgba(0, 0, 0, 0) 100%);\n transform-origin: ${i}px 100px;\n transform: translate3d(${r.x-i}px, ${r.y-100}px, 0) rotate(${s}rad);\n clip-path: ${l};\n -webkit-clip-path: ${l};\n `;this.innerShadow.style.cssText=h}drawOuterShadow(){const t=this.getRect(),e=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.shadow.angle+3*Math.PI/2,n=1===this.getDirection()?this.shadow.width:0,r=0===this.getDirection()?"to right":"to left",s=[{x:0,y:0},{x:t.pageWidth,y:0},{x:t.pageWidth,y:t.height},{x:0,y:t.height}];let o="polygon( ";for(const h of s)if(null!==h){let t=1===this.getDirection()?{x:-h.x+this.shadow.pos.x,y:h.y-this.shadow.pos.y}:{x:h.x-this.shadow.pos.x,y:h.y-this.shadow.pos.y};t=a.GetRotatedPoint(t,{x:n,y:100},i),o+=t.x+"px "+t.y+"px, "}o=o.slice(0,-2),o+=")";const l=`\n display: block;\n z-index: ${(this.getSettings().startZIndex+10).toString(10)};\n width: ${this.shadow.width}px;\n height: ${2*t.height}px;\n background: linear-gradient(${r}, rgba(0, 0, 0, ${this.shadow.opacity}), rgba(0, 0, 0, 0));\n transform-origin: ${n}px 100px;\n transform: translate3d(${e.x-n}px, ${e.y-100}px, 0) rotate(${i}rad);\n clip-path: ${o};\n -webkit-clip-path: ${o};\n `;this.outerShadow.style.cssText=l}drawLeftPage(){"portrait"!==this.orientation&&null!==this.leftPage&&(1===this.direction&&null!==this.flippingPage&&"hard"===this.flippingPage.getDrawingDensity()?(this.leftPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.leftPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.leftPage.draw(this.flippingPage.getDrawingDensity())):this.leftPage.simpleDraw(0))}drawRightPage(){null!==this.rightPage&&(0===this.direction&&null!==this.flippingPage&&"hard"===this.flippingPage.getDrawingDensity()?(this.rightPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.rightPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle()),this.rightPage.draw(this.flippingPage.getDrawingDensity())):this.rightPage.simpleDraw(1))}drawBottomPage(){if(null===this.bottomPage)return;const t=null!=this.flippingPage?this.flippingPage.getDrawingDensity():null;"portrait"===this.orientation&&1===this.direction||(this.bottomPage.getElement().style.zIndex=(this.getSettings().startZIndex+3).toString(10),this.bottomPage.draw(t))}drawFrame(){this.clear(),this.drawLeftPage(),this.drawRightPage(),this.drawBottomPage(),null!=this.flippingPage&&(this.flippingPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10),this.flippingPage.draw()),null!=this.shadow&&null!==this.flippingPage&&("soft"===this.flippingPage.getDrawingDensity()?(this.drawOuterShadow(),this.drawInnerShadow()):(this.drawHardOuterShadow(),this.drawHardInnerShadow()))}clear(){for(const t of this.app.getPageCollection().getPages())t!==this.leftPage&&t!==this.rightPage&&t!==this.flippingPage&&t!==this.bottomPage&&(t.getElement().style.cssText="display: none"),t.getTemporaryCopy()!==this.flippingPage&&t.hideTemporaryCopy()}update(){super.update(),null!==this.rightPage&&this.rightPage.setOrientation(1),null!==this.leftPage&&this.leftPage.setOrientation(0)}}class m{constructor(){this._default={startPage:0,size:"fixed",width:0,height:0,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,drawShadow:!0,flippingTime:1e3,usePortrait:!0,startZIndex:0,autoSize:!0,maxShadowOpacity:1,showCover:!1,mobileScrollSupport:!0,swipeDistance:30,clickEventForward:!0,useMouseEvents:!0,showPageCorners:!0,disableFlipByClick:!1}}getSettings(t){const e=this._default;if(Object.assign(e,t),"stretch"!==e.size&&"fixed"!==e.size)throw new Error('Invalid size type. Available only "fixed" and "stretch" value');if(e.width<=0||e.height<=0)throw new Error("Invalid width or height");if(e.flippingTime<=0)throw new Error("Invalid flipping time");return"stretch"===e.size?(e.minWidth<=0&&(e.minWidth=100),e.maxWidth<e.minWidth&&(e.maxWidth=2e3),e.minHeight<=0&&(e.minHeight=100),e.maxHeight<e.minHeight&&(e.maxHeight=2e3)):(e.minWidth=e.width,e.maxWidth=e.width,e.minHeight=e.height,e.maxHeight=e.height),e}}!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}(".stf__parent {\n position: relative;\n display: block;\n box-sizing: border-box;\n transform: translateZ(0);\n\n -ms-touch-action: pan-y;\n touch-action: pan-y;\n}\n\n.sft__wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n}\n\n.stf__parent canvas {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n}\n\n.stf__block {\n position: absolute;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n perspective: 2000px;\n}\n\n.stf__item {\n display: none;\n position: absolute;\n transform-style: preserve-3d;\n}\n\n.stf__outerShadow {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.stf__innerShadow {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.stf__hardShadow {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.stf__hardInnerShadow {\n position: absolute;\n left: 0;\n top: 0;\n}"),t.PageFlip=class extends class{constructor(){this.events=new Map}on(t,e){return this.events.has(t)?this.events.get(t).push(e):this.events.set(t,[e]),this}off(t){this.events.delete(t)}trigger(t,e,i=null){if(this.events.has(t))for(const n of this.events.get(t))n({data:i,object:e})}}{constructor(t,e){super(),this.isUserTouch=!1,this.isUserMove=!1,this.setting=null,this.pages=null,this.setting=(new m).getSettings(e),this.block=t}destroy(){this.ui.destroy(),this.block.remove()}update(){this.render.update(),this.pages.show()}loadFromImages(t){this.ui=new g(this.block,this,this.setting);const e=this.ui.getCanvas();this.render=new d(this,this.setting,e),this.flipController=new h(this.render,this),this.pages=new r(this,this.render,t),this.pages.load(),this.render.start(),this.pages.show(this.setting.startPage),setTimeout((()=>{this.ui.update(),this.trigger("init",this,{page:this.setting.startPage,mode:this.render.getOrientation()})}),1)}loadFromHTML(t){this.ui=new u(this.block,this,this.setting,t),this.render=new f(this,this.setting,this.ui.getDistElement()),this.flipController=new h(this.render,this),this.pages=new o(this,this.render,this.ui.getDistElement(),t),this.pages.load(),this.render.start(),this.pages.show(this.setting.startPage),setTimeout((()=>{this.ui.update(),this.trigger("init",this,{page:this.setting.startPage,mode:this.render.getOrientation()})}),1)}updateFromImages(t){const e=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new r(this,this.render,t),this.pages.load(),this.pages.show(e),this.trigger("update",this,{page:e,mode:this.render.getOrientation()})}updateFromHtml(t){const e=this.pages.getCurrentPageIndex();this.pages.destroy(),this.pages=new o(this,this.render,this.ui.getDistElement(),t),this.pages.load(),this.ui.updateItems(t),this.render.reload(),this.pages.show(e),this.trigger("update",this,{page:e,mode:this.render.getOrientation()})}clear(){this.pages.destroy(),this.ui.clear()}turnToPrevPage(){this.pages.showPrev()}turnToNextPage(){this.pages.showNext()}turnToPage(t){this.pages.show(t)}flipNext(t="top"){this.flipController.flipNext(t)}flipPrev(t="top"){this.flipController.flipPrev(t)}flip(t,e="top"){this.flipController.flipToPage(t,e)}updateState(t){this.trigger("changeState",this,t)}updatePageIndex(t){this.trigger("flip",this,t)}updateOrientation(t){this.ui.setOrientationStyle(t),this.update(),this.trigger("changeOrientation",this,t)}getPageCount(){return this.pages.getPageCount()}getCurrentPageIndex(){return this.pages.getCurrentPageIndex()}getPage(t){return this.pages.getPage(t)}getRender(){return this.render}getFlipController(){return this.flipController}getOrientation(){return this.render.getOrientation()}getBoundsRect(){return this.render.getRect()}getSettings(){return this.setting}getUI(){return this.ui}getState(){return this.flipController.getState()}getPageCollection(){return this.pages}startUserTouch(t){this.mousePosition=t,this.isUserTouch=!0,this.isUserMove=!1}userMove(t,e){this.isUserTouch||e||!this.setting.showPageCorners?this.isUserTouch&&a.GetDistanceBetweenTwoPoint(this.mousePosition,t)>5&&(this.isUserMove=!0,this.flipController.fold(t)):this.flipController.showCorner(t)}userStop(t,e=!1){this.isUserTouch&&(this.isUserTouch=!1,e||(this.isUserMove?this.flipController.stopMove():this.flipController.flip(t)))}},Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,Q);const Z=a({name:"the-book",props:{bookData:{type:Object,default:()=>({})},tab:{type:String,default:""},show:{type:Boolean,default:!1},rect:{type:Object,default:()=>({})}},emits:["close"],setup(t,{emit:e}){var i,n,r,a;m(),console.log(v.user.data.phone);const d="lastTime"+(null!==(i=null===(n=v)||void 0===n||null===(r=n.user)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.phone)&&void 0!==i?i:""),p=l({show:!1,width:0,height:0,transform:"",list:[],lastTime:localStorage.getItem(d)}),f=h(!1),A=function(){var t=s((function*(){console.log("初始化完成")}));return function(){return t.apply(this,arguments)}}();const P=()=>{clearTimeout(null);const t=document.querySelector(".bookWrap");null.turn("page",1),t&&(t.style.transform=p.transform),e("close"),setTimeout((()=>{t.style.transition="",t.style.transform="",p.show=!1,p.list=[]}),1e3)};c(s((function*(){yield A(),y("webViewOnResume",(()=>{p.lastTime=localStorage.getItem(d)}))})));x((()=>t.show),(()=>{t.show&&((()=>{var e;if(null===(e=t.bookData)||void 0===e||!e.lessonList)return;const i=Math.floor((.8*document.body.clientHeight-40)/50);console.log("🚀 ~ step:",i);const n=[];let r=[];for(let a=0;a<t.bookData.lessonList.length;a++){const e=t.bookData.lessonList[a];r.length>=i?(n.push([...r]),r=[{name:e.name}]):r.push({name:e.name});for(let t=0;t<e.knowledgeList.length;t++)r.length>=i?(n.push([...r]),r=[e.knowledgeList[t]]):r.push(e.knowledgeList[t])}r.length&&n.push(r),p.list=n})(),w((()=>{(()=>{const t=.8*document.body.clientHeight;p.height=t,p.width=t*(210/297)*2,p.show=!0,w((()=>{const t=document.getElementById("flipbook");new Q.PageFlip(t,{width:p.width/2,height:p.height,showCover:!0}).loadFromHTML(document.querySelectorAll(".page"))}))})()})))}));return()=>o("div",{class:[K.book,p.show?"":K.bookHide]},[o("div",{class:K.back,onClick:P},[o("img",{src:V},null)]),o("div",{class:"bookWrap",style:{width:p.width+"px"}},[!!p.list.length&&o("div",{id:"flipbook"},[o("div",{class:"page","data-density":"hard"},[o("img",{style:"width: 100%; height: 100%; object-fit: cover;",src:t.bookData.coverImg},null)]),p.list.map((e=>o("div",{class:"page"},[o("div",{class:K.wrap},[o("div",{class:K.wrapItem},[e.map(((e,i)=>o(g,null,[o("div",{class:[K.item,e.id&&K.des],onTouchstart:t=>{t.stopPropagation()},onClick:i=>{i.stopPropagation(),(e=>{if(e.id){if(!e.containMaterial)return void b("暂无资源");localStorage.setItem(d,e.id);const i=F.stringify({id:e.id,lessonCoursewareId:e.lessonCoursewareId,lessonCoursewareDetailId:e.lessonCoursewareDetailId,name:e.name,tab:t.tab}),n=location.origin+location.pathname+"#/courseware-play?"+i;console.log("🚀 ~ url:",n),_({api:"openWebView",content:{url:n,orientation:0,isHideTitle:!1,c_orientation:0}})}})(e)}},[e.id?o("img",{id:1==i?"coursewareDetail-0":"",class:K.icon,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAAFDElEQVRYCcWZy24cRRSGT3XPxbHj+MIlwXLCJkJKkLJmzSICicfIhi0Pwg55k9dASF6AxAOwQAIhgRRkQpwQRMaZxjOeme7i/8+pmqtlVwMzLqlVl66u+uo/p0731DiZS/6s+754eYTmhyL+DsrX57r892obQzon0nkmUlUF5jnCoIcizcfujXd+mJ4AvSx571tyVnyO2qfifRbbl5K3NwCIKU5eiJSDyRTOVagcyM7+Z845vaGAAe4rgH046b3EUuuaSNYQOX0l0oeAC8l9Lbv7HxPSlKJyq4IjTFkaUgtKnpsg1KuntKa44HPfL92sMyAwnJoZefGXyODvmbtaobl940GmG2LZPrcwvZ/43saOSKO10MMEGz6iibFbryCNsAfKke3mzbdN0UWMh873X3eXEkoWJzu/pYkNk2PDMJVDmPtUhPAV/dQVzvdeQ+8rTjlMTDMzNs6lgD7XmlTFukZ9XEPx1UA8Vu0rlGG2CkpU2KllWUnlR8i9lJWXUVXJta1bcuOt27MzMBbyypsWfhgjA2w64M9firz8EdIT6gwvAEzqGlJlTSmlgXLTymgrxcoVy2zHpX2Rd4tiETDi0sS8plIiINT67Vu8kezJyuU6KQHsAgQgWfaA8Ch7vWftpfYnLPr4RTNO8SwUEwHDcxjbS6Yg40mpngAYbwYqWY3LOYC4kLgIgybkN0/gBhjpvd1cbm/Zu2KBLDSkA3oPVUy5aC6aNyrH3ANyUg/3CA0ohScs6s8LvnKxWF/+j4CAU6WQm/kAS7W0DhiFoGoRCPcIHKAM3u4HcZKyZAVpLvoXFYgKTnKCEsZAI5T2jSaP9/F8nXSxA0yNZGAThQyIZm2JW9sOgKauKQ3goGD0TbZzoXVS8nI4me5QNRkmUvM2ZOv+R9Lc2pM+Pj47v/8kvdPClEY/6xNVxe6Gz3KMGA1SQNMBaVoqgJybw8ydS7Z2Q+dZ296TW7hOOy/kz+MnMuz1gsnNT6m4PV9PwXQTB3PpBlFQbgKoIbNxbX37pty594G8uXcXiyDUrG+qginShT7JCkaTTmKbmXmObzx13myrv9mOByh8T1Vcjg+6MDjVMBNz09Cn5hXswwf/eP5UOt3uJCbyGaqpeT0TJyvICUwNvnttNzIOjgZ9yVvrctYr5OXxr9I5OVHTR19lHtWPz49lTijUADQwew/bjib08S/fSWN9Wwp8BNiHQVBZfS/ERy0HUCyqTkoHxMDxy8XMFXwKn1T9AuZE+Bj72XRflmlaQsIlqGidlNxbgy4m01eWmtvim4Yb1OMrzlwhqm1QsQ9dgs/XScm9LVzQfAYWYxpNHu9FECo53r1UEFf0Qy6gTkruHb9UxmCMi/wwBTBhDCCYE/W4EDUv6hGept5slfiSEXn3kk8tLiQZUFWCD2l4oYr0qRjbUGbIYZuBTvwxgkUX4InCJ3eT3w/4+kxMa7v7AAgbI4AZ1JRqhOSlChps3DhqZlUyWRMlq/2rzuPnYIWdWyIv8SMo/hjiacYQZsMt5E6GVYYfSZkMcA418DnacuQNubnh5N7O7O+OizSqDXjRYMu4l+Fdet7x0jLmqj8m2OCD7qj+k6t6wh1xkxyuarp/Mc/hFR2/JaDy+M3Jg8y1N3kmfJDwyKq7HJBNP4dXfgR82VIdjoDb1ydHwHpgjQYc2HyBy35VXzbIMu6rWcEQ4DjF7A8KNKzkb4jpxWmY00hyCJrHweXGPf4B6HyHtp8LqjYAAAAASUVORK5CYII="},null):null,o("div",{class:K.name,style:{lineHeight:"20Px"}},[e.name,p.lastTime===e.id&&o("span",{class:K.last},[u("上次观看")])])])])))])])]))),p.list.length%2==1&&o("div",{class:"page"},[o("div",{class:K.wrap},[o("div",{class:K.wrapItem},null)])]),o("div",{class:"page","data-density":"hard"},[o("div",{class:K.wrap},[o("div",{class:K.wrapItem,style:{background:"#FFD8A1"}},null)])])])]),f.value?o(Y,null,null):null])}}),$=a({name:"courseware-list",emits:["close"],setup(t,{emit:e}){const i=l({box:{},show:!1,steps:[{ele:"",eleRect:{},img:j("courseware-list1.png"),handStyle:{top:"1.5rem",left:"3.5rem",transform:"rotate(-90deg)"},imgStyle:{top:".7rem",left:"5rem"},btnsStyle:{top:"3.5rem",left:"6.2rem"},boxStyle:{},eleRectPadding:{left:-4,top:-4,width:-8,height:-8}},{ele:"",img:j("courseware-list2.png"),handStyle:{top:"-.25rem",left:"1.38rem",transform:"rotate(-90deg)"},imgStyle:{top:"-1.2rem",left:"2.4rem"},btnsStyle:{top:"1.6rem",left:"3.6rem"},eleRectPadding:{left:4,top:4,width:8,height:8}},{ele:"",img:j("courseware-list3.png"),handStyle:{bottom:"-2.1rem",left:"0.66rem"},imgStyle:{top:"1.1rem",left:"-2rem"},btnsStyle:{top:"4.2rem",left:"-0.5rem"},eleRectPadding:{left:4,top:4,width:8,height:8}},{ele:"",img:j("courseware-list4.png"),handStyle:{top:".8rem",left:"1rem"},imgStyle:{top:"1.1rem",left:"-4.6rem"},btnsStyle:{top:"4rem",left:"-4.5rem","justify-content":"center",padding:0}}],step:0}),r=h(!1),a=h({}),m=function(){var t=s((function*(){try{const e=yield B({guideTag:"guideInfo"});var t;if(e.data)a.value=JSON.parse(null===(t=e.data)||void 0===t?void 0:t.guideValue)||null;else a.value={};a.value&&a.value.courseware?r.value=!1:r.value=!0}catch(e){console.log(e)}}));return function(){return t.apply(this,arguments)}}();m();const v=()=>{const t=document.getElementById(`courseware-${i.step}`);if(t){var e,n,r,a;const s=t.getBoundingClientRect(),o=(null===(e=i.steps[i.step].eleRectPadding)||void 0===e?void 0:e.left)||0,l=(null===(n=i.steps[i.step].eleRectPadding)||void 0===n?void 0:n.top)||0,h=(null===(r=i.steps[i.step].eleRectPadding)||void 0===r?void 0:r.width)||0,c=(null===(a=i.steps[i.step].eleRectPadding)||void 0===a?void 0:a.height)||0;i.box={left:s.x-o+"px",top:s.y-l+"px",width:s.width+h+"px",height:s.height+c+"px"}}else x()};c((()=>{v(),window.addEventListener("resize",y)}));const y=()=>{v()};d((()=>{window.removeEventListener("resize",y)}));const x=()=>{i.step>=3?w():(i.step=i.step+1,v())},w=function(){var t=s((function*(){a.value?a.value.courseware=!0:a.value={courseware:!0};try{yield R({guideTag:"guideInfo",guideValue:JSON.stringify(a.value)})}catch(t){console.log(t)}r.value=!1}));return function(){return t.apply(this,arguments)}}();return()=>o(p,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",O.guidePopup],show:r.value,"onUpdate:show":t=>r.value=t},{default:()=>[o("div",{class:O.content,onClick:()=>x()},[i.step!=i.steps.length-1&&o("div",{class:O.backBtn,onClick:t=>{t.stopPropagation(),w()}},[u("跳过")]),o("div",{class:O.box,style:n(n({},i.box),i.steps[i.step].boxStyle),id:`modeType-${i.step}`},[i.steps.map(((t,e)=>{var n,r;return o("div",{onClick:t=>t.stopPropagation(),class:O.item,style:{display:e===i.step?"":"none",left:`${null===(n=t.eleRect)||void 0===n?void 0:n.left}px`,top:`${null===(r=t.eleRect)||void 0===r?void 0:r.top}px`}},[o("img",{class:O.img,style:t.imgStyle,src:t.img},null),o("img",{class:O.iconHead,style:t.handStyle,src:j("indexDot.png")},null),o("div",{class:O.btns,style:t.btnsStyle},[i.step+1==i.steps.length?o(g,null,[o(f,{class:[O.btn],round:!0,type:"primary",onClick:()=>w()},{default:()=>[u("完成")]}),o(f,{class:[O.btn,O.endBtn],round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{i.step=0,v()}},{default:()=>[u("再看一遍")]})]):o(f,{class:O.btn,round:!0,type:"primary",onClick:()=>x()},{default:()=>[u("下一步 ("),i.step+1,u("/"),i.steps.length,u(")")]})])])}))])])]})}});/*! jQuery v1.7 jquery.com | jquery.org/license */!function(t,e){function i(t){return E.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}function n(t){if(!de[t]){var e=C.body,i=E("<"+t+">").appendTo(e),n=i.css("display");i.remove(),"none"!==n&&""!==n||(oe||((oe=C.createElement("iframe")).frameBorder=oe.width=oe.height=0),e.appendChild(oe),le&&oe.createElement||((le=(oe.contentWindow||oe.contentDocument).document).write(("CSS1Compat"===C.compatMode?"<!doctype html>":"")+"<html><body>"),le.close()),i=le.createElement(t),le.body.appendChild(i),n=E.css(i,"display"),e.removeChild(oe)),de[t]=n}return de[t]}function r(t,e){var i={};return E.each(ge.concat.apply([],ge.slice(0,e)),(function(){i[this]=t})),i}function a(){ce=e}function s(){return setTimeout(a,0),ce=E.now()}function o(){try{return new t.XMLHttpRequest}catch(e){}}function l(t,e,i,n){if(E.isArray(e))E.each(e,(function(e,r){i||Rt.test(t)?n(t,r):l(t+"["+("object"==typeof r||E.isArray(r)?e:"")+"]",r,i,n)}));else if(i||null==e||"object"!=typeof e)n(t,e);else for(var r in e)l(t+"["+r+"]",e[r],i,n)}function h(t,i){var n,r,a=E.ajaxSettings.flatOptions||{};for(n in i)i[n]!==e&&((a[n]?t:r||(r={}))[n]=i[n]);r&&E.extend(!0,t,r)}function c(t,i,n,r,a,s){(s=s||{})[a=a||i.dataTypes[0]]=!0;for(var o,l=t[a],h=0,d=l?l.length:0,p=t===Jt;h<d&&(p||!o);h++)"string"==typeof(o=l[h](i,n,r))&&(!p||s[o]?o=e:(i.dataTypes.unshift(o),o=c(t,i,n,r,o,s)));return(p||!o)&&!s["*"]&&(o=c(t,i,n,r,"*",s)),o}function d(t){return function(e,i){if("string"!=typeof e&&(i=e,e="*"),E.isFunction(i))for(var n,r,a=e.toLowerCase().split(Yt),s=0,o=a.length;s<o;s++)n=a[s],(r=/^\+/.test(n))&&(n=n.substr(1)||"*"),(t[n]=t[n]||[])[r?"unshift":"push"](i)}}function p(t,e,i){var n="width"===e?t.offsetWidth:t.offsetHeight,r="width"===e?Lt:Ft;return n>0?("border"!==i&&E.each(r,(function(){i||(n-=parseFloat(E.css(t,"padding"+this))||0),"margin"===i?n+=parseFloat(E.css(t,i+this))||0:n-=parseFloat(E.css(t,"border"+this+"Width"))||0})),n+"px"):(((n=Pt(t,e,e))<0||null==n)&&(n=t.style[e]||0),n=parseFloat(n)||0,i&&E.each(r,(function(){n+=parseFloat(E.css(t,"padding"+this))||0,"padding"!==i&&(n+=parseFloat(E.css(t,"border"+this+"Width"))||0),"margin"===i&&(n+=parseFloat(E.css(t,i+this))||0)})),n+"px")}function u(t,e){e.src?E.ajax({url:e.src,async:!1,dataType:"script"}):E.globalEval((e.text||e.textContent||e.innerHTML||"").replace(bt,"/*$0*/")),e.parentNode&&e.parentNode.removeChild(e)}function g(t){var e=(t.nodeName||"").toLowerCase();"input"===e?f(t):"script"!==e&&void 0!==t.getElementsByTagName&&E.grep(t.getElementsByTagName("input"),f)}function f(t){"checkbox"!==t.type&&"radio"!==t.type||(t.defaultChecked=t.checked)}function m(t){return void 0!==t.getElementsByTagName?t.getElementsByTagName("*"):void 0!==t.querySelectorAll?t.querySelectorAll("*"):[]}function v(t,e){var i;1===e.nodeType&&(e.clearAttributes&&e.clearAttributes(),e.mergeAttributes&&e.mergeAttributes(t),"object"===(i=e.nodeName.toLowerCase())?e.outerHTML=t.outerHTML:"input"!==i||"checkbox"!==t.type&&"radio"!==t.type?"option"===i?e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue):(t.checked&&(e.defaultChecked=e.checked=t.checked),e.value!==t.value&&(e.value=t.value)),e.removeAttribute(E.expando))}function y(t,e){if(1===e.nodeType&&E.hasData(t)){var i,n,r,a=E._data(t),s=E._data(e,a),o=a.events;if(o)for(i in delete s.handle,s.events={},o)for(n=0,r=o[i].length;n<r;n++)E.event.add(e,i+(o[i][n].namespace?".":"")+o[i][n].namespace,o[i][n],o[i][n].data);s.data&&(s.data=E.extend({},s.data))}}function x(t,e){return E.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function w(t){var e=ht.split(" "),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function b(t,e,i){if(e=e||0,E.isFunction(e))return E.grep(t,(function(t,n){return!!e.call(t,n,t)===i}));if(e.nodeType)return E.grep(t,(function(t,n){return t===e===i}));if("string"==typeof e){var n=E.grep(t,(function(t){return 1===t.nodeType}));if(at.test(e))return E.filter(e,n,!i);e=E.filter(e,n)}return E.grep(t,(function(t,n){return E.inArray(t,e)>=0===i}))}function _(t){return!t||!t.parentNode||11===t.parentNode.nodeType}function A(){return!0}function P(){return!1}function S(t,e,i){var n=e+"defer",r=e+"queue",a=e+"mark",s=E._data(t,n);s&&("queue"===i||!E._data(t,r))&&("mark"===i||!E._data(t,a))&&setTimeout((function(){!E._data(t,r)&&!E._data(t,a)&&(E.removeData(t,n,!0),s.fire())}),0)}function T(t){for(var e in t)if(("data"!==e||!E.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function k(t,i,n){if(n===e&&1===t.nodeType){var r="data-"+i.replace(F,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:E.isNumeric(n)?parseFloat(n):L.test(n)?E.parseJSON(n):n)}catch(N){}E.data(t,i,n)}else n=e}return n}var C=t.document,M=t.navigator,D=t.location,E=function(){function i(){if(!o.isReady){try{C.documentElement.doScroll("left")}catch(t){return void setTimeout(i,1)}o.ready()}}var n,r,a,s,o=function(t,e){return new o.fn.init(t,e,n)},l=t.jQuery,h=t.$,c=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,d=/\S/,p=/^\s+/,u=/\s+$/,g=/\d/,f=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,m=/^[\],:{}\s]*$/,v=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,y=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,x=/(?:^|:|,)(?:\s*\[)+/g,w=/(webkit)[ \/]([\w.]+)/,b=/(opera)(?:.*version)?[ \/]([\w.]+)/,_=/(msie) ([\w.]+)/,A=/(mozilla)(?:.*? rv:([\w.]+))?/,P=/-([a-z]|[0-9])/gi,S=/^-ms-/,T=function(t,e){return(e+"").toUpperCase()},k=M.userAgent,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,N=Array.prototype.push,I=Array.prototype.slice,L=String.prototype.trim,F=Array.prototype.indexOf,j={};return o.fn=o.prototype={constructor:o,init:function(t,i,n){var r,a,s,l;if(!t)return this;if(t.nodeType)return this.context=this[0]=t,this.length=1,this;if("body"===t&&!i&&C.body)return this.context=C,this[0]=C.body,this.selector=t,this.length=1,this;if("string"==typeof t){if((r="<"!==t.charAt(0)||">"!==t.charAt(t.length-1)||t.length<3?c.exec(t):[null,t,null])&&(r[1]||!i)){if(r[1])return l=(i=i instanceof o?i[0]:i)?i.ownerDocument||i:C,(s=f.exec(t))?o.isPlainObject(i)?(t=[C.createElement(s[1])],o.fn.attr.call(t,i,!0)):t=[l.createElement(s[1])]:t=((s=o.buildFragment([r[1]],[l])).cacheable?o.clone(s.fragment):s.fragment).childNodes,o.merge(this,t);if((a=C.getElementById(r[2]))&&a.parentNode){if(a.id!==r[2])return n.find(t);this.length=1,this[0]=a}return this.context=C,this.selector=t,this}return!i||i.jquery?(i||n).find(t):this.constructor(i).find(t)}return o.isFunction(t)?n.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),o.makeArray(t,this))},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return I.call(this,0)},get:function(t){return null==t?this.toArray():t<0?this[this.length+t]:this[t]},pushStack:function(t,e,i){var n=this.constructor();return o.isArray(t)?N.apply(n,t):o.merge(n,t),n.prevObject=this,n.context=this.context,"find"===e?n.selector=this.selector+(this.selector?" ":"")+i:e&&(n.selector=this.selector+"."+e+"("+i+")"),n},each:function(t,e){return o.each(this,t,e)},ready:function(t){return o.bindReady(),a.add(t),this},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(I.apply(this,arguments),"slice",I.call(arguments).join(","))},map:function(t){return this.pushStack(o.map(this,(function(e,i){return t.call(e,i,e)})))},end:function(){return this.prevObject||this.constructor(null)},push:N,sort:[].sort,splice:[].splice},o.fn.init.prototype=o.fn,o.extend=o.fn.extend=function(){var t,i,n,r,a,s,l=arguments[0]||{},h=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},h=2),"object"!=typeof l&&!o.isFunction(l)&&(l={}),c===h&&(l=this,--h);h<c;h++)if(null!=(t=arguments[h]))for(i in t)n=l[i],l!==(r=t[i])&&(d&&r&&(o.isPlainObject(r)||(a=o.isArray(r)))?(a?(a=!1,s=n&&o.isArray(n)?n:[]):s=n&&o.isPlainObject(n)?n:{},l[i]=o.extend(d,s,r)):r!==e&&(l[i]=r));return l},o.extend({noConflict:function(e){return t.$===o&&(t.$=h),e&&t.jQuery===o&&(t.jQuery=l),o},isReady:!1,readyWait:1,holdReady:function(t){t?o.readyWait++:o.ready(!0)},ready:function(t){if(!0===t&&!--o.readyWait||!0!==t&&!o.isReady){if(!C.body)return setTimeout(o.ready,1);if(o.isReady=!0,!0!==t&&--o.readyWait>0)return;a.fireWith(C,[o]),o.fn.trigger&&o(C).trigger("ready").unbind("ready")}},bindReady:function(){if(!a){if(a=o.Callbacks("once memory"),"complete"===C.readyState)return setTimeout(o.ready,1);if(C.addEventListener)C.addEventListener("DOMContentLoaded",s,!1),t.addEventListener("load",o.ready,!1);else if(C.attachEvent){C.attachEvent("onreadystatechange",s),t.attachEvent("onload",o.ready);var e=!1;try{e=null==t.frameElement}catch(M){}C.documentElement.doScroll&&e&&i()}}},isFunction:function(t){return"function"===o.type(t)},isArray:Array.isArray||function(t){return"array"===o.type(t)},isWindow:function(t){return t&&"object"==typeof t&&"setInterval"in t},isNumeric:function(t){return null!=t&&g.test(t)&&!isNaN(t)},type:function(t){return null==t?String(t):j[D.call(t)]||"object"},isPlainObject:function(t){if(!t||"object"!==o.type(t)||t.nodeType||o.isWindow(t))return!1;try{if(t.constructor&&!E.call(t,"constructor")&&!E.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(C){return!1}var i;for(i in t);return i===e||E.call(t,i)},isEmptyObject:function(t){for(var e in t)return!1;return!0},error:function(t){throw t},parseJSON:function(e){return"string"==typeof e&&e?(e=o.trim(e),t.JSON&&t.JSON.parse?t.JSON.parse(e):m.test(e.replace(v,"@").replace(y,"]").replace(x,""))?new Function("return "+e)():void o.error("Invalid JSON: "+e)):null},parseXML:function(i){var n;try{t.DOMParser?n=(new DOMParser).parseFromString(i,"text/xml"):((n=new ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(i))}catch(h){n=e}return(!n||!n.documentElement||n.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+i),n},noop:function(){},globalEval:function(e){e&&d.test(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(S,"ms-").replace(P,T)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toUpperCase()===e.toUpperCase()},each:function(t,i,n){var r,a=0,s=t.length,l=s===e||o.isFunction(t);if(n)if(l){for(r in t)if(!1===i.apply(t[r],n))break}else for(;a<s&&!1!==i.apply(t[a++],n););else if(l){for(r in t)if(!1===i.call(t[r],r,t[r]))break}else for(;a<s&&!1!==i.call(t[a],a,t[a++]););return t},trim:L?function(t){return null==t?"":L.call(t)}:function(t){return null==t?"":(t+"").replace(p,"").replace(u,"")},makeArray:function(t,e){var i=e||[];if(null!=t){var n=o.type(t);null==t.length||"string"===n||"function"===n||"regexp"===n||o.isWindow(t)?N.call(i,t):o.merge(i,t)}return i},inArray:function(t,e,i){var n;if(e){if(F)return F.call(e,t,i);for(n=e.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,i){var n=t.length,r=0;if("number"==typeof i.length)for(var a=i.length;r<a;r++)t[n++]=i[r];else for(;i[r]!==e;)t[n++]=i[r++];return t.length=n,t},grep:function(t,e,i){var n=[];i=!!i;for(var r=0,a=t.length;r<a;r++)i!==!!e(t[r],r)&&n.push(t[r]);return n},map:function(t,i,n){var r,a,s=[],l=0,h=t.length;if(t instanceof o||h!==e&&"number"==typeof h&&(h>0&&t[0]&&t[h-1]||0===h||o.isArray(t)))for(;l<h;l++)null!=(r=i(t[l],l,n))&&(s[s.length]=r);else for(a in t)null!=(r=i(t[a],a,n))&&(s[s.length]=r);return s.concat.apply([],s)},guid:1,proxy:function(t,i){if("string"==typeof i){var n=t[i];i=t,t=n}if(!o.isFunction(t))return e;var r=I.call(arguments,2),a=function(){return t.apply(i,r.concat(I.call(arguments)))};return a.guid=t.guid=t.guid||a.guid||o.guid++,a},access:function(t,i,n,r,a,s){var l=t.length;if("object"==typeof i){for(var h in i)o.access(t,h,i[h],r,a,n);return t}if(n!==e){r=!s&&r&&o.isFunction(n);for(var c=0;c<l;c++)a(t[c],i,r?n.call(t[c],c,a(t[c],i)):n,s);return t}return l?a(t[0],i):e},now:function(){return(new Date).getTime()},uaMatch:function(t){t=t.toLowerCase();var e=w.exec(t)||b.exec(t)||_.exec(t)||t.indexOf("compatible")<0&&A.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},sub:function(){function t(e,i){return new t.fn.init(e,i)}o.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(i,n){return n&&n instanceof o&&!(n instanceof t)&&(n=t(n)),o.fn.init.call(this,i,n,e)},t.fn.init.prototype=t.fn;var e=t(C);return t},browser:{}}),o.each("Boolean Number String Function Array Date RegExp Object".split(" "),(function(t,e){j["[object "+e+"]"]=e.toLowerCase()})),(r=o.uaMatch(k)).browser&&(o.browser[r.browser]=!0,o.browser.version=r.version),o.browser.webkit&&(o.browser.safari=!0),d.test(" ")&&(p=/^[\s\xA0]+/,u=/[\s\xA0]+$/),n=o(C),C.addEventListener?s=function(){C.removeEventListener("DOMContentLoaded",s,!1),o.ready()}:C.attachEvent&&(s=function(){"complete"===C.readyState&&(C.detachEvent("onreadystatechange",s),o.ready())}),"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],(function(){return o})),o}(),N={};E.Callbacks=function(t){t=t?N[t]||function(t){var e,i,n=N[t]={};for(e=0,i=(t=t.split(/\s+/)).length;e<i;e++)n[t[e]]=!0;return n}(t):{};var i,n,r,a,s,o=[],l=[],h=function(e){var i,n,r,a;for(i=0,n=e.length;i<n;i++)r=e[i],"array"===(a=E.type(r))?h(r):"function"===a&&(!t.unique||!d.has(r))&&o.push(r)},c=function(e,h){for(h=h||[],i=!t.memory||[e,h],n=!0,s=r||0,r=0,a=o.length;o&&s<a;s++)if(!1===o[s].apply(e,h)&&t.stopOnFalse){i=!0;break}n=!1,o&&(t.once?!0===i?d.disable():o=[]:l&&l.length&&(i=l.shift(),d.fireWith(i[0],i[1])))},d={add:function(){if(o){var t=o.length;h(arguments),n?a=o.length:i&&!0!==i&&(r=t,c(i[0],i[1]))}return this},remove:function(){if(o)for(var e=arguments,i=0,r=e.length;i<r;i++)for(var l=0;l<o.length&&(e[i]!==o[l]||(n&&l<=a&&(a--,l<=s&&s--),o.splice(l--,1),!t.unique));l++);return this},has:function(t){if(o)for(var e=0,i=o.length;e<i;e++)if(t===o[e])return!0;return!1},empty:function(){return o=[],this},disable:function(){return o=l=i=e,this},disabled:function(){return!o},lock:function(){return l=e,(!i||!0===i)&&d.disable(),this},locked:function(){return!l},fireWith:function(e,r){return l&&(n?t.once||l.push([e,r]):(!t.once||!i)&&c(e,r)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d};var I=[].slice;E.extend({Deferred:function(t){var e,i=E.Callbacks("once memory"),n=E.Callbacks("once memory"),r=E.Callbacks("memory"),a="pending",s={resolve:i,reject:n,notify:r},o={done:i.add,fail:n.add,progress:r.add,state:function(){return a},isResolved:i.fired,isRejected:n.fired,then:function(t,e,i){return l.done(t).fail(e).progress(i),this},always:function(){return l.done.apply(l,arguments).fail.apply(l,arguments)},pipe:function(t,e,i){return E.Deferred((function(n){E.each({done:[t,"resolve"],fail:[e,"reject"],progress:[i,"notify"]},(function(t,e){var i,r=e[0],a=e[1];E.isFunction(r)?l[t]((function(){(i=r.apply(this,arguments))&&E.isFunction(i.promise)?i.promise().then(n.resolve,n.reject,n.notify):n[a+"With"](this===l?n:this,[i])})):l[t](n[a])}))})).promise()},promise:function(t){if(null==t)t=o;else for(var e in o)t[e]=o[e];return t}},l=o.promise({});for(e in s)l[e]=s[e].fire,l[e+"With"]=s[e].fireWith;return l.done((function(){a="resolved"}),n.disable,r.lock).fail((function(){a="rejected"}),i.disable,r.lock),t&&t.call(l,l),l},when:function(t){function e(t){return function(e){s[t]=arguments.length>1?I.call(arguments,0):e,l.notifyWith(h,s)}}function i(t){return function(e){n[t]=arguments.length>1?I.call(arguments,0):e,--o||l.resolveWith(l,n)}}var n=I.call(arguments,0),r=0,a=n.length,s=Array(a),o=a,l=a<=1&&t&&E.isFunction(t.promise)?t:E.Deferred(),h=l.promise();if(a>1){for(;r<a;r++)n[r]&&n[r].promise&&E.isFunction(n[r].promise)?n[r].promise().then(i(r),l.reject,e(r)):--o;o||l.resolveWith(l,n)}else l!==t&&l.resolveWith(l,a?[t]:[]);return h}}),E.support=function(){var t,e,i,n,r,a,s,o,l,h,c,d,p,u,g,f,m=C.createElement("div"),v=C.documentElement;if(m.setAttribute("className","t"),m.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",t=m.getElementsByTagName("*"),e=m.getElementsByTagName("a")[0],!t||!t.length||!e)return{};n=(i=C.createElement("select")).appendChild(C.createElement("option")),r=m.getElementsByTagName("input")[0],s={leadingWhitespace:3===m.firstChild.nodeType,tbody:!m.getElementsByTagName("tbody").length,htmlSerialize:!!m.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:"/a"===e.getAttribute("href"),opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!m.getElementsByTagName("nav").length,checkOn:"on"===r.value,optSelected:n.selected,getSetAttribute:"t"!==m.className,enctype:!!C.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},r.checked=!0,s.noCloneChecked=r.cloneNode(!0).checked,i.disabled=!0,s.optDisabled=!n.disabled;try{delete m.test}catch(V){s.deleteExpando=!1}for(g in!m.addEventListener&&m.attachEvent&&m.fireEvent&&(m.attachEvent("onclick",(function(){s.noCloneEvent=!1})),m.cloneNode(!0).fireEvent("onclick")),(r=C.createElement("input")).value="t",r.setAttribute("type","radio"),s.radioValue="t"===r.value,r.setAttribute("checked","checked"),m.appendChild(r),(o=C.createDocumentFragment()).appendChild(m.lastChild),s.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,m.innerHTML="",m.style.width=m.style.paddingLeft="1px",l=C.getElementsByTagName("body")[0],c=C.createElement(l?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},l&&E.extend(d,{position:"absolute",left:"-999px",top:"-999px"}),d)c.style[g]=d[g];if(c.appendChild(m),(h=l||v).insertBefore(c,h.firstChild),s.appendChecked=r.checked,s.boxModel=2===m.offsetWidth,"zoom"in m.style&&(m.style.display="inline",m.style.zoom=1,s.inlineBlockNeedsLayout=2===m.offsetWidth,m.style.display="",m.innerHTML="<div style='width:4px;'></div>",s.shrinkWrapBlocks=2!==m.offsetWidth),m.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",f=0===(p=m.getElementsByTagName("td"))[0].offsetHeight,p[0].style.display="",p[1].style.display="none",s.reliableHiddenOffsets=f&&0===p[0].offsetHeight,m.innerHTML="",C.defaultView&&C.defaultView.getComputedStyle&&((a=C.createElement("div")).style.width="0",a.style.marginRight="0",m.appendChild(a),s.reliableMarginRight=0===(parseInt((C.defaultView.getComputedStyle(a,null)||{marginRight:0}).marginRight,10)||0)),m.attachEvent)for(g in{submit:1,change:1,focusin:1})(f=(u="on"+g)in m)||(m.setAttribute(u,"return;"),f="function"==typeof m[u]),s[g+"Bubbles"]=f;return E((function(){var t,e,i,n,r,a="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",o="visibility:hidden;border:0;",h="style='"+a+"border:5px solid #000;padding:0;'",d="<div "+h+"><div></div></div><table "+h+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";!(l=C.getElementsByTagName("body")[0])||((t=C.createElement("div")).style.cssText=o+"width:0;height:0;position:static;top:0;margin-top:1px",l.insertBefore(t,l.firstChild),(c=C.createElement("div")).style.cssText=a+o,c.innerHTML=d,t.appendChild(c),i=(e=c.firstChild).firstChild,n=e.nextSibling.firstChild.firstChild,r={doesNotAddBorder:5!==i.offsetTop,doesAddBorderForTableAndCells:5===n.offsetTop},i.style.position="fixed",i.style.top="20px",r.fixedPosition=20===i.offsetTop||15===i.offsetTop,i.style.position=i.style.top="",e.style.overflow="hidden",e.style.position="relative",r.subtractsBorderForOverflowNotVisible=-5===i.offsetTop,r.doesNotIncludeMarginInBodyOffset=1!==l.offsetTop,l.removeChild(t),c=t=null,E.extend(s,r))})),c.innerHTML="",h.removeChild(c),c=o=i=n=l=a=m=r=null,s}(),E.boxModel=E.support.boxModel;var L=/^(?:\{.*\}|\[.*\])$/,F=/([A-Z])/g;E.extend({cache:{},uuid:0,expando:"jQuery"+(E.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(t){return!!(t=t.nodeType?E.cache[t[E.expando]]:t[E.expando])&&!T(t)},data:function(t,i,n,r){if(E.acceptData(t)){var a,s,o;E.expando;var l="string"==typeof i,h=t.nodeType,c=h?E.cache:t,d=h?t[E.expando]:t[E.expando]&&E.expando,p="events"===i;if((!d||!c[d]||!p&&!r&&!c[d].data)&&l&&n===e)return;return d||(h?t[E.expando]=d=++E.uuid:d=E.expando),c[d]||(c[d]={},h||(c[d].toJSON=E.noop)),"object"!=typeof i&&"function"!=typeof i||(r?c[d]=E.extend(c[d],i):c[d].data=E.extend(c[d].data,i)),a=s=c[d],r||(s.data||(s.data={}),s=s.data),n!==e&&(s[E.camelCase(i)]=n),p&&!s[i]?a.events:(l?null==(o=s[i])&&(o=s[E.camelCase(i)]):o=s,o)}},removeData:function(t,e,i){if(E.acceptData(t)){var n,r,a;E.expando;var s=t.nodeType,o=s?E.cache:t,l=s?t[E.expando]:E.expando;if(!o[l])return;if(e&&(n=i?o[l]:o[l].data)){E.isArray(e)||(e in n?e=[e]:e=(e=E.camelCase(e))in n?[e]:e.split(" "));for(r=0,a=e.length;r<a;r++)delete n[e[r]];if(!(i?T:E.isEmptyObject)(n))return}if(!i&&(delete o[l].data,!T(o[l])))return;E.support.deleteExpando||!o.setInterval?delete o[l]:o[l]=null,s&&(E.support.deleteExpando?delete t[E.expando]:t.removeAttribute?t.removeAttribute(E.expando):t[E.expando]=null)}},_data:function(t,e,i){return E.data(t,e,i,!0)},acceptData:function(t){if(t.nodeName){var e=E.noData[t.nodeName.toLowerCase()];if(e)return!0!==e&&t.getAttribute("classid")===e}return!0}}),E.fn.extend({data:function(t,i){var n,r,a,s=null;if(void 0===t){if(this.length&&(s=E.data(this[0]),1===this[0].nodeType&&!E._data(this[0],"parsedAttrs"))){for(var o=0,l=(r=this[0].attributes).length;o<l;o++)0===(a=r[o].name).indexOf("data-")&&(a=E.camelCase(a.substring(5)),k(this[0],a,s[a]));E._data(this[0],"parsedAttrs",!0)}return s}return"object"==typeof t?this.each((function(){E.data(this,t)})):((n=t.split("."))[1]=n[1]?"."+n[1]:"",i===e?((s=this.triggerHandler("getData"+n[1]+"!",[n[0]]))===e&&this.length&&(s=E.data(this[0],t),s=k(this[0],t,s)),s===e&&n[1]?this.data(n[0]):s):this.each((function(){var e=E(this),r=[n[0],i];e.triggerHandler("setData"+n[1]+"!",r),E.data(this,t,i),e.triggerHandler("changeData"+n[1]+"!",r)})))},removeData:function(t){return this.each((function(){E.removeData(this,t)}))}}),E.extend({_mark:function(t,e){t&&(e=(e||"fx")+"mark",E._data(t,e,(E._data(t,e)||0)+1))},_unmark:function(t,e,i){if(!0!==t&&(i=e,e=t,t=!1),e){var n=(i=i||"fx")+"mark",r=t?0:(E._data(e,n)||1)-1;r?E._data(e,n,r):(E.removeData(e,n,!0),S(e,i,"mark"))}},queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=E._data(t,e),i&&(!n||E.isArray(i)?n=E._data(t,e,E.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=E.queue(t,e),n=i.shift(),r={};"inprogress"===n&&(n=i.shift()),n&&("fx"===e&&i.unshift("inprogress"),E._data(t,e+".run",r),n.call(t,(function(){E.dequeue(t,e)}),r)),i.length||(E.removeData(t,e+"queue "+e+".run",!0),S(t,e,"queue"))}}),E.fn.extend({queue:function(t,i){return"string"!=typeof t&&(i=t,t="fx"),i===e?E.queue(this[0],t):this.each((function(){var e=E.queue(this,t,i);"fx"===t&&"inprogress"!==e[0]&&E.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){E.dequeue(this,t)}))},delay:function(t,e){return t=E.fx&&E.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var n=setTimeout(e,t);i.stop=function(){clearTimeout(n)}}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,i){function n(){--l||a.resolveWith(s,[s])}"string"!=typeof t&&(t=e),t=t||"fx";for(var r,a=E.Deferred(),s=this,o=s.length,l=1,h=t+"defer",c=t+"queue",d=t+"mark";o--;)(r=E.data(s[o],h,e,!0)||(E.data(s[o],c,e,!0)||E.data(s[o],d,e,!0))&&E.data(s[o],h,E.Callbacks("once memory"),!0))&&(l++,r.add(n));return n(),a.promise()}});var j,O,B,R=/[\n\t\r]/g,W=/\s+/,H=/\r/g,z=/^(?:button|input)$/i,q=/^(?:button|input|object|select|textarea)$/i,G=/^a(?:rea)?$/i,U=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=E.support.getSetAttribute;E.fn.extend({attr:function(t,e){return E.access(this,t,e,!0,E.attr)},removeAttr:function(t){return this.each((function(){E.removeAttr(this,t)}))},prop:function(t,e){return E.access(this,t,e,!0,E.prop)},removeProp:function(t){return t=E.propFix[t]||t,this.each((function(){try{this[t]=e,delete this[t]}catch(C){}}))},addClass:function(t){var e,i,n,r,a,s,o;if(E.isFunction(t))return this.each((function(e){E(this).addClass(t.call(this,e,this.className))}));if(t&&"string"==typeof t)for(e=t.split(W),i=0,n=this.length;i<n;i++)if(1===(r=this[i]).nodeType)if(r.className||1!==e.length){for(a=" "+r.className+" ",s=0,o=e.length;s<o;s++)~a.indexOf(" "+e[s]+" ")||(a+=e[s]+" ");r.className=E.trim(a)}else r.className=t;return this},removeClass:function(t){var i,n,r,a,s,o,l;if(E.isFunction(t))return this.each((function(e){E(this).removeClass(t.call(this,e,this.className))}));if(t&&"string"==typeof t||t===e)for(i=(t||"").split(W),n=0,r=this.length;n<r;n++)if(1===(a=this[n]).nodeType&&a.className)if(t){for(s=(" "+a.className+" ").replace(R," "),o=0,l=i.length;o<l;o++)s=s.replace(" "+i[o]+" "," ");a.className=E.trim(s)}else a.className="";return this},toggleClass:function(t,e){var i=typeof t,n="boolean"==typeof e;return E.isFunction(t)?this.each((function(i){E(this).toggleClass(t.call(this,i,this.className,e),e)})):this.each((function(){if("string"===i)for(var r,a=0,s=E(this),o=e,l=t.split(W);r=l[a++];)o=n?o:!s.hasClass(r),s[o?"addClass":"removeClass"](r);else"undefined"!==i&&"boolean"!==i||(this.className&&E._data(this,"__className__",this.className),this.className=this.className||!1===t?"":E._data(this,"__className__")||"")}))},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;i<n;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(R," ").indexOf(e)>-1)return!0;return!1},val:function(t){var i,n,r,a=this[0];return arguments.length?(r=E.isFunction(t),this.each((function(n){var a,s=E(this);1===this.nodeType&&(null==(a=r?t.call(this,n,s.val()):t)?a="":"number"==typeof a?a+="":E.isArray(a)&&(a=E.map(a,(function(t){return null==t?"":t+""}))),(i=E.valHooks[this.nodeName.toLowerCase()]||E.valHooks[this.type])&&"set"in i&&i.set(this,a,"value")!==e||(this.value=a))}))):a?(i=E.valHooks[a.nodeName.toLowerCase()]||E.valHooks[a.type])&&"get"in i&&(n=i.get(a,"value"))!==e?n:"string"==typeof(n=a.value)?n.replace(H,""):null==n?"":n:e}}),E.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){var e,i,n,r,a=t.selectedIndex,s=[],o=t.options,l="select-one"===t.type;if(a<0)return null;for(i=l?a:0,n=l?a+1:o.length;i<n;i++)if((r=o[i]).selected&&(E.support.optDisabled?!r.disabled:null===r.getAttribute("disabled"))&&(!r.parentNode.disabled||!E.nodeName(r.parentNode,"optgroup"))){if(e=E(r).val(),l)return e;s.push(e)}return l&&!s.length&&o.length?E(o[a]).val():s},set:function(t,e){var i=E.makeArray(e);return E(t).find("option").each((function(){this.selected=E.inArray(E(this).val(),i)>=0})),i.length||(t.selectedIndex=-1),i}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(t,i,n,r){var a,s,o,l=t.nodeType;return t&&3!==l&&8!==l&&2!==l?r&&i in E.attrFn?E(t)[i](n):"getAttribute"in t?((o=1!==l||!E.isXMLDoc(t))&&(i=i.toLowerCase(),s=E.attrHooks[i]||(U.test(i)?O:j)),n!==e?null===n?(E.removeAttr(t,i),e):s&&"set"in s&&o&&(a=s.set(t,n,i))!==e?a:(t.setAttribute(i,""+n),n):s&&"get"in s&&o&&null!==(a=s.get(t,i))?a:null===(a=t.getAttribute(i))?e:a):E.prop(t,i,n):e},removeAttr:function(t,e){var i,n,r,a,s=0;if(1===t.nodeType)for(a=(n=(e||"").split(W)).length;s<a;s++)r=n[s].toLowerCase(),i=E.propFix[r]||r,E.attr(t,r,""),t.removeAttribute(V?r:i),U.test(r)&&i in t&&(t[i]=!1)},attrHooks:{type:{set:function(t,e){if(z.test(t.nodeName)&&t.parentNode)E.error("type property can't be changed");else if(!E.support.radioValue&&"radio"===e&&E.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}},value:{get:function(t,e){return j&&E.nodeName(t,"button")?j.get(t,e):e in t?t.value:null},set:function(t,e,i){if(j&&E.nodeName(t,"button"))return j.set(t,e,i);t.value=e}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(t,i,n){var r,a,s=t.nodeType;return t&&3!==s&&8!==s&&2!==s?((1!==s||!E.isXMLDoc(t))&&(i=E.propFix[i]||i,a=E.propHooks[i]),n!==e?a&&"set"in a&&(r=a.set(t,n,i))!==e?r:t[i]=n:a&&"get"in a&&null!==(r=a.get(t,i))?r:t[i]):e},propHooks:{tabIndex:{get:function(t){var i=t.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):q.test(t.nodeName)||G.test(t.nodeName)&&t.href?0:e}}}}),E.attrHooks.tabindex=E.propHooks.tabIndex,O={get:function(t,i){var n,r=E.prop(t,i);return!0===r||"boolean"!=typeof r&&(n=t.getAttributeNode(i))&&!1!==n.nodeValue?i.toLowerCase():e},set:function(t,e,i){var n;return!1===e?E.removeAttr(t,i):((n=E.propFix[i]||i)in t&&(t[n]=!0),t.setAttribute(i,i.toLowerCase())),i}},V||(B={name:!0,id:!0},j=E.valHooks.button={get:function(t,i){var n;return(n=t.getAttributeNode(i))&&(B[i]?""!==n.nodeValue:n.specified)?n.nodeValue:e},set:function(t,e,i){var n=t.getAttributeNode(i);return n||(n=C.createAttribute(i),t.setAttributeNode(n)),n.nodeValue=e+""}},E.attrHooks.tabindex.set=j.set,E.each(["width","height"],(function(t,e){E.attrHooks[e]=E.extend(E.attrHooks[e],{set:function(t,i){if(""===i)return t.setAttribute(e,"auto"),i}})})),E.attrHooks.contenteditable={get:j.get,set:function(t,e,i){""===e&&(e="false"),j.set(t,e,i)}}),E.support.hrefNormalized||E.each(["href","src","width","height"],(function(t,i){E.attrHooks[i]=E.extend(E.attrHooks[i],{get:function(t){var n=t.getAttribute(i,2);return null===n?e:n}})})),E.support.style||(E.attrHooks.style={get:function(t){return t.style.cssText.toLowerCase()||e},set:function(t,e){return t.style.cssText=""+e}}),E.support.optSelected||(E.propHooks.selected=E.extend(E.propHooks.selected,{get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}})),E.support.enctype||(E.propFix.enctype="encoding"),E.support.checkOn||E.each(["radio","checkbox"],(function(){E.valHooks[this]={get:function(t){return null===t.getAttribute("value")?"on":t.value}}})),E.each(["radio","checkbox"],(function(){E.valHooks[this]=E.extend(E.valHooks[this],{set:function(t,e){if(E.isArray(e))return t.checked=E.inArray(E(t).val(),e)>=0}})}));var X=/^(?:textarea|input|select)$/i,K=/^([^\.]*)?(?:\.(.+))?$/,Y=/\bhover(\.\S+)?/,Q=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(t){var e=$.exec(t);return e&&(e[1]=(e[1]||"").toLowerCase(),e[3]=e[3]&&new RegExp("(?:^|\\s)"+e[3]+"(?:\\s|$)")),e},tt=function(t,e){return(!e[1]||t.nodeName.toLowerCase()===e[1])&&(!e[2]||t.id===e[2])&&(!e[3]||e[3].test(t.className))},et=function(t){return E.event.special.hover?t:t.replace(Y,"mouseenter$1 mouseleave$1")};E.event={add:function(t,i,n,r,a){var s,o,l,h,c,d,p,u,g,f,m;if(3!==t.nodeType&&8!==t.nodeType&&i&&n&&(s=E._data(t))){for(n.handler&&(n=(g=n).handler),n.guid||(n.guid=E.guid++),(l=s.events)||(s.events=l={}),(o=s.handle)||(s.handle=o=function(t){return void 0===E||t&&E.event.triggered===t.type?e:E.event.dispatch.apply(o.elem,arguments)},o.elem=t),i=et(i).split(" "),h=0;h<i.length;h++)d=(c=K.exec(i[h])||[])[1],p=(c[2]||"").split(".").sort(),m=E.event.special[d]||{},d=(a?m.delegateType:m.bindType)||d,m=E.event.special[d]||{},u=E.extend({type:d,origType:c[1],data:r,handler:n,guid:n.guid,selector:a,namespace:p.join(".")},g),a&&(u.quick=J(a),!u.quick&&E.expr.match.POS.test(a)&&(u.isPositional=!0)),(f=l[d])||((f=l[d]=[]).delegateCount=0,m.setup&&!1!==m.setup.call(t,r,p,o)||(t.addEventListener?t.addEventListener(d,o,!1):t.attachEvent&&t.attachEvent("on"+d,o))),m.add&&(m.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),a?f.splice(f.delegateCount++,0,u):f.push(u),E.event.global[d]=!0;t=null}},global:{},remove:function(t,e,i,n){var r,a,s,o,l,h,c,d,p,u,g,f=E.hasData(t)&&E._data(t);if(f&&(c=f.events)){for(e=et(e||"").split(" "),r=0;r<e.length;r++){if(s=(a=K.exec(e[r])||[])[1],o=a[2],!s){for(h in o=o?"."+o:"",c)E.event.remove(t,h+o,i,n);return}if(d=E.event.special[s]||{},l=(u=c[s=(n?d.delegateType:d.bindType)||s]||[]).length,o=o?new RegExp("(^|\\.)"+o.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null,i||o||n||d.remove)for(h=0;h<u.length;h++)g=u[h],i&&i.guid!==g.guid||o&&!o.test(g.namespace)||(!n||n===g.selector||"**"===n&&g.selector)&&(u.splice(h--,1),g.selector&&u.delegateCount--,d.remove&&d.remove.call(t,g));else u.length=0;0===u.length&&l!==u.length&&((!d.teardown||!1===d.teardown.call(t,o))&&E.removeEvent(t,s,f.handle),delete c[s])}E.isEmptyObject(c)&&((p=f.handle)&&(p.elem=null),E.removeData(t,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(i,n,r,a){if(!r||3!==r.nodeType&&8!==r.nodeType){var s,o,l,h,c,d,p,u,g,f,m=i.type||i,v=[];if(m.indexOf("!")>=0&&(m=m.slice(0,-1),o=!0),m.indexOf(".")>=0&&(v=m.split("."),m=v.shift(),v.sort()),(!r||E.event.customEvent[m])&&!E.event.global[m])return;if((i="object"==typeof i?i[E.expando]?i:new E.Event(m,i):new E.Event(m)).type=m,i.isTrigger=!0,i.exclusive=o,i.namespace=v.join("."),i.namespace_re=i.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,d=m.indexOf(":")<0?"on"+m:"",(a||!r)&&i.preventDefault(),!r){for(l in s=E.cache)s[l].events&&s[l].events[m]&&E.event.trigger(i,n,s[l].handle.elem,!0);return}if(i.result=e,i.target||(i.target=r),(n=null!=n?E.makeArray(n):[]).unshift(i),(p=E.event.special[m]||{}).trigger&&!1===p.trigger.apply(r,n))return;if(g=[[r,p.bindType||m]],!a&&!p.noBubble&&!E.isWindow(r)){for(f=p.delegateType||m,c=null,h=r.parentNode;h;h=h.parentNode)g.push([h,f]),c=h;c&&c===r.ownerDocument&&g.push([c.defaultView||c.parentWindow||t,f])}for(l=0;l<g.length&&(h=g[l][0],i.type=g[l][1],(u=(E._data(h,"events")||{})[i.type]&&E._data(h,"handle"))&&u.apply(h,n),(u=d&&h[d])&&E.acceptData(h)&&u.apply(h,n),!i.isPropagationStopped());l++);return i.type=m,i.isDefaultPrevented()||(!p._default||!1===p._default.apply(r.ownerDocument,n))&&("click"!==m||!E.nodeName(r,"a"))&&E.acceptData(r)&&d&&r[m]&&("focus"!==m&&"blur"!==m||0!==i.target.offsetWidth)&&!E.isWindow(r)&&((c=r[d])&&(r[d]=null),E.event.triggered=m,r[m](),E.event.triggered=e,c&&(r[d]=c)),i.result}},dispatch:function(i){i=E.event.fix(i||t.event);var n,r,a,s,o,l,h,c,d,p,u=(E._data(this,"events")||{})[i.type]||[],g=u.delegateCount,f=[].slice.call(arguments,0),m=!i.exclusive&&!i.namespace,v=(E.event.special[i.type]||{}).handle,y=[];if(f[0]=i,i.delegateTarget=this,g&&!i.target.disabled&&(!i.button||"click"!==i.type))for(a=i.target;a!=this;a=a.parentNode||this){for(o={},h=[],n=0;n<g;n++)p=o[d=(c=u[n]).selector],c.isPositional?p=(p||(o[d]=E(d))).index(a)>=0:p===e&&(p=o[d]=c.quick?tt(a,c.quick):E(a).is(d)),p&&h.push(c);h.length&&y.push({elem:a,matches:h})}for(u.length>g&&y.push({elem:this,matches:u.slice(g)}),n=0;n<y.length&&!i.isPropagationStopped();n++)for(l=y[n],i.currentTarget=l.elem,r=0;r<l.matches.length&&!i.isImmediatePropagationStopped();r++)c=l.matches[r],(m||!i.namespace&&!c.namespace||i.namespace_re&&i.namespace_re.test(c.namespace))&&(i.data=c.data,i.handleObj=c,(s=(v||c.handler).apply(l.elem,f))!==e&&(i.result=s,!1===s&&(i.preventDefault(),i.stopPropagation())));return i.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(t,i){var n,r,a,s=i.button,o=i.fromElement;return null==t.pageX&&null!=i.clientX&&(r=(n=t.target.ownerDocument||C).documentElement,a=n.body,t.pageX=i.clientX+(r&&r.scrollLeft||a&&a.scrollLeft||0)-(r&&r.clientLeft||a&&a.clientLeft||0),t.pageY=i.clientY+(r&&r.scrollTop||a&&a.scrollTop||0)-(r&&r.clientTop||a&&a.clientTop||0)),!t.relatedTarget&&o&&(t.relatedTarget=o===t.target?i.toElement:o),!t.which&&s!==e&&(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[E.expando])return t;var i,n,r=t,a=E.event.fixHooks[t.type]||{},s=a.props?this.props.concat(a.props):this.props;for(t=E.Event(r),i=s.length;i;)t[n=s[--i]]=r[n];return t.target||(t.target=r.srcElement||C),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey===e&&(t.metaKey=t.ctrlKey),a.filter?a.filter(t,r):t},special:{ready:{setup:E.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(t,e,i){E.isWindow(this)&&(this.onbeforeunload=i)},teardown:function(t,e){this.onbeforeunload===e&&(this.onbeforeunload=null)}}},simulate:function(t,e,i,n){var r=E.extend(new E.Event,i,{type:t,isSimulated:!0,originalEvent:{}});n?E.event.trigger(r,null,e):E.event.dispatch.call(e,r),r.isDefaultPrevented()&&i.preventDefault()}},E.event.handle=E.event.dispatch,E.removeEvent=C.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i,!1)}:function(t,e,i){t.detachEvent&&t.detachEvent("on"+e,i)},E.Event=function(t,e){if(!(this instanceof E.Event))return new E.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||!1===t.returnValue||t.getPreventDefault&&t.getPreventDefault()?A:P):this.type=t,e&&E.extend(this,e),this.timeStamp=t&&t.timeStamp||E.now(),this[E.expando]=!0},E.Event.prototype={preventDefault:function(){this.isDefaultPrevented=A;var t=this.originalEvent;!t||(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=A;var t=this.originalEvent;!t||(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=A,this.stopPropagation()},isDefaultPrevented:P,isPropagationStopped:P,isImmediatePropagationStopped:P},E.each({mouseenter:"mouseover",mouseleave:"mouseout"},(function(t,e){E.event.special[t]=E.event.special[e]={delegateType:e,bindType:e,handle:function(t){var e,i,n=t.relatedTarget,r=t.handleObj;return r.selector,n&&r.origType!==t.type&&(n===this||E.contains(this,n))||(e=t.type,t.type=r.origType,i=r.handler.apply(this,arguments),t.type=e),i}}})),E.support.submitBubbles||(E.event.special.submit={setup:function(){if(E.nodeName(this,"form"))return!1;E.event.add(this,"click._submit keypress._submit",(function(t){var i=t.target,n=E.nodeName(i,"input")||E.nodeName(i,"button")?i.form:e;n&&!n._submit_attached&&(E.event.add(n,"submit._submit",(function(t){this.parentNode&&E.event.simulate("submit",this.parentNode,t,!0)})),n._submit_attached=!0)}))},teardown:function(){if(E.nodeName(this,"form"))return!1;E.event.remove(this,"._submit")}}),E.support.changeBubbles||(E.event.special.change={setup:function(){if(X.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(E.event.add(this,"propertychange._change",(function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)})),E.event.add(this,"click._change",(function(t){this._just_changed&&(this._just_changed=!1,E.event.simulate("change",this,t,!0))}))),!1;E.event.add(this,"beforeactivate._change",(function(t){var e=t.target;X.test(e.nodeName)&&!e._change_attached&&(E.event.add(e,"change._change",(function(t){this.parentNode&&!t.isSimulated&&E.event.simulate("change",this.parentNode,t,!0)})),e._change_attached=!0)}))},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return E.event.remove(this,"._change"),X.test(this.nodeName)}}),E.support.focusinBubbles||E.each({focus:"focusin",blur:"focusout"},(function(t,e){var i=0,n=function(t){E.event.simulate(e,t.target,E.event.fix(t),!0)};E.event.special[e]={setup:function(){0==i++&&C.addEventListener(t,n,!0)},teardown:function(){0==--i&&C.removeEventListener(t,n,!0)}}})),E.fn.extend({on:function(t,i,n,r,a){var s,o;if("object"==typeof t){for(o in"string"!=typeof i&&(n=i,i=e),t)this.on(o,i,n,t[o],a);return this}if(null==n&&null==r?(r=i,n=i=e):null==r&&("string"==typeof i?(r=n,n=e):(r=n,n=i,i=e)),!1===r)r=P;else if(!r)return this;return 1===a&&(s=r,r=function(t){return E().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=E.guid++)),this.each((function(){E.event.add(this,t,r,n,i)}))},one:function(t,e,i,n){return this.on.call(this,t,e,i,n,1)},off:function(t,i,n){if(t&&t.preventDefault&&t.handleObj){var r=t.handleObj;return E(t.delegateTarget).off(r.namespace?r.type+"."+r.namespace:r.type,r.selector,r.handler),this}if("object"==typeof t){for(var a in t)this.off(a,i,t[a]);return this}return!1!==i&&"function"!=typeof i||(n=i,i=e),!1===n&&(n=P),this.each((function(){E.event.remove(this,t,n,i)}))},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},live:function(t,e,i){return E(this.context).on(t,this.selector,e,i),this},die:function(t,e){return E(this.context).off(t,this.selector||"**",e),this},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1==arguments.length?this.off(t,"**"):this.off(e,t,i)},trigger:function(t,e){return this.each((function(){E.event.trigger(t,e,this)}))},triggerHandler:function(t,e){if(this[0])return E.event.trigger(t,e,this[0],!0)},toggle:function(t){var e=arguments,i=t.guid||E.guid++,n=0,r=function(i){var r=(E._data(this,"lastToggle"+t.guid)||0)%n;return E._data(this,"lastToggle"+t.guid,r+1),i.preventDefault(),e[r].apply(this,arguments)||!1};for(r.guid=i;n<e.length;)e[n++].guid=i;return this.click(r)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),E.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(t,e){E.fn[e]=function(t,i){return null==i&&(i=t,t=null),arguments.length>0?this.bind(e,t,i):this.trigger(e)},E.attrFn&&(E.attrFn[e]=!0),Q.test(e)&&(E.event.fixHooks[e]=E.event.keyHooks),Z.test(e)&&(E.event.fixHooks[e]=E.event.mouseHooks)})),function(){function t(t,e,i,n,a,s){for(var o=0,l=n.length;o<l;o++){var h=n[o];if(h){var c=!1;for(h=h[t];h;){if(h[r]===i){c=n[h.sizset];break}if(1===h.nodeType)if(s||(h[r]=i,h.sizset=o),"string"!=typeof e){if(h===e){c=!0;break}}else if(p.filter(e,[h]).length>0){c=h;break}h=h[t]}n[o]=c}}}function i(t,e,i,n,a,s){for(var o=0,l=n.length;o<l;o++){var h=n[o];if(h){var c=!1;for(h=h[t];h;){if(h[r]===i){c=n[h.sizset];break}if(1===h.nodeType&&!s&&(h[r]=i,h.sizset=o),h.nodeName.toLowerCase()===e){c=h;break}h=h[t]}n[o]=c}}}var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r="sizcache"+(Math.random()+"").replace(".",""),a=0,s=Object.prototype.toString,o=!1,l=!0,h=/\\/g,c=/\r\n/g,d=/\W/;[0,0].sort((function(){return l=!1,0}));var p=function(t,e,i,r){i=i||[];var a=e=e||C;if(1!==e.nodeType&&9!==e.nodeType)return[];if(!t||"string"!=typeof t)return i;var o,l,h,c,d,u,m,v,y=!0,x=p.isXML(e),_=[],A=t;do{if(n.exec(""),(o=n.exec(A))&&(A=o[3],_.push(o[1]),o[2])){c=o[3];break}}while(o);if(_.length>1&&f.exec(t))if(2===_.length&&g.relative[_[0]])l=b(_[0]+_[1],e,r);else for(l=g.relative[_[0]]?[e]:p(_.shift(),e);_.length;)t=_.shift(),g.relative[t]&&(t+=_.shift()),l=b(t,l,r);else if(!r&&_.length>1&&9===e.nodeType&&!x&&g.match.ID.test(_[0])&&!g.match.ID.test(_[_.length-1])&&(e=(d=p.find(_.shift(),e,x)).expr?p.filter(d.expr,d.set)[0]:d.set[0]),e)for(l=(d=r?{expr:_.pop(),set:w(r)}:p.find(_.pop(),1!==_.length||"~"!==_[0]&&"+"!==_[0]||!e.parentNode?e:e.parentNode,x)).expr?p.filter(d.expr,d.set):d.set,_.length>0?h=w(l):y=!1;_.length;)m=u=_.pop(),g.relative[u]?m=_.pop():u="",null==m&&(m=e),g.relative[u](h,m,x);else h=_=[];if(h||(h=l),h||p.error(u||t),"[object Array]"===s.call(h))if(y)if(e&&1===e.nodeType)for(v=0;null!=h[v];v++)h[v]&&(!0===h[v]||1===h[v].nodeType&&p.contains(e,h[v]))&&i.push(l[v]);else for(v=0;null!=h[v];v++)h[v]&&1===h[v].nodeType&&i.push(l[v]);else i.push.apply(i,h);else w(h,i);return c&&(p(c,a,i,r),p.uniqueSort(i)),i};p.uniqueSort=function(t){if(y&&(o=l,t.sort(y),o))for(var e=1;e<t.length;e++)t[e]===t[e-1]&&t.splice(e--,1);return t},p.matches=function(t,e){return p(t,null,null,e)},p.matchesSelector=function(t,e){return p(e,null,null,[t]).length>0},p.find=function(t,e,i){var n,r,a,s,o,l;if(!t)return[];for(r=0,a=g.order.length;r<a;r++)if(o=g.order[r],(s=g.leftMatch[o].exec(t))&&(l=s[1],s.splice(1,1),"\\"!==l.substr(l.length-1)&&(s[1]=(s[1]||"").replace(h,""),null!=(n=g.find[o](s,e,i))))){t=t.replace(g.match[o],"");break}return n||(n=void 0!==e.getElementsByTagName?e.getElementsByTagName("*"):[]),{set:n,expr:t}},p.filter=function(t,i,n,r){for(var a,s,o,l,h,c,d,u,f,m=t,v=[],y=i,x=i&&i[0]&&p.isXML(i[0]);t&&i.length;){for(o in g.filter)if(null!=(a=g.leftMatch[o].exec(t))&&a[2]){if(c=g.filter[o],d=a[1],s=!1,a.splice(1,1),"\\"===d.substr(d.length-1))continue;if(y===v&&(v=[]),g.preFilter[o])if(a=g.preFilter[o](a,y,n,v,r,x)){if(!0===a)continue}else s=l=!0;if(a)for(u=0;null!=(h=y[u]);u++)h&&(f=r^(l=c(h,a,u,y)),n&&null!=l?f?s=!0:y[u]=!1:f&&(v.push(h),s=!0));if(l!==e){if(n||(y=v),t=t.replace(g.match[o],""),!s)return[];break}}if(t===m){if(null!=s)break;p.error(t)}m=t}return y},p.error=function(t){throw"Syntax error, unrecognized expression: "+t};var u=p.getText=function(t){var e,i,n=t.nodeType,r="";if(n){if(1===n){if("string"==typeof t.textContent)return t.textContent;if("string"==typeof t.innerText)return t.innerText.replace(c,"");for(t=t.firstChild;t;t=t.nextSibling)r+=u(t)}else if(3===n||4===n)return t.nodeValue}else for(e=0;i=t[e];e++)8!==i.nodeType&&(r+=u(i));return r},g=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{class:"className",for:"htmlFor"},attrHandle:{href:function(t){return t.getAttribute("href")},type:function(t){return t.getAttribute("type")}},relative:{"+":function(t,e){var i="string"==typeof e,n=i&&!d.test(e),r=i&&!n;n&&(e=e.toLowerCase());for(var a,s=0,o=t.length;s<o;s++)if(a=t[s]){for(;(a=a.previousSibling)&&1!==a.nodeType;);t[s]=r||a&&a.nodeName.toLowerCase()===e?a||!1:a===e}r&&p.filter(e,t,!0)},">":function(t,e){var i,n="string"==typeof e,r=0,a=t.length;if(n&&!d.test(e)){for(e=e.toLowerCase();r<a;r++)if(i=t[r]){var s=i.parentNode;t[r]=s.nodeName.toLowerCase()===e&&s}}else{for(;r<a;r++)(i=t[r])&&(t[r]=n?i.parentNode:i.parentNode===e);n&&p.filter(e,t,!0)}},"":function(e,n,r){var s,o=a++,l=t;"string"==typeof n&&!d.test(n)&&(s=n=n.toLowerCase(),l=i),l("parentNode",n,o,e,s,r)},"~":function(e,n,r){var s,o=a++,l=t;"string"==typeof n&&!d.test(n)&&(s=n=n.toLowerCase(),l=i),l("previousSibling",n,o,e,s,r)}},find:{ID:function(t,e,i){if(void 0!==e.getElementById&&!i){var n=e.getElementById(t[1]);return n&&n.parentNode?[n]:[]}},NAME:function(t,e){if(void 0!==e.getElementsByName){for(var i=[],n=e.getElementsByName(t[1]),r=0,a=n.length;r<a;r++)n[r].getAttribute("name")===t[1]&&i.push(n[r]);return 0===i.length?null:i}},TAG:function(t,e){if(void 0!==e.getElementsByTagName)return e.getElementsByTagName(t[1])}},preFilter:{CLASS:function(t,e,i,n,r,a){if(t=" "+t[1].replace(h,"")+" ",a)return t;for(var s,o=0;null!=(s=e[o]);o++)s&&(r^(s.className&&(" "+s.className+" ").replace(/[\t\n\r]/g," ").indexOf(t)>=0)?i||n.push(s):i&&(e[o]=!1));return!1},ID:function(t){return t[1].replace(h,"")},TAG:function(t,e){return t[1].replace(h,"").toLowerCase()},CHILD:function(t){if("nth"===t[1]){t[2]||p.error(t[0]),t[2]=t[2].replace(/^\+|\s*/g,"");var e=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(("even"===t[2]?"2n":"odd"===t[2]&&"2n+1")||!/\D/.test(t[2])&&"0n+"+t[2]||t[2]);t[2]=e[1]+(e[2]||1)-0,t[3]=e[3]-0}else t[2]&&p.error(t[0]);return t[0]=a++,t},ATTR:function(t,e,i,n,r,a){var s=t[1]=t[1].replace(h,"");return!a&&g.attrMap[s]&&(t[1]=g.attrMap[s]),t[4]=(t[4]||t[5]||"").replace(h,""),"~="===t[2]&&(t[4]=" "+t[4]+" "),t},PSEUDO:function(t,e,i,r,a){if("not"===t[1]){if(!((n.exec(t[3])||"").length>1||/^\w/.test(t[3]))){var s=p.filter(t[3],e,i,!0^a);return i||r.push.apply(r,s),!1}t[3]=p(t[3],null,null,e)}else if(g.match.POS.test(t[0])||g.match.CHILD.test(t[0]))return!0;return t},POS:function(t){return t.unshift(!0),t}},filters:{enabled:function(t){return!1===t.disabled&&"hidden"!==t.type},disabled:function(t){return!0===t.disabled},checked:function(t){return!0===t.checked},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},parent:function(t){return!!t.firstChild},empty:function(t){return!t.firstChild},has:function(t,e,i){return!!p(i[3],t).length},header:function(t){return/h\d/i.test(t.nodeName)},text:function(t){var e=t.getAttribute("type"),i=t.type;return"input"===t.nodeName.toLowerCase()&&"text"===i&&(e===i||null===e)},radio:function(t){return"input"===t.nodeName.toLowerCase()&&"radio"===t.type},checkbox:function(t){return"input"===t.nodeName.toLowerCase()&&"checkbox"===t.type},file:function(t){return"input"===t.nodeName.toLowerCase()&&"file"===t.type},password:function(t){return"input"===t.nodeName.toLowerCase()&&"password"===t.type},submit:function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&"submit"===t.type},image:function(t){return"input"===t.nodeName.toLowerCase()&&"image"===t.type},reset:function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&"reset"===t.type},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},input:function(t){return/input|select|textarea|button/i.test(t.nodeName)},focus:function(t){return t===t.ownerDocument.activeElement}},setFilters:{first:function(t,e){return 0===e},last:function(t,e,i,n){return e===n.length-1},even:function(t,e){return e%2==0},odd:function(t,e){return e%2==1},lt:function(t,e,i){return e<i[3]-0},gt:function(t,e,i){return e>i[3]-0},nth:function(t,e,i){return i[3]-0===e},eq:function(t,e,i){return i[3]-0===e}},filter:{PSEUDO:function(t,e,i,n){var r=e[1],a=g.filters[r];if(a)return a(t,i,e,n);if("contains"===r)return(t.textContent||t.innerText||u([t])||"").indexOf(e[3])>=0;if("not"===r){for(var s=e[3],o=0,l=s.length;o<l;o++)if(s[o]===t)return!1;return!0}p.error(r)},CHILD:function(t,e){var i,n,a,s,o,l,h=e[1],c=t;switch(h){case"only":case"first":for(;c=c.previousSibling;)if(1===c.nodeType)return!1;if("first"===h)return!0;c=t;case"last":for(;c=c.nextSibling;)if(1===c.nodeType)return!1;return!0;case"nth":if(i=e[2],n=e[3],1===i&&0===n)return!0;if(a=e[0],(s=t.parentNode)&&(s[r]!==a||!t.nodeIndex)){for(o=0,c=s.firstChild;c;c=c.nextSibling)1===c.nodeType&&(c.nodeIndex=++o);s[r]=a}return l=t.nodeIndex-n,0===i?0===l:l%i==0&&l/i>=0}},ID:function(t,e){return 1===t.nodeType&&t.getAttribute("id")===e},TAG:function(t,e){return"*"===e&&1===t.nodeType||!!t.nodeName&&t.nodeName.toLowerCase()===e},CLASS:function(t,e){return(" "+(t.className||t.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(t,e){var i=e[1],n=p.attr?p.attr(t,i):g.attrHandle[i]?g.attrHandle[i](t):null!=t[i]?t[i]:t.getAttribute(i),r=n+"",a=e[2],s=e[4];return null==n?"!="===a:!a&&p.attr?null!=n:"="===a?r===s:"*="===a?r.indexOf(s)>=0:"~="===a?(" "+r+" ").indexOf(s)>=0:s?"!="===a?r!==s:"^="===a?0===r.indexOf(s):"$="===a?r.substr(r.length-s.length)===s:"|="===a&&(r===s||r.substr(0,s.length+1)===s+"-"):r&&!1!==n},POS:function(t,e,i,n){var r=e[2],a=g.setFilters[r];if(a)return a(t,i,e,n)}}},f=g.match.POS,m=function(t,e){return"\\"+(e-0+1)};for(var v in g.match)g.match[v]=new RegExp(g.match[v].source+/(?![^\[]*\])(?![^\(]*\))/.source),g.leftMatch[v]=new RegExp(/(^(?:.|\r|\n)*?)/.source+g.match[v].source.replace(/\\(\d+)/g,m));var y,x,w=function(t,e){return t=Array.prototype.slice.call(t,0),e?(e.push.apply(e,t),e):t};try{Array.prototype.slice.call(C.documentElement.childNodes,0)[0].nodeType}catch(G){w=function(t,e){var i=0,n=e||[];if("[object Array]"===s.call(t))Array.prototype.push.apply(n,t);else if("number"==typeof t.length)for(var r=t.length;i<r;i++)n.push(t[i]);else for(;t[i];i++)n.push(t[i]);return n}}C.documentElement.compareDocumentPosition?y=function(t,e){return t===e?(o=!0,0):t.compareDocumentPosition&&e.compareDocumentPosition?4&t.compareDocumentPosition(e)?-1:1:t.compareDocumentPosition?-1:1}:(y=function(t,e){if(t===e)return o=!0,0;if(t.sourceIndex&&e.sourceIndex)return t.sourceIndex-e.sourceIndex;var i,n,r=[],a=[],s=t.parentNode,l=e.parentNode,h=s;if(s===l)return x(t,e);if(!s)return-1;if(!l)return 1;for(;h;)r.unshift(h),h=h.parentNode;for(h=l;h;)a.unshift(h),h=h.parentNode;i=r.length,n=a.length;for(var c=0;c<i&&c<n;c++)if(r[c]!==a[c])return x(r[c],a[c]);return c===i?x(t,a[c],-1):x(r[c],e,1)},x=function(t,e,i){if(t===e)return i;for(var n=t.nextSibling;n;){if(n===e)return-1;n=n.nextSibling}return 1}),function(){var t=C.createElement("div"),i="script"+(new Date).getTime(),n=C.documentElement;t.innerHTML="<a name='"+i+"'/>",n.insertBefore(t,n.firstChild),C.getElementById(i)&&(g.find.ID=function(t,i,n){if(void 0!==i.getElementById&&!n){var r=i.getElementById(t[1]);return r?r.id===t[1]||void 0!==r.getAttributeNode&&r.getAttributeNode("id").nodeValue===t[1]?[r]:e:[]}},g.filter.ID=function(t,e){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return 1===t.nodeType&&i&&i.nodeValue===e}),n.removeChild(t),n=t=null}(),function(){var t=C.createElement("div");t.appendChild(C.createComment("")),t.getElementsByTagName("*").length>0&&(g.find.TAG=function(t,e){var i=e.getElementsByTagName(t[1]);if("*"===t[1]){for(var n=[],r=0;i[r];r++)1===i[r].nodeType&&n.push(i[r]);i=n}return i}),t.innerHTML="<a href='#'></a>",t.firstChild&&void 0!==t.firstChild.getAttribute&&"#"!==t.firstChild.getAttribute("href")&&(g.attrHandle.href=function(t){return t.getAttribute("href",2)}),t=null}(),C.querySelectorAll&&function(){var t=p,e=C.createElement("div");if(e.innerHTML="<p class='TEST'></p>",!e.querySelectorAll||0!==e.querySelectorAll(".TEST").length){for(var i in p=function(e,i,n,r){if(i=i||C,!r&&!p.isXML(i)){var a=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);if(a&&(1===i.nodeType||9===i.nodeType)){if(a[1])return w(i.getElementsByTagName(e),n);if(a[2]&&g.find.CLASS&&i.getElementsByClassName)return w(i.getElementsByClassName(a[2]),n)}if(9===i.nodeType){if("body"===e&&i.body)return w([i.body],n);if(a&&a[3]){var s=i.getElementById(a[3]);if(!s||!s.parentNode)return w([],n);if(s.id===a[3])return w([s],n)}try{return w(i.querySelectorAll(e),n)}catch(h){}}else if(1===i.nodeType&&"object"!==i.nodeName.toLowerCase()){var o=i,l=i.getAttribute("id"),c=l||"__sizzle__",d=i.parentNode,u=/^\s*[+~]/.test(e);l?c=c.replace(/'/g,"\\$&"):i.setAttribute("id",c),u&&d&&(i=i.parentNode);try{if(!u||d)return w(i.querySelectorAll("[id='"+c+"'] "+e),n)}catch(v){}finally{l||o.removeAttribute("id")}}}return t(e,i,n,r)},t)p[i]=t[i];e=null}}(),function(){var t=C.documentElement,e=t.matchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.msMatchesSelector;if(e){var i=!e.call(C.createElement("div"),"div"),n=!1;try{e.call(C.documentElement,"[test!='']:sizzle")}catch(E){n=!0}p.matchesSelector=function(t,r){if(r=r.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!p.isXML(t))try{if(n||!g.match.PSEUDO.test(r)&&!/!=/.test(r)){var a=e.call(t,r);if(a||!i||t.document&&11!==t.document.nodeType)return a}}catch(s){}return p(r,null,null,[t]).length>0}}}(),function(){var t=C.createElement("div");if(t.innerHTML="<div class='test e'></div><div class='test'></div>",t.getElementsByClassName&&0!==t.getElementsByClassName("e").length){if(t.lastChild.className="e",1===t.getElementsByClassName("e").length)return;g.order.splice(1,0,"CLASS"),g.find.CLASS=function(t,e,i){if(void 0!==e.getElementsByClassName&&!i)return e.getElementsByClassName(t[1])},t=null}}(),C.documentElement.contains?p.contains=function(t,e){return t!==e&&(!t.contains||t.contains(e))}:C.documentElement.compareDocumentPosition?p.contains=function(t,e){return!!(16&t.compareDocumentPosition(e))}:p.contains=function(){return!1},p.isXML=function(t){var e=(t?t.ownerDocument||t:0).documentElement;return!!e&&"HTML"!==e.nodeName};var b=function(t,e,i){for(var n,r=[],a="",s=e.nodeType?[e]:e;n=g.match.PSEUDO.exec(t);)a+=n[0],t=t.replace(g.match.PSEUDO,"");t=g.relative[t]?t+"*":t;for(var o=0,l=s.length;o<l;o++)p(t,s[o],r,i);return p.filter(a,r)};p.attr=E.attr,p.selectors.attrMap={},E.find=p,E.expr=p.selectors,E.expr[":"]=E.expr.filters,E.unique=p.uniqueSort,E.text=p.getText,E.isXMLDoc=p.isXML,E.contains=p.contains}();var it=/Until$/,nt=/^(?:parents|prevUntil|prevAll)/,rt=/,/,at=/^.[^:#\[\.,]*$/,st=Array.prototype.slice,ot=E.expr.match.POS,lt={children:!0,contents:!0,next:!0,prev:!0};E.fn.extend({find:function(t){var e,i,n=this;if("string"!=typeof t)return E(t).filter((function(){for(e=0,i=n.length;e<i;e++)if(E.contains(n[e],this))return!0}));var r,a,s,o=this.pushStack("","find",t);for(e=0,i=this.length;e<i;e++)if(r=o.length,E.find(t,this[e],o),e>0)for(a=r;a<o.length;a++)for(s=0;s<r;s++)if(o[s]===o[a]){o.splice(a--,1);break}return o},has:function(t){var e=E(t);return this.filter((function(){for(var t=0,i=e.length;t<i;t++)if(E.contains(this,e[t]))return!0}))},not:function(t){return this.pushStack(b(this,t,!1),"not",t)},filter:function(t){return this.pushStack(b(this,t,!0),"filter",t)},is:function(t){return!!t&&("string"==typeof t?ot.test(t)?E(t,this.context).index(this[0])>=0:E.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,e){var i,n,r=[],a=this[0];if(E.isArray(t)){for(var s=1;a&&a.ownerDocument&&a!==e;){for(i=0;i<t.length;i++)E(a).is(t[i])&&r.push({selector:t[i],elem:a,level:s});a=a.parentNode,s++}return r}var o=ot.test(t)||"string"!=typeof t?E(t,e||this.context):0;for(i=0,n=this.length;i<n;i++)for(a=this[i];a;){if(o?o.index(a)>-1:E.find.matchesSelector(a,t)){r.push(a);break}if(!(a=a.parentNode)||!a.ownerDocument||a===e||11===a.nodeType)break}return r=r.length>1?E.unique(r):r,this.pushStack(r,"closest",t)},index:function(t){return t?"string"==typeof t?E.inArray(this[0],E(t)):E.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(t,e){var i="string"==typeof t?E(t,e):E.makeArray(t&&t.nodeType?[t]:t),n=E.merge(this.get(),i);return this.pushStack(_(i[0])||_(n[0])?n:E.unique(n))},andSelf:function(){return this.add(this.prevObject)}}),E.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E.dir(t,"parentNode")},parentsUntil:function(t,e,i){return E.dir(t,"parentNode",i)},next:function(t){return E.nth(t,2,"nextSibling")},prev:function(t){return E.nth(t,2,"previousSibling")},nextAll:function(t){return E.dir(t,"nextSibling")},prevAll:function(t){return E.dir(t,"previousSibling")},nextUntil:function(t,e,i){return E.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return E.dir(t,"previousSibling",i)},siblings:function(t){return E.sibling(t.parentNode.firstChild,t)},children:function(t){return E.sibling(t.firstChild)},contents:function(t){return E.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:E.makeArray(t.childNodes)}},(function(t,e){E.fn[t]=function(i,n){var r=E.map(this,e,i),a=st.call(arguments);return it.test(t)||(n=i),n&&"string"==typeof n&&(r=E.filter(n,r)),r=this.length>1&&!lt[t]?E.unique(r):r,(this.length>1||rt.test(n))&&nt.test(t)&&(r=r.reverse()),this.pushStack(r,t,a.join(","))}})),E.extend({filter:function(t,e,i){return i&&(t=":not("+t+")"),1===e.length?E.find.matchesSelector(e[0],t)?[e[0]]:[]:E.find.matches(t,e)},dir:function(t,i,n){for(var r=[],a=t[i];a&&9!==a.nodeType&&(n===e||1!==a.nodeType||!E(a).is(n));)1===a.nodeType&&r.push(a),a=a[i];return r},nth:function(t,e,i,n){e=e||1;for(var r=0;t&&(1!==t.nodeType||++r!==e);t=t[i]);return t},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var ht="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",ct=/ jQuery\d+="(?:\d+|null)"/g,dt=/^\s+/,pt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ut=/<([\w:]+)/,gt=/<tbody/i,ft=/<|&#?\w+;/,mt=/<(?:script|style)/i,vt=/<(?:script|object|embed|option|style)/i,yt=new RegExp("<(?:"+ht.replace(" ","|")+")","i"),xt=/checked\s*(?:[^=]|=\s*.checked.)/i,wt=/\/(java|ecma)script/i,bt=/^\s*<!(?:\[CDATA\[|\-\-)/,_t={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},At=w(C);_t.optgroup=_t.option,_t.tbody=_t.tfoot=_t.colgroup=_t.caption=_t.thead,_t.th=_t.td,E.support.htmlSerialize||(_t._default=[1,"div<div>","</div>"]),E.fn.extend({text:function(t){return E.isFunction(t)?this.each((function(e){var i=E(this);i.text(t.call(this,e,i.text()))})):"object"!=typeof t&&t!==e?this.empty().append((this[0]&&this[0].ownerDocument||C).createTextNode(t)):E.text(this)},wrapAll:function(t){if(E.isFunction(t))return this.each((function(e){E(this).wrapAll(t.call(this,e))}));if(this[0]){var e=E(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t})).append(this)}return this},wrapInner:function(t){return E.isFunction(t)?this.each((function(e){E(this).wrapInner(t.call(this,e))})):this.each((function(){var e=E(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){return this.each((function(){E(this).wrapAll(t)}))},unwrap:function(){return this.parent().each((function(){E.nodeName(this,"body")||E(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(t){1===this.nodeType&&this.appendChild(t)}))},prepend:function(){return this.domManip(arguments,!0,(function(t){1===this.nodeType&&this.insertBefore(t,this.firstChild)}))},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,(function(t){this.parentNode.insertBefore(t,this)}));if(arguments.length){var t=E(arguments[0]);return t.push.apply(t,this.toArray()),this.pushStack(t,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,(function(t){this.parentNode.insertBefore(t,this.nextSibling)}));if(arguments.length){var t=this.pushStack(this,"after",arguments);return t.push.apply(t,E(arguments[0]).toArray()),t}},remove:function(t,e){for(var i,n=0;null!=(i=this[n]);n++)t&&!E.filter(t,[i]).length||(!e&&1===i.nodeType&&(E.cleanData(i.getElementsByTagName("*")),E.cleanData([i])),i.parentNode&&i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)for(1===t.nodeType&&E.cleanData(t.getElementsByTagName("*"));t.firstChild;)t.removeChild(t.firstChild);return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return E.clone(this,t,e)}))},html:function(t){if(t===e)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(ct,""):null;if("string"!=typeof t||mt.test(t)||!E.support.leadingWhitespace&&dt.test(t)||_t[(ut.exec(t)||["",""])[1].toLowerCase()])E.isFunction(t)?this.each((function(e){var i=E(this);i.html(t.call(this,e,i.html()))})):this.empty().append(t);else{t=t.replace(pt,"<$1></$2>");try{for(var i=0,n=this.length;i<n;i++)1===this[i].nodeType&&(E.cleanData(this[i].getElementsByTagName("*")),this[i].innerHTML=t)}catch(D){this.empty().append(t)}}return this},replaceWith:function(t){return this[0]&&this[0].parentNode?E.isFunction(t)?this.each((function(e){var i=E(this),n=i.html();i.replaceWith(t.call(this,e,n))})):("string"!=typeof t&&(t=E(t).detach()),this.each((function(){var e=this.nextSibling,i=this.parentNode;E(this).remove(),e?E(e).before(t):E(i).append(t)}))):this.length?this.pushStack(E(E.isFunction(t)?t():t),"replaceWith",t):this},detach:function(t){return this.remove(t,!0)},domManip:function(t,i,n){var r,a,s,o,l=t[0],h=[];if(!E.support.checkClone&&3===arguments.length&&"string"==typeof l&&xt.test(l))return this.each((function(){E(this).domManip(t,i,n,!0)}));if(E.isFunction(l))return this.each((function(r){var a=E(this);t[0]=l.call(this,r,i?a.html():e),a.domManip(t,i,n)}));if(this[0]){if(o=l&&l.parentNode,a=1===(s=(r=E.support.parentNode&&o&&11===o.nodeType&&o.childNodes.length===this.length?{fragment:o}:E.buildFragment(t,this,h)).fragment).childNodes.length?s=s.firstChild:s.firstChild){i=i&&E.nodeName(a,"tr");for(var c=0,d=this.length,p=d-1;c<d;c++)n.call(i?x(this[c]):this[c],r.cacheable||d>1&&c<p?E.clone(s,!0,!0):s)}h.length&&E.each(h,u)}return this}}),E.buildFragment=function(t,e,i){var n,r,a,s,o=t[0];return e&&e[0]&&(s=e[0].ownerDocument||e[0]),s.createDocumentFragment||(s=C),1===t.length&&"string"==typeof o&&o.length<512&&s===C&&"<"===o.charAt(0)&&!vt.test(o)&&(E.support.checkClone||!xt.test(o))&&!E.support.unknownElems&&yt.test(o)&&(r=!0,(a=E.fragments[o])&&1!==a&&(n=a)),n||(n=s.createDocumentFragment(),E.clean(t,s,n,i)),r&&(E.fragments[o]=a?n:1),{fragment:n,cacheable:r}},E.fragments={},E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){E.fn[t]=function(i){var n=[],r=E(i),a=1===this.length&&this[0].parentNode;if(a&&11===a.nodeType&&1===a.childNodes.length&&1===r.length)return r[e](this[0]),this;for(var s=0,o=r.length;s<o;s++){var l=(s>0?this.clone(!0):this).get();E(r[s])[e](l),n=n.concat(l)}return this.pushStack(n,t,r.selector)}})),E.extend({clone:function(t,e,i){var n,r,a,s=t.cloneNode(!0);if(!(E.support.noCloneEvent&&E.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||E.isXMLDoc(t)))for(v(t,s),n=m(t),r=m(s),a=0;n[a];++a)r[a]&&v(n[a],r[a]);if(e&&(y(t,s),i))for(n=m(t),r=m(s),a=0;n[a];++a)y(n[a],r[a]);return n=r=null,s},clean:function(t,e,i,n){var r;void 0===(e=e||C).createElement&&(e=e.ownerDocument||e[0]&&e[0].ownerDocument||C);for(var a,s,o=[],l=0;null!=(s=t[l]);l++)if("number"==typeof s&&(s+=""),s){if("string"==typeof s)if(ft.test(s)){s=s.replace(pt,"<$1></$2>");var h=(ut.exec(s)||["",""])[1].toLowerCase(),c=_t[h]||_t._default,d=c[0],p=e.createElement("div");for(e===C?At.appendChild(p):w(e).appendChild(p),p.innerHTML=c[1]+s+c[2];d--;)p=p.lastChild;if(!E.support.tbody){var u=gt.test(s),f="table"!==h||u?"<table>"!==c[1]||u?[]:p.childNodes:p.firstChild&&p.firstChild.childNodes;for(a=f.length-1;a>=0;--a)E.nodeName(f[a],"tbody")&&!f[a].childNodes.length&&f[a].parentNode.removeChild(f[a])}!E.support.leadingWhitespace&&dt.test(s)&&p.insertBefore(e.createTextNode(dt.exec(s)[0]),p.firstChild),s=p.childNodes}else s=e.createTextNode(s);var m;if(!E.support.appendChecked)if(s[0]&&"number"==typeof(m=s.length))for(a=0;a<m;a++)g(s[a]);else g(s);s.nodeType?o.push(s):o=E.merge(o,s)}if(i)for(r=function(t){return!t.type||wt.test(t.type)},l=0;o[l];l++)if(!n||!E.nodeName(o[l],"script")||o[l].type&&"text/javascript"!==o[l].type.toLowerCase()){if(1===o[l].nodeType){var v=E.grep(o[l].getElementsByTagName("script"),r);o.splice.apply(o,[l+1,0].concat(v))}i.appendChild(o[l])}else n.push(o[l].parentNode?o[l].parentNode.removeChild(o[l]):o[l]);return o},cleanData:function(t){for(var e,i,n,r=E.cache,a=E.event.special,s=E.support.deleteExpando,o=0;null!=(n=t[o]);o++)if((!n.nodeName||!E.noData[n.nodeName.toLowerCase()])&&(i=n[E.expando])){if((e=r[i])&&e.events){for(var l in e.events)a[l]?E.event.remove(n,l):E.removeEvent(n,l,e.handle);e.handle&&(e.handle.elem=null)}s?delete n[E.expando]:n.removeAttribute&&n.removeAttribute(E.expando),delete r[i]}}});var Pt,St,Tt,kt=/alpha\([^)]*\)/i,Ct=/opacity=([^)]*)/,Mt=/([A-Z]|^ms)/g,Dt=/^-?\d+(?:px)?$/i,Et=/^-?\d/,Nt=/^([\-+])=([\-+.\de]+)/,It={position:"absolute",visibility:"hidden",display:"block"},Lt=["Left","Right"],Ft=["Top","Bottom"];E.fn.css=function(t,i){return 2===arguments.length&&i===e?this:E.access(this,t,i,!0,(function(t,i,n){return n!==e?E.style(t,i,n):E.css(t,i)}))},E.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Pt(t,"opacity","opacity");return""===i?"1":i}return t.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:E.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,i,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var a,s,o=E.camelCase(i),l=t.style,h=E.cssHooks[o];if(i=E.cssProps[o]||o,n===e)return h&&"get"in h&&(a=h.get(t,!1,r))!==e?a:l[i];if("string"===(s=typeof n)&&(a=Nt.exec(n))&&(n=+(a[1]+1)*+a[2]+parseFloat(E.css(t,i)),s="number"),null==n||"number"===s&&isNaN(n))return;if("number"===s&&!E.cssNumber[o]&&(n+="px"),!h||!("set"in h)||(n=h.set(t,n))!==e)try{l[i]=n}catch(k){}}},css:function(t,i,n){var r,a;return i=E.camelCase(i),a=E.cssHooks[i],"cssFloat"===(i=E.cssProps[i]||i)&&(i="float"),a&&"get"in a&&(r=a.get(t,!0,n))!==e?r:Pt?Pt(t,i):void 0},swap:function(t,e,i){var n={};for(var r in e)n[r]=t.style[r],t.style[r]=e[r];for(r in i.call(t),e)t.style[r]=n[r]}}),E.curCSS=E.css,E.each(["height","width"],(function(t,e){E.cssHooks[e]={get:function(t,i,n){var r;if(i)return 0!==t.offsetWidth?p(t,e,n):(E.swap(t,It,(function(){r=p(t,e,n)})),r)},set:function(t,e){return Dt.test(e)?(e=parseFloat(e))>=0?e+"px":void 0:e}}})),E.support.opacity||(E.cssHooks.opacity={get:function(t,e){return Ct.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,r=E.isNumeric(e)?"alpha(opacity="+100*e+")":"",a=n&&n.filter||i.filter||"";i.zoom=1,e>=1&&""===E.trim(a.replace(kt,""))&&(i.removeAttribute("filter"),n&&!n.filter)||(i.filter=kt.test(a)?a.replace(kt,r):a+" "+r)}}),E((function(){E.support.reliableMarginRight||(E.cssHooks.marginRight={get:function(t,e){var i;return E.swap(t,{display:"inline-block"},(function(){i=e?Pt(t,"margin-right","marginRight"):t.style.marginRight})),i}})})),C.defaultView&&C.defaultView.getComputedStyle&&(St=function(t,i){var n,r,a;return i=i.replace(Mt,"-$1").toLowerCase(),(r=t.ownerDocument.defaultView)?((a=r.getComputedStyle(t,null))&&(""===(n=a.getPropertyValue(i))&&!E.contains(t.ownerDocument.documentElement,t)&&(n=E.style(t,i))),n):e}),C.documentElement.currentStyle&&(Tt=function(t,e){var i,n,r,a=t.currentStyle&&t.currentStyle[e],s=t.style;return null===a&&s&&(r=s[e])&&(a=r),!Dt.test(a)&&Et.test(a)&&(i=s.left,(n=t.runtimeStyle&&t.runtimeStyle.left)&&(t.runtimeStyle.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a||0,a=s.pixelLeft+"px",s.left=i,n&&(t.runtimeStyle.left=n)),""===a?"auto":a}),Pt=St||Tt,E.expr&&E.expr.filters&&(E.expr.filters.hidden=function(t){var e=t.offsetWidth,i=t.offsetHeight;return 0===e&&0===i||!E.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||E.css(t,"display"))},E.expr.filters.visible=function(t){return!E.expr.filters.hidden(t)});var jt,Ot,Bt=/%20/g,Rt=/\[\]$/,Wt=/\r?\n/g,Ht=/#.*$/,zt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,qt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Gt=/^(?:GET|HEAD)$/,Ut=/^\/\//,Vt=/\?/,Xt=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Kt=/^(?:select|textarea)/i,Yt=/\s+/,Qt=/([?&])_=[^&]*/,Zt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,$t=E.fn.load,Jt={},te={},ee=["*/"]+["*"];try{jt=D.href}catch(ve){(jt=C.createElement("a")).href="",jt=jt.href}Ot=Zt.exec(jt.toLowerCase())||[],E.fn.extend({load:function(t,i,n){if("string"!=typeof t&&$t)return $t.apply(this,arguments);if(!this.length)return this;var r=t.indexOf(" ");if(r>=0){var a=t.slice(r,t.length);t=t.slice(0,r)}var s="GET";i&&(E.isFunction(i)?(n=i,i=e):"object"==typeof i&&(i=E.param(i,E.ajaxSettings.traditional),s="POST"));var o=this;return E.ajax({url:t,type:s,dataType:"html",data:i,complete:function(t,e,i){i=t.responseText,t.isResolved()&&(t.done((function(t){i=t})),o.html(a?E("<div>").append(i.replace(Xt,"")).find(a):i)),n&&o.each(n,[i,e,t])}}),this},serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){return this.elements?E.makeArray(this.elements):this})).filter((function(){return this.name&&!this.disabled&&(this.checked||Kt.test(this.nodeName)||qt.test(this.type))})).map((function(t,e){var i=E(this).val();return null==i?null:E.isArray(i)?E.map(i,(function(t,i){return{name:e.name,value:t.replace(Wt,"\r\n")}})):{name:e.name,value:i.replace(Wt,"\r\n")}})).get()}}),E.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),(function(t,e){E.fn[e]=function(t){return this.bind(e,t)}})),E.each(["get","post"],(function(t,i){E[i]=function(t,n,r,a){return E.isFunction(n)&&(a=a||r,r=n,n=e),E.ajax({type:i,url:t,data:n,success:r,dataType:a})}})),E.extend({getScript:function(t,i){return E.get(t,e,i,"script")},getJSON:function(t,e,i){return E.get(t,e,i,"json")},ajaxSetup:function(t,e){return e?h(t,E.ajaxSettings):(e=t,t=E.ajaxSettings),h(t,e),t},ajaxSettings:{url:jt,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Ot[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":ee},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":t.String,"text html":!0,"text json":E.parseJSON,"text xml":E.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:d(Jt),ajaxTransport:d(te),ajax:function(t,i){function n(t,i,n,s){if(2!==b){b=2,l&&clearTimeout(l),o=e,a=s||"",_.readyState=t>0?4:0;var h,c,p,x,w,A=i,P=n?function(t,i,n){var r,a,s,o,l=t.contents,h=t.dataTypes,c=t.responseFields;for(a in c)a in n&&(i[c[a]]=n[a]);for(;"*"===h[0];)h.shift(),r===e&&(r=t.mimeType||i.getResponseHeader("content-type"));if(r)for(a in l)if(l[a]&&l[a].test(r)){h.unshift(a);break}if(h[0]in n)s=h[0];else{for(a in n){if(!h[0]||t.converters[a+" "+h[0]]){s=a;break}o||(o=a)}s=s||o}if(s)return s!==h[0]&&h.unshift(s),n[s]}(u,_,n):e;if(t>=200&&t<300||304===t)if(u.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(E.lastModified[r]=x),(w=_.getResponseHeader("Etag"))&&(E.etag[r]=w)),304===t)A="notmodified",h=!0;else try{c=function(t,i){t.dataFilter&&(i=t.dataFilter(i,t.dataType));var n,r,a,s,o,l,h,c,d=t.dataTypes,p={},u=d.length,g=d[0];for(n=1;n<u;n++){if(1===n)for(r in t.converters)"string"==typeof r&&(p[r.toLowerCase()]=t.converters[r]);if(s=g,"*"===(g=d[n]))g=s;else if("*"!==s&&s!==g){if(!(l=p[o=s+" "+g]||p["* "+g]))for(h in c=e,p)if(((a=h.split(" "))[0]===s||"*"===a[0])&&(c=p[a[1]+" "+g])){!0===(h=p[h])?l=c:!0===c&&(l=h);break}!l&&!c&&E.error("No conversion from "+o.replace(" "," to ")),!0!==l&&(i=l?l(i):c(h(i)))}}return i}(u,P),A="success",h=!0}catch(X){A="parsererror",p=X}else p=A,A&&!t||(A="error",t<0&&(t=0));_.status=t,_.statusText=""+(i||A),h?m.resolveWith(g,[c,A,_]):m.rejectWith(g,[_,A,p]),_.statusCode(y),y=e,d&&f.trigger("ajax"+(h?"Success":"Error"),[_,u,h?c:p]),v.fireWith(g,[_,A]),d&&(f.trigger("ajaxComplete",[_,u]),--E.active||E.event.trigger("ajaxStop"))}}"object"==typeof t&&(i=t,t=e),i=i||{};var r,a,s,o,l,h,d,p,u=E.ajaxSetup({},i),g=u.context||u,f=g!==u&&(g.nodeType||g instanceof E)?E(g):E.event,m=E.Deferred(),v=E.Callbacks("once memory"),y=u.statusCode||{},x={},w={},b=0,_={readyState:0,setRequestHeader:function(t,e){if(!b){var i=t.toLowerCase();t=w[i]=w[i]||t,x[t]=e}return this},getAllResponseHeaders:function(){return 2===b?a:null},getResponseHeader:function(t){var i;if(2===b){if(!s)for(s={};i=zt.exec(a);)s[i[1].toLowerCase()]=i[2];i=s[t.toLowerCase()]}return i===e?null:i},overrideMimeType:function(t){return b||(u.mimeType=t),this},abort:function(t){return t=t||"abort",o&&o.abort(t),n(0,t),this}};if(m.promise(_),_.success=_.done,_.error=_.fail,_.complete=v.add,_.statusCode=function(t){var e;if(t)if(b<2)for(e in t)y[e]=[y[e],t[e]];else e=t[_.status],_.then(e,e);return this},u.url=((t||u.url)+"").replace(Ht,"").replace(Ut,Ot[1]+"//"),u.dataTypes=E.trim(u.dataType||"*").toLowerCase().split(Yt),null==u.crossDomain&&(h=Zt.exec(u.url.toLowerCase()),u.crossDomain=!(!h||h[1]==Ot[1]&&h[2]==Ot[2]&&(h[3]||("http:"===h[1]?80:443))==(Ot[3]||("http:"===Ot[1]?80:443)))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=E.param(u.data,u.traditional)),c(Jt,u,i,_),2===b)return!1;if(d=u.global,u.type=u.type.toUpperCase(),u.hasContent=!Gt.test(u.type),d&&0==E.active++&&E.event.trigger("ajaxStart"),!u.hasContent&&(u.data&&(u.url+=(Vt.test(u.url)?"&":"?")+u.data,delete u.data),r=u.url,!1===u.cache)){var A=E.now(),P=u.url.replace(Qt,"$1_="+A);u.url=P+(P===u.url?(Vt.test(u.url)?"&":"?")+"_="+A:"")}for(p in(u.data&&u.hasContent&&!1!==u.contentType||i.contentType)&&_.setRequestHeader("Content-Type",u.contentType),u.ifModified&&(r=r||u.url,E.lastModified[r]&&_.setRequestHeader("If-Modified-Since",E.lastModified[r]),E.etag[r]&&_.setRequestHeader("If-None-Match",E.etag[r])),_.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+ee+"; q=0.01":""):u.accepts["*"]),u.headers)_.setRequestHeader(p,u.headers[p]);if(u.beforeSend&&(!1===u.beforeSend.call(g,_,u)||2===b))return _.abort(),!1;for(p in{success:1,error:1,complete:1})_[p](u[p]);if(o=c(te,u,i,_)){_.readyState=1,d&&f.trigger("ajaxSend",[_,u]),u.async&&u.timeout>0&&(l=setTimeout((function(){_.abort("timeout")}),u.timeout));try{b=1,o.send(x,n)}catch(S){b<2?n(-1,S):E.error(S)}}else n(-1,"No Transport");return _},param:function(t,i){var n=[],r=function(t,e){e=E.isFunction(e)?e():e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(i===e&&(i=E.ajaxSettings.traditional),E.isArray(t)||t.jquery&&!E.isPlainObject(t))E.each(t,(function(){r(this.name,this.value)}));else for(var a in t)l(a,t[a],i,r);return n.join("&").replace(Bt,"+")}}),E.extend({active:0,lastModified:{},etag:{}});var ie=E.now(),ne=/(\=)\?(&|$)|\?\?/i;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return E.expando+"_"+ie++}}),E.ajaxPrefilter("json jsonp",(function(e,i,n){var r="application/x-www-form-urlencoded"===e.contentType&&"string"==typeof e.data;if("jsonp"===e.dataTypes[0]||!1!==e.jsonp&&(ne.test(e.url)||r&&ne.test(e.data))){var a,s=e.jsonpCallback=E.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o=t[s],l=e.url,h=e.data,c="$1"+s+"$2";return!1!==e.jsonp&&(l=l.replace(ne,c),e.url===l&&(r&&(h=h.replace(ne,c)),e.data===h&&(l+=(/\?/.test(l)?"&":"?")+e.jsonp+"="+s))),e.url=l,e.data=h,t[s]=function(t){a=[t]},n.always((function(){t[s]=o,a&&E.isFunction(o)&&t[s](a[0])})),e.converters["script json"]=function(){return a||E.error(s+" was not called"),a[0]},e.dataTypes[0]="json","script"}})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(t){return E.globalEval(t),t}}}),E.ajaxPrefilter("script",(function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)})),E.ajaxTransport("script",(function(t){if(t.crossDomain){var i,n=C.head||C.getElementsByTagName("head")[0]||C.documentElement;return{send:function(r,a){(i=C.createElement("script")).async="async",t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(t,r){(r||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,n&&i.parentNode&&n.removeChild(i),i=e,r||a(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(0,1)}}}}));var re,ae=!!t.ActiveXObject&&function(){for(var t in re)re[t](0,1)},se=0;E.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&o()||function(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:o,function(t){E.extend(E.support,{ajax:!!t,cors:!!t&&"withCredentials"in t})}(E.ajaxSettings.xhr()),E.support.ajax&&E.ajaxTransport((function(i){var n;if(!i.crossDomain||E.support.cors)return{send:function(r,a){var s,o,l=i.xhr();if(i.username?l.open(i.type,i.url,i.async,i.username,i.password):l.open(i.type,i.url,i.async),i.xhrFields)for(o in i.xhrFields)l[o]=i.xhrFields[o];i.mimeType&&l.overrideMimeType&&l.overrideMimeType(i.mimeType),!i.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");try{for(o in r)l.setRequestHeader(o,r[o])}catch(F){}l.send(i.hasContent&&i.data||null),n=function(t,r){var o,h,c,d,p;try{if(n&&(r||4===l.readyState))if(n=e,s&&(l.onreadystatechange=E.noop,ae&&delete re[s]),r)4!==l.readyState&&l.abort();else{o=l.status,c=l.getAllResponseHeaders(),d={},(p=l.responseXML)&&p.documentElement&&(d.xml=p),d.text=l.responseText;try{h=l.statusText}catch(R){h=""}o||!i.isLocal||i.crossDomain?1223===o&&(o=204):o=d.text?200:404}}catch(W){r||a(-1,W)}d&&a(o,h,d,c)},i.async&&4!==l.readyState?(s=++se,ae&&(re||(re={},E(t).unload(ae)),re[s]=n),l.onreadystatechange=n):n()},abort:function(){n&&n(0,1)}}}));var oe,le,he,ce,de={},pe=/^(?:toggle|show|hide)$/,ue=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ge=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];E.fn.extend({show:function(t,e,i){var a,s;if(t||0===t)return this.animate(r("show",3),t,e,i);for(var o=0,l=this.length;o<l;o++)(a=this[o]).style&&(s=a.style.display,!E._data(a,"olddisplay")&&"none"===s&&(s=a.style.display=""),""===s&&"none"===E.css(a,"display")&&E._data(a,"olddisplay",n(a.nodeName)));for(o=0;o<l;o++)(a=this[o]).style&&(""!==(s=a.style.display)&&"none"!==s||(a.style.display=E._data(a,"olddisplay")||""));return this},hide:function(t,e,i){if(t||0===t)return this.animate(r("hide",3),t,e,i);for(var n,a,s=0,o=this.length;s<o;s++)(n=this[s]).style&&("none"!==(a=E.css(n,"display"))&&!E._data(n,"olddisplay")&&E._data(n,"olddisplay",a));for(s=0;s<o;s++)this[s].style&&(this[s].style.display="none");return this},_toggle:E.fn.toggle,toggle:function(t,e,i){var n="boolean"==typeof t;return E.isFunction(t)&&E.isFunction(e)?this._toggle.apply(this,arguments):null==t||n?this.each((function(){var e=n?t:E(this).is(":hidden");E(this)[e?"show":"hide"]()})):this.animate(r("toggle",3),t,e,i),this},fadeTo:function(t,e,i,n){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,r){function a(){!1===s.queue&&E._mark(this);var e,i,r,a,o,l,h,c,d,p=E.extend({},s),u=1===this.nodeType,g=u&&E(this).is(":hidden");for(r in p.animatedProperties={},t){if(r!==(e=E.camelCase(r))&&(t[e]=t[r],delete t[r]),i=t[e],E.isArray(i)?(p.animatedProperties[e]=i[1],i=t[e]=i[0]):p.animatedProperties[e]=p.specialEasing&&p.specialEasing[e]||p.easing||"swing","hide"===i&&g||"show"===i&&!g)return p.complete.call(this);u&&("height"===e||"width"===e)&&(p.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===E.css(this,"display")&&"none"===E.css(this,"float")&&(E.support.inlineBlockNeedsLayout&&"inline"!==n(this.nodeName)?this.style.zoom=1:this.style.display="inline-block"))}for(r in null!=p.overflow&&(this.style.overflow="hidden"),t)a=new E.fx(this,p,r),i=t[r],pe.test(i)?(d=E._data(this,"toggle"+r)||("toggle"===i?g?"show":"hide":0))?(E._data(this,"toggle"+r,"show"===d?"hide":"show"),a[d]()):a[i]():(o=ue.exec(i),l=a.cur(),o?(h=parseFloat(o[2]),"px"!==(c=o[3]||(E.cssNumber[r]?"":"px"))&&(E.style(this,r,(h||1)+c),l=(h||1)/a.cur()*l,E.style(this,r,l+c)),o[1]&&(h=("-="===o[1]?-1:1)*h+l),a.custom(l,h,c)):a.custom(l,i,""));return!0}var s=E.speed(e,i,r);return E.isEmptyObject(t)?this.each(s.complete,[!1]):(t=E.extend({},t),!1===s.queue?this.each(a):this.queue(s.queue,a))},stop:function(t,i,n){return"string"!=typeof t&&(n=i,i=t,t=e),i&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){function e(t,e,i){var r=e[i];E.removeData(t,i,!0),r.stop(n)}var i,r=!1,a=E.timers,s=E._data(this);if(n||E._unmark(!0,this),null==t)for(i in s)s[i].stop&&i.indexOf(".run")===i.length-4&&e(this,s,i);else s[i=t+".run"]&&s[i].stop&&e(this,s,i);for(i=a.length;i--;)a[i].elem===this&&(null==t||a[i].queue===t)&&(n?a[i](!0):a[i].saveState(),r=!0,a.splice(i,1));(!n||!r)&&E.dequeue(this,t)}))}}),E.each({slideDown:r("show",1),slideUp:r("hide",1),slideToggle:r("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){E.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),E.extend({speed:function(t,e,i){var n=t&&"object"==typeof t?E.extend({},t):{complete:i||!i&&e||E.isFunction(t)&&t,duration:t,easing:i&&e||e&&!E.isFunction(e)&&e};return n.duration=E.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in E.fx.speeds?E.fx.speeds[n.duration]:E.fx.speeds._default,null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(t){E.isFunction(n.old)&&n.old.call(this),n.queue?E.dequeue(this,n.queue):!1!==t&&E._unmark(this)},n},easing:{linear:function(t,e,i,n){return i+n*t},swing:function(t,e,i,n){return(-Math.cos(t*Math.PI)/2+.5)*n+i}},timers:[],fx:function(t,e,i){this.options=e,this.elem=t,this.prop=i,e.orig=e.orig||{}}}),E.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(E.fx.step[this.prop]||E.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var t,e=E.css(this.elem,this.prop);return isNaN(t=parseFloat(e))?e&&"auto"!==e?e:0:t},custom:function(t,i,n){function r(t){return a.step(t)}var a=this,o=E.fx;this.startTime=ce||s(),this.end=i,this.now=this.start=t,this.pos=this.state=0,this.unit=n||this.unit||(E.cssNumber[this.prop]?"":"px"),r.queue=this.options.queue,r.elem=this.elem,r.saveState=function(){a.options.hide&&E._data(a.elem,"fxshow"+a.prop)===e&&E._data(a.elem,"fxshow"+a.prop,a.start)},r()&&E.timers.push(r)&&!he&&(he=setInterval(o.tick,o.interval))},show:function(){var t=E._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=t||E.style(this.elem,this.prop),this.options.show=!0,t!==e?this.custom(this.cur(),t):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur()),E(this.elem).show()},hide:function(){this.options.orig[this.prop]=E._data(this.elem,"fxshow"+this.prop)||E.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(t){var e,i,n,r=ce||s(),a=!0,o=this.elem,l=this.options;if(t||r>=l.duration+this.startTime){for(e in this.now=this.end,this.pos=this.state=1,this.update(),l.animatedProperties[this.prop]=!0,l.animatedProperties)!0!==l.animatedProperties[e]&&(a=!1);if(a){if(null!=l.overflow&&!E.support.shrinkWrapBlocks&&E.each(["","X","Y"],(function(t,e){o.style["overflow"+e]=l.overflow[t]})),l.hide&&E(o).hide(),l.hide||l.show)for(e in l.animatedProperties)E.style(o,e,l.orig[e]),E.removeData(o,"fxshow"+e,!0),E.removeData(o,"toggle"+e,!0);(n=l.complete)&&(l.complete=!1,n.call(o))}return!1}return l.duration==1/0?this.now=r:(i=r-this.startTime,this.state=i/l.duration,this.pos=E.easing[l.animatedProperties[this.prop]](this.state,i,0,1,l.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},E.extend(E.fx,{tick:function(){for(var t,e=E.timers,i=0;i<e.length;i++)!(t=e[i])()&&e[i]===t&&e.splice(i--,1);e.length||E.fx.stop()},interval:13,stop:function(){clearInterval(he),he=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(t){E.style(t.elem,"opacity",t.now)},_default:function(t){t.elem.style&&null!=t.elem.style[t.prop]?t.elem.style[t.prop]=t.now+t.unit:t.elem[t.prop]=t.now}}}),E.each(["width","height"],(function(t,e){E.fx.step[e]=function(t){E.style(t.elem,e,Math.max(0,t.now))}})),E.expr&&E.expr.filters&&(E.expr.filters.animated=function(t){return E.grep(E.timers,(function(e){return t===e.elem})).length});var fe=/^t(?:able|d|h)$/i,me=/^(?:body|html)$/i;"getBoundingClientRect"in C.documentElement?E.fn.offset=function(t){var e,n=this[0];if(t)return this.each((function(e){E.offset.setOffset(this,t,e)}));if(!n||!n.ownerDocument)return null;if(n===n.ownerDocument.body)return E.offset.bodyOffset(n);try{e=n.getBoundingClientRect()}catch(M){}var r=n.ownerDocument,a=r.documentElement;if(!e||!E.contains(a,n))return e?{top:e.top,left:e.left}:{top:0,left:0};var s=r.body,o=i(r),l=a.clientTop||s.clientTop||0,h=a.clientLeft||s.clientLeft||0,c=o.pageYOffset||E.support.boxModel&&a.scrollTop||s.scrollTop,d=o.pageXOffset||E.support.boxModel&&a.scrollLeft||s.scrollLeft;return{top:e.top+c-l,left:e.left+d-h}}:E.fn.offset=function(t){var e=this[0];if(t)return this.each((function(e){E.offset.setOffset(this,t,e)}));if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return E.offset.bodyOffset(e);for(var i,n=e.offsetParent,r=e.ownerDocument,a=r.documentElement,s=r.body,o=r.defaultView,l=o?o.getComputedStyle(e,null):e.currentStyle,h=e.offsetTop,c=e.offsetLeft;(e=e.parentNode)&&e!==s&&e!==a&&(!E.support.fixedPosition||"fixed"!==l.position);)i=o?o.getComputedStyle(e,null):e.currentStyle,h-=e.scrollTop,c-=e.scrollLeft,e===n&&(h+=e.offsetTop,c+=e.offsetLeft,E.support.doesNotAddBorder&&(!E.support.doesAddBorderForTableAndCells||!fe.test(e.nodeName))&&(h+=parseFloat(i.borderTopWidth)||0,c+=parseFloat(i.borderLeftWidth)||0),n=e.offsetParent),E.support.subtractsBorderForOverflowNotVisible&&"visible"!==i.overflow&&(h+=parseFloat(i.borderTopWidth)||0,c+=parseFloat(i.borderLeftWidth)||0),l=i;return"relative"!==l.position&&"static"!==l.position||(h+=s.offsetTop,c+=s.offsetLeft),E.support.fixedPosition&&"fixed"===l.position&&(h+=Math.max(a.scrollTop,s.scrollTop),c+=Math.max(a.scrollLeft,s.scrollLeft)),{top:h,left:c}},E.offset={bodyOffset:function(t){var e=t.offsetTop,i=t.offsetLeft;return E.support.doesNotIncludeMarginInBodyOffset&&(e+=parseFloat(E.css(t,"marginTop"))||0,i+=parseFloat(E.css(t,"marginLeft"))||0),{top:e,left:i}},setOffset:function(t,e,i){var n=E.css(t,"position");"static"===n&&(t.style.position="relative");var r,a,s=E(t),o=s.offset(),l=E.css(t,"top"),h=E.css(t,"left"),c={},d={};("absolute"===n||"fixed"===n)&&E.inArray("auto",[l,h])>-1?(r=(d=s.position()).top,a=d.left):(r=parseFloat(l)||0,a=parseFloat(h)||0),E.isFunction(e)&&(e=e.call(t,i,o)),null!=e.top&&(c.top=e.top-o.top+r),null!=e.left&&(c.left=e.left-o.left+a),"using"in e?e.using.call(t,c):s.css(c)}},E.fn.extend({position:function(){if(!this[0])return null;var t=this[0],e=this.offsetParent(),i=this.offset(),n=me.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(E.css(t,"marginTop"))||0,i.left-=parseFloat(E.css(t,"marginLeft"))||0,n.top+=parseFloat(E.css(e[0],"borderTopWidth"))||0,n.left+=parseFloat(E.css(e[0],"borderLeftWidth"))||0,{top:i.top-n.top,left:i.left-n.left}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||C.body;t&&!me.test(t.nodeName)&&"static"===E.css(t,"position");)t=t.offsetParent;return t}))}}),E.each(["Left","Top"],(function(t,n){var r="scroll"+n;E.fn[r]=function(n){var a,s;return n===e?(a=this[0])?(s=i(a))?"pageXOffset"in s?s[t?"pageYOffset":"pageXOffset"]:E.support.boxModel&&s.document.documentElement[r]||s.document.body[r]:a[r]:null:this.each((function(){(s=i(this))?s.scrollTo(t?E(s).scrollLeft():n,t?n:E(s).scrollTop()):this[r]=n}))}})),E.each(["Height","Width"],(function(t,i){var n=i.toLowerCase();E.fn["inner"+i]=function(){var t=this[0];return t?t.style?parseFloat(E.css(t,n,"padding")):this[n]():null},E.fn["outer"+i]=function(t){var e=this[0];return e?e.style?parseFloat(E.css(e,n,t?"margin":"border")):this[n]():null},E.fn[n]=function(t){var r=this[0];if(!r)return null==t?null:this;if(E.isFunction(t))return this.each((function(e){var i=E(this);i[n](t.call(this,e,i[n]()))}));if(E.isWindow(r)){var a=r.document.documentElement["client"+i],s=r.document.body;return"CSS1Compat"===r.document.compatMode&&a||s&&s["client"+i]||a}if(9===r.nodeType)return Math.max(r.documentElement["client"+i],r.body["scroll"+i],r.documentElement["scroll"+i],r.body["offset"+i],r.documentElement["offset"+i]);if(t===e){var o=E.css(r,n),l=parseFloat(o);return E.isNumeric(l)?l:o}return this.css(n,"string"==typeof t?t:t+"px")}})),t.jQuery=t.$=E}(window),function(t){var e,i,n="",r=Math.PI,a=r/2,s="ontouchstart"in window,o=s?{down:"touchstart",move:"touchmove",up:"touchend",over:"touchstart",out:"touchend"}:{down:"mousedown",move:"mousemove",up:"mouseup",over:"mouseover",out:"mouseout"},l={backward:["bl","tl"],forward:["br","tr"],all:["tl","bl","tr","br","l","r"]},h=["single","double"],c=["ltr","rtl"],d={acceleration:!0,display:"double",duration:600,page:1,gradients:!0,turnCorners:"bl,br",when:null},p={cornerSize:100},u={init:function(r){var a;e="WebKitCSSMatrix"in window||"MozPerspective"in document.body.style,i=!(a=/AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent))||parseFloat(a[1])>534.3,n=_();var l,h=0,c=this.data(),p=this.children();if(r=t.extend({width:this.width(),height:this.height(),direction:this.attr("dir")||this.css("direction")||"ltr"},d,r),c.opts=r,c.pageObjs={},c.pages={},c.pageWrap={},c.pageZoom={},c.pagePlace={},c.pageMv=[],c.zoom=1,c.totalPages=r.pages||0,c.eventHandlers={touchStart:t.proxy(u._touchStart,this),touchMove:t.proxy(u._touchMove,this),touchEnd:t.proxy(u._touchEnd,this),start:t.proxy(u._eventStart,this)},r.when)for(l in r.when)b(l,r.when)&&this.bind(l,r.when[l]);for(this.css({position:"relative",width:r.width,height:r.height}),this.turn("display",r.display),""!==r.direction&&this.turn("direction",r.direction),e&&!s&&r.acceleration&&this.transform(x(0,0,!0)),l=0;l<p.length;l++)"1"!=t(p[l]).attr("ignore")&&this.turn("addPage",p[l],++h);return t(this).bind(o.down,c.eventHandlers.touchStart).bind("end",u._eventEnd).bind("pressed",u._eventPressed).bind("released",u._eventReleased).bind("flip",u._flip),t(this).parent().bind("start",c.eventHandlers.start),t(document).bind(o.move,c.eventHandlers.touchMove).bind(o.up,c.eventHandlers.touchEnd),this.turn("page",r.page),c.done=!0,this},addPage:function(e,i){var n,r,a=!1,s=this.data(),o=s.totalPages+1;if(s.destroying)return!1;if((n=/\bp([0-9]+)\b/.exec(t(e).attr("class")))&&(i=parseInt(n[1],10)),i){if(i==o)a=!0;else if(i>o)throw S('Page "'+i+'" cannot be inserted')}else i=o,a=!0;return i>=1&&i<=o&&(r="double"==s.display?i%2?" odd":" even":"",s.done&&this.turn("stop"),i in s.pageObjs&&u._movePages.call(this,i,1),a&&(s.totalPages=o),s.pageObjs[i]=t(e).css({float:"left"}).addClass("page p"+i+r),-1!=navigator.userAgent.indexOf("MSIE 9.0")&&s.pageObjs[i].hasClass("hard")&&s.pageObjs[i].removeClass("hard"),u._addPage.call(this,i),u._removeFromDOM.call(this)),this},_addPage:function(e){var i=this.data(),n=i.pageObjs[e];if(n)if(u._necessPage.call(this,e)){if(!i.pageWrap[e]){i.pageWrap[e]=t("<div/>",{class:"page-wrapper",page:e,css:{position:"absolute",overflow:"hidden"}}),this.append(i.pageWrap[e]),i.pagePlace[e]||(i.pagePlace[e]=e,i.pageObjs[e].appendTo(i.pageWrap[e]));var r=u._pageSize.call(this,e,!0);n.css({width:r.width,height:r.height}),i.pageWrap[e].css(r)}i.pagePlace[e]==e&&u._makeFlip.call(this,e)}else i.pagePlace[e]=0,i.pageObjs[e]&&i.pageObjs[e].remove()},hasPage:function(t){return b(t,this.data().pageObjs)},center:function(e){var i=this.data(),n=t(this).turn("size"),r=0;if(!i.noCenter){if("double"==i.display){var a=this.turn("view",e||i.tpage||i.page);"ltr"==i.direction?a[0]?a[1]||(r+=n.width/4):r-=n.width/4:a[0]?a[1]||(r-=n.width/4):r+=n.width/4}t(this).css({marginLeft:r})}return this},destroy:function(){var e=this,i=this.data();if("prevented"!=P("destroying",this)){for(i.destroying=!0,t.each(["end","first","flip","last","pressed","released","start","turning","turned","zooming","missing"],(function(t,i){e.unbind(i)})),this.parent().unbind("start",i.eventHandlers.start),t(document).unbind(o.move,i.eventHandlers.touchMove).unbind(o.up,i.eventHandlers.touchEnd);0!==i.totalPages;)this.turn("removePage",i.totalPages);return i.fparent&&i.fparent.remove(),i.shadow&&i.shadow.remove(),this.removeData(),i=null,this}},is:function(){return"object"==typeof this.data().pages},zoom:function(e){var i=this.data();if("number"==typeof e){if(e<.001||e>100)throw S(e+" is not a value for zoom");if("prevented"==P("zooming",this,[e,i.zoom]))return this;var n=this.turn("size"),r=this.turn("view"),a=1/i.zoom,s=Math.round(n.width*a*e),o=Math.round(n.height*a*e);i.zoom=e,t(this).turn("stop").turn("size",s,o),i.opts.autoCenter&&this.turn("center"),u._updateShadow.call(this);for(var l=0;l<r.length;l++)r[l]&&i.pageZoom[r[l]]!=i.zoom&&(this.trigger("zoomed",[r[l],r,i.pageZoom[r[l]],i.zoom]),i.pageZoom[r[l]]=i.zoom);return this}return i.zoom},_pageSize:function(t,e){var i=this.data(),n={};if("single"==i.display)n.width=this.width(),n.height=this.height(),e&&(n.top=0,n.left=0,n.right="auto");else{var r=this.width()/2,a=this.height();if(i.pageObjs[t].hasClass("own-size")?(n.width=i.pageObjs[t].width(),n.height=i.pageObjs[t].height()):(n.width=r,n.height=a),e){var s=t%2;n.top=(a-n.height)/2,"ltr"==i.direction?(n[s?"right":"left"]=r-n.width,n[s?"left":"right"]="auto"):(n[s?"left":"right"]=r-n.width,n[s?"right":"left"]="auto")}}return n},_makeFlip:function(t){var e=this.data();if(!e.pages[t]&&e.pagePlace[t]==t){var i="single"==e.display,n=t%2;e.pages[t]=e.pageObjs[t].css(u._pageSize.call(this,t)).flip({page:t,next:n||i?t+1:t-1,turn:this}).flip("disable",e.disabled),u._setPageLoc.call(this,t),e.pageZoom[t]=e.zoom}return e.pages[t]},_makeRange:function(){var t,e;if(!(this.data().totalPages<1))for(t=(e=this.turn("range"))[0];t<=e[1];t++)u._addPage.call(this,t)},range:function(t){var e,i,n,r,a=this.data();if(t=t||a.tpage||a.page||1,r=u._view.call(this,t),t<1||t>a.totalPages)throw S('"'+t+'" is not a valid page');return r[1]=r[1]||r[0],r[0]>=1&&r[1]<=a.totalPages?(e=Math.floor(2),a.totalPages-r[1]>r[0]?n=2*e-(i=Math.min(r[0]-1,e)):i=2*e-(n=Math.min(a.totalPages-r[1],e))):(i=5,n=5),[Math.max(1,r[0]-i),Math.min(a.totalPages,r[1]+n)]},_necessPage:function(t){if(0===t)return!0;var e=this.turn("range");return this.data().pageObjs[t].hasClass("fixed")||t>=e[0]&&t<=e[1]},_removeFromDOM:function(){var t,e=this.data();for(t in e.pageWrap)b(t,e.pageWrap)&&!u._necessPage.call(this,t)&&u._removePageFromDOM.call(this,t)},_removePageFromDOM:function(t){var e=this.data();if(e.pages[t]){var i=e.pages[t].data();g._moveFoldingPage.call(e.pages[t],!1),i.f&&i.f.fwrapper&&i.f.fwrapper.remove(),e.pages[t].removeData(),e.pages[t].remove(),delete e.pages[t]}e.pageObjs[t]&&e.pageObjs[t].remove(),e.pageWrap[t]&&(e.pageWrap[t].remove(),delete e.pageWrap[t]),u._removeMv.call(this,t),delete e.pagePlace[t],delete e.pageZoom[t]},removePage:function(t){var e=this.data();if("*"==t)for(;0!==e.totalPages;)this.turn("removePage",e.totalPages);else{if(t<1||t>e.totalPages)throw S("The page "+t+" doesn't exist");e.pageObjs[t]&&(this.turn("stop"),u._removePageFromDOM.call(this,t),delete e.pageObjs[t]),u._movePages.call(this,t,-1),e.totalPages=e.totalPages-1,e.page>e.totalPages?(e.page=null,u._fitPage.call(this,e.totalPages)):(u._makeRange.call(this),this.turn("update"))}return this},_movePages:function(t,e){var i,n=this,r=this.data(),a="single"==r.display,s=function(t){var i=t+e,s=i%2,o=s?" odd ":" even ";r.pageObjs[t]&&(r.pageObjs[i]=r.pageObjs[t].removeClass("p"+t+" odd even").addClass("p"+i+o)),r.pagePlace[t]&&r.pageWrap[t]&&(r.pagePlace[i]=i,r.pageObjs[i].hasClass("fixed")?r.pageWrap[i]=r.pageWrap[t].attr("page",i):r.pageWrap[i]=r.pageWrap[t].css(u._pageSize.call(n,i,!0)).attr("page",i),r.pages[t]&&(r.pages[i]=r.pages[t].flip("options",{page:i,next:a||s?i+1:i-1})),e&&(delete r.pages[t],delete r.pagePlace[t],delete r.pageZoom[t],delete r.pageObjs[t],delete r.pageWrap[t]))};if(e>0)for(i=r.totalPages;i>=t;i--)s(i);else for(i=t;i<=r.totalPages;i++)s(i)},display:function(e){var i=this.data(),n=i.display;if(void 0===e)return n;if(-1==t.inArray(e,h))throw S('"'+e+'" is not a value for display');switch(e){case"single":i.pageObjs[0]||(this.turn("stop").css({overflow:"hidden"}),i.pageObjs[0]=t("<div />",{class:"page p-temporal"}).css({width:this.width(),height:this.height()}).appendTo(this)),this.addClass("shadow");break;case"double":i.pageObjs[0]&&(this.turn("stop").css({overflow:""}),i.pageObjs[0].remove(),delete i.pageObjs[0]),this.removeClass("shadow")}if(i.display=e,n){var r=this.turn("size");u._movePages.call(this,1,0),this.turn("size",r.width,r.height).turn("update")}return this},direction:function(e){var i=this.data();if(void 0===e)return i.direction;if(e=e.toLowerCase(),-1==t.inArray(e,c))throw S('"'+e+'" is not a value for direction');return"rtl"==e&&t(this).attr("dir","ltr").css({direction:"ltr"}),i.direction=e,i.done&&this.turn("size",t(this).width(),t(this).height()),this},animating:function(){return this.data().pageMv.length>0},corner:function(){var t,e,i=this.data();for(e in i.pages)if(b(e,i.pages)&&(t=i.pages[e].flip("corner")))return t;return!1},data:function(){return this.data()},disable:function(e){var i,n=this.data(),r=this.turn("view");for(i in n.disabled=void 0===e||!0===e,n.pages)b(i,n.pages)&&n.pages[i].flip("disable",!!n.disabled||-1==t.inArray(parseInt(i,10),r));return this},disabled:function(t){return void 0===t?!0===this.data().disabled:this.turn("disable",t)},size:function(t,e){if(void 0===t||void 0===e)return{width:this.width(),height:this.height()};this.turn("stop");var i,n,r=this.data(),a="double"==r.display?t/2:t;for(i in this.css({width:t,height:e}),r.pageObjs[0]&&r.pageObjs[0].css({width:a,height:e}),r.pageWrap)b(i,r.pageWrap)&&(n=u._pageSize.call(this,i,!0),r.pageObjs[i].css({width:n.width,height:n.height}),r.pageWrap[i].css(n),r.pages[i]&&r.pages[i].css({width:n.width,height:n.height}));return this.turn("resize"),this},resize:function(){var t,e=this.data();for(e.pages[0]&&(e.pageWrap[0].css({left:-this.width()}),e.pages[0].flip("resize",!0)),t=1;t<=e.totalPages;t++)e.pages[t]&&e.pages[t].flip("resize",!0);u._updateShadow.call(this),e.opts.autoCenter&&this.turn("center")},_removeMv:function(t){var e,i=this.data();for(e=0;e<i.pageMv.length;e++)if(i.pageMv[e]==t)return i.pageMv.splice(e,1),!0;return!1},_addMv:function(t){var e=this.data();u._removeMv.call(this,t),e.pageMv.push(t)},_view:function(t){var e=this.data();return t=t||e.page,"double"==e.display?t%2?[t-1,t]:[t,t+1]:[t]},view:function(t){var e=this.data(),i=u._view.call(this,t);return"double"==e.display?[i[0]>0?i[0]:0,i[1]<=e.totalPages?i[1]:0]:[i[0]>0&&i[0]<=e.totalPages?i[0]:0]},stop:function(t,e){if(this.turn("animating")){var i,n,r,a=this.data();for(a.tpage&&(a.page=a.tpage,delete a.tpage),i=0;i<a.pageMv.length;i++)a.pageMv[i]&&a.pageMv[i]!==t&&(n=(r=a.pages[a.pageMv[i]]).data().f.opts,r.flip("hideFoldedPage",e),e||g._moveFoldingPage.call(r,!1),n.force&&(n.next=n.page%2==0?n.page-1:n.page+1,delete n.force))}return this.turn("update"),this},pages:function(t){var e=this.data();if(t){if(t<e.totalPages)for(var i=e.totalPages;i>t;i--)this.turn("removePage",i);return e.totalPages=t,u._fitPage.call(this,e.page),this}return e.totalPages},_missing:function(t){var e=this.data();if(!(e.totalPages<1)){var i,n=this.turn("range",t),r=[];for(i=n[0];i<=n[1];i++)e.pageObjs[i]||r.push(i);r.length>0&&this.trigger("missing",[r])}},_fitPage:function(t){var e=this.data(),i=this.turn("view",t);if(u._missing.call(this,t),e.pageObjs[t]){e.page=t,this.turn("stop");for(var n=0;n<i.length;n++)i[n]&&e.pageZoom[i[n]]!=e.zoom&&(this.trigger("zoomed",[i[n],i,e.pageZoom[i[n]],e.zoom]),e.pageZoom[i[n]]=e.zoom);u._removeFromDOM.call(this),u._makeRange.call(this),u._updateShadow.call(this),this.trigger("turned",[t,i]),this.turn("update"),e.opts.autoCenter&&this.turn("center")}},_turnPage:function(e){var i,n,r=this.data(),a=r.pagePlace[e],s=this.turn("view"),o=this.turn("view",e);if(r.page!=e){var l=r.page;if("prevented"==P("turning",this,[e,o]))return void(l==r.page&&-1!=t.inArray(a,r.pageMv)&&r.pages[a].flip("hideFoldedPage",!0));-1!=t.inArray(1,o)&&this.trigger("first"),-1!=t.inArray(r.totalPages,o)&&this.trigger("last")}"single"==r.display?(i=s[0],n=o[0]):s[1]&&e>s[1]?(i=s[1],n=o[0]):s[0]&&e<s[0]&&(i=s[0],n=o[1]);var h=r.opts.turnCorners.split(","),c=r.pages[i].data().f,d=c.opts,p=c.point;u._missing.call(this,e),r.pageObjs[e]&&(this.turn("stop"),r.page=e,u._makeRange.call(this),r.tpage=n,d.next!=n&&(d.next=n,d.force=!0),this.turn("update"),c.point=p,"hard"==c.effect?"ltr"==r.direction?r.pages[i].flip("turnPage",e>i?"r":"l"):r.pages[i].flip("turnPage",e>i?"l":"r"):"ltr"==r.direction?r.pages[i].flip("turnPage",h[e>i?1:0]):r.pages[i].flip("turnPage",h[e>i?0:1]))},page:function(e){var i=this.data();if(void 0===e)return i.page;if(!i.disabled&&!i.destroying){if((e=parseInt(e,10))>0&&e<=i.totalPages)return e!=i.page&&(i.done&&-1==t.inArray(e,this.turn("view"))?u._turnPage.call(this,e):u._fitPage.call(this,e)),this;throw S("The page "+e+" does not exist")}},next:function(){return this.turn("page",Math.min(this.data().totalPages,u._view.call(this,this.data().page).pop()+1))},previous:function(){return this.turn("page",Math.max(1,u._view.call(this,this.data().page).shift()-1))},peel:function(t,e){var i,n=this.data(),r=this.turn("view");(e=void 0===e||!0===e,!1===t)?this.turn("stop",null,e):"single"==n.display?n.pages[n.page].flip("peel",t,e):(i="ltr"==n.direction?-1!=t.indexOf("l")?r[0]:r[1]:-1!=t.indexOf("l")?r[1]:r[0],n.pages[i]&&n.pages[i].flip("peel",t,e));return this},_addMotionPage:function(){var e=t(this).data().f.opts,i=e.turn;i.data(),u._addMv.call(i,e.page)},_eventStart:function(t,e,i){var n=e.turn.data(),r=n.pageZoom[e.page];t.isDefaultPrevented()||(r&&r!=n.zoom&&(e.turn.trigger("zoomed",[e.page,e.turn.turn("view",e.page),r,n.zoom]),n.pageZoom[e.page]=n.zoom),"single"==n.display&&i&&("l"==i.charAt(1)&&"ltr"==n.direction||"r"==i.charAt(1)&&"rtl"==n.direction?(e.next=e.next<e.page?e.next:e.page-1,e.force=!0):e.next=e.next>e.page?e.next:e.page+1),u._addMotionPage.call(t.target)),u._updateShadow.call(e.turn)},_eventEnd:function(e,i,n){t(e.target).data().f;var r=i.turn,a=r.data();if(n){var s=a.tpage||a.page;s!=i.next&&s!=i.page||(delete a.tpage,u._fitPage.call(r,s||i.next,!0))}else u._removeMv.call(r,i.page),u._updateShadow.call(r),r.turn("update")},_eventPressed:function(e){var i=t(e.target).data().f,n=i.opts.turn,r=n.data();return r.pages,r.mouseAction=!0,n.turn("update"),i.time=(new Date).getTime()},_eventReleased:function(e,i){var n,r=t(e.target),a=r.data().f,s=a.opts.turn,o=s.data();n="single"==o.display?"br"==i.corner||"tr"==i.corner?i.x<r.width()/2:i.x>r.width()/2:i.x<0||i.x>r.width(),((new Date).getTime()-a.time<200||n)&&(e.preventDefault(),u._turnPage.call(s,a.opts.next)),o.mouseAction=!1},_flip:function(e){e.stopPropagation();var i=t(e.target).data().f.opts;i.turn.trigger("turn",[i.next]),i.turn.data().opts.autoCenter&&i.turn.turn("center",i.next)},_touchStart:function(){var t=this.data();for(var e in t.pages)if(b(e,t.pages)&&!1===g._eventStart.apply(t.pages[e],arguments))return!1},_touchMove:function(){var t=this.data();for(var e in t.pages)b(e,t.pages)&&g._eventMove.apply(t.pages[e],arguments)},_touchEnd:function(){var t=this.data();for(var e in t.pages)b(e,t.pages)&&g._eventEnd.apply(t.pages[e],arguments)},calculateZ:function(t){var e,i,n,r,a,s=this,o=this.data(),l=this.turn("view"),h=l[0]||l[1],c=t.length-1,d={pageZ:{},partZ:{},pageV:{}},p=function(t){var e=s.turn("view",t);e[0]&&(d.pageV[e[0]]=!0),e[1]&&(d.pageV[e[1]]=!0)};for(e=0;e<=c;e++)i=t[e],n=o.pages[i].data().f.opts.next,r=o.pagePlace[i],p(i),p(n),a=o.pagePlace[n]==n?n:i,d.pageZ[a]=o.totalPages-Math.abs(h-a),d.partZ[r]=2*o.totalPages-c+e;return d},update:function(){var e,i=this.data();if(this.turn("animating")&&0!==i.pageMv[0]){var n,r,a=this.turn("calculateZ",i.pageMv),s=this.turn("corner"),o=this.turn("view"),l=this.turn("view",i.tpage);for(e in i.pageWrap)b(e,i.pageWrap)&&(r=i.pageObjs[e].hasClass("fixed"),i.pageWrap[e].css({display:a.pageV[e]||r?"":"none",zIndex:(i.pageObjs[e].hasClass("hard")?a.partZ[e]:a.pageZ[e])||(r?-1:0)}),(n=i.pages[e])&&(n.flip("z",a.partZ[e]||null),a.pageV[e]&&n.flip("resize"),i.tpage?n.flip("hover",!1).flip("disable",-1==t.inArray(parseInt(e,10),i.pageMv)&&e!=l[0]&&e!=l[1]):n.flip("hover",!1===s).flip("disable",e!=o[0]&&e!=o[1])))}else for(e in i.pageWrap)if(b(e,i.pageWrap)){var h=u._setPageLoc.call(this,e);i.pages[e]&&i.pages[e].flip("disable",i.disabled||1!=h).flip("hover",!0).flip("z",null)}return this},_updateShadow:function(){var e,i,n=this.data(),r=this.width(),a=this.height(),s="single"==n.display?r:r/2;e=this.turn("view"),n.shadow||(n.shadow=t("<div />",{class:"shadow",css:m(0,0,0).css}).appendTo(this));for(var o=0;o<n.pageMv.length&&(e[0]&&e[1]);o++)e=this.turn("view",n.pages[n.pageMv[o]].data().f.opts.next),i=this.turn("view",n.pageMv[o]),e[0]=e[0]&&i[0],e[1]=e[1]&&i[1];switch(e[0]?e[1]?3:"ltr"==n.direction?2:1:"ltr"==n.direction?1:2){case 1:n.shadow.css({width:s,height:a,top:0,left:s});break;case 2:n.shadow.css({width:s,height:a,top:0,left:0});break;case 3:n.shadow.css({width:r,height:a,top:0,left:0})}},_setPageLoc:function(t){var e=this.data(),i=this.turn("view"),n=0;if(t==i[0]||t==i[1]?n=1:("single"==e.display&&t==i[0]+1||"double"==e.display&&t==i[0]-2||t==i[1]+2)&&(n=2),!this.turn("animating"))switch(n){case 1:e.pageWrap[t].css({zIndex:e.totalPages,display:""});break;case 2:e.pageWrap[t].css({zIndex:e.totalPages-1,display:""});break;case 0:e.pageWrap[t].css({zIndex:0,display:e.pageObjs[t].hasClass("fixed")?"":"none"})}return n},options:function(e){if(void 0===e)return this.data().opts;var i=this.data();if(t.extend(i.opts,e),e.pages&&this.turn("pages",e.pages),e.page&&this.turn("page",e.page),e.display&&this.turn("display",e.display),e.direction&&this.turn("direction",e.direction),e.width&&e.height&&this.turn("size",e.width,e.height),e.when)for(var n in e.when)b(n,e.when)&&this.unbind(n).bind(n,e.when[n]);return this},version:function(){return"4.1.0"}},g={init:function(t){return this.data({f:{disabled:!1,hover:!1,effect:this.hasClass("hard")?"hard":"sheet"}}),this.flip("options",t),g._addPageWrapper.call(this),this},setData:function(e){var i=this.data();return i.f=t.extend(i.f,e),this},options:function(e){var i=this.data().f;return e?(g.setData.call(this,{opts:t.extend({},i.opts||p,e)}),this):i.opts},z:function(t){var e=this.data().f;return e.opts["z-index"]=t,e.fwrapper&&e.fwrapper.css({zIndex:t||parseInt(e.parent.css("z-index"),10)||0}),this},_cAllowed:function(){var t=this.data().f,e=t.opts.page,i=t.opts.turn.data(),n=e%2;return"hard"==t.effect?"ltr"==i.direction?[n?"r":"l"]:[n?"l":"r"]:"single"==i.display?1==e?"ltr"==i.direction?l.forward:l.backward:e==i.totalPages?"ltr"==i.direction?l.backward:l.forward:l.all:"ltr"==i.direction?l[n?"forward":"backward"]:l[n?"backward":"forward"]},_cornerActivated:function(e){var i=this.data().f,n=this.width(),r=this.height(),a={x:e.x,y:e.y,corner:""},s=i.opts.cornerSize;if(a.x<=0||a.y<=0||a.x>=n||a.y>=r)return!1;var o=g._cAllowed.call(this);switch(i.effect){case"hard":if(a.x>n-s)a.corner="r";else{if(!(a.x<s))return!1;a.corner="l"}break;case"sheet":if(a.y<s)a.corner+="t";else{if(!(a.y>=r-s))return!1;a.corner+="b"}if(a.x<=s)a.corner+="l";else{if(!(a.x>=n-s))return!1;a.corner+="r"}}return!(!a.corner||-1==t.inArray(a.corner,o))&&a},_isIArea:function(t){var e=this.data().f.parent.offset();return t=s&&t.originalEvent?t.originalEvent.touches[0]:t,g._cornerActivated.call(this,{x:t.pageX-e.left,y:t.pageY-e.top})},_c:function(t,e){switch(e=e||0,t){case"tl":return y(e,e);case"tr":return y(this.width()-e,e);case"bl":return y(e,this.height()-e);case"br":return y(this.width()-e,this.height()-e);case"l":return y(e,0);case"r":return y(this.width()-e,0)}},_c2:function(t){switch(t){case"tl":case"l":return y(2*this.width(),0);case"tr":case"r":return y(-this.width(),0);case"bl":return y(2*this.width(),this.height());case"br":return y(-this.width(),this.height())}},_foldingPage:function(){var t=this.data().f;if(t){var e=t.opts;return e.turn?"single"==(t=e.turn.data()).display?e.next>1||e.page>1?t.pageObjs[0]:null:t.pageObjs[e.next]:void 0}},_backGradient:function(){var e=this.data().f,i=e.opts.turn.data(),n=i.opts.gradients&&("single"==i.display||2!=e.opts.page&&e.opts.page!=i.totalPages-1);return n&&!e.bshadow&&(e.bshadow=t("<div/>",m(0,0,1)).css({position:"",width:this.width(),height:this.height()}).appendTo(e.parent)),n},type:function(){return this.data().f.effect},resize:function(t){var e=this.data().f,i=e.opts.turn.data(),n=this.width(),r=this.height();switch(e.effect){case"hard":t&&(e.wrapper.css({width:n,height:r}),e.fpage.css({width:n,height:r}),i.opts.gradients&&(e.ashadow.css({width:n,height:r}),e.bshadow.css({width:n,height:r})));break;case"sheet":if(t){var a=Math.round(Math.sqrt(Math.pow(n,2)+Math.pow(r,2)));e.wrapper.css({width:a,height:a}),e.fwrapper.css({width:a,height:a}).children(":first-child").css({width:n,height:r}),e.fpage.css({width:n,height:r}),i.opts.gradients&&e.ashadow.css({width:n,height:r}),g._backGradient.call(this)&&e.bshadow.css({width:n,height:r})}if(e.parent.is(":visible")){var s=T(e.parent[0]);e.fwrapper.css({top:s.top,left:s.left}),s=T(e.opts.turn[0]),e.fparent.css({top:-s.top,left:-s.left})}this.flip("z",e.opts["z-index"])}},_addPageWrapper:function(){var e=this.data().f,i=e.opts.turn.data(),r=this.parent();if(e.parent=r,!e.wrapper)switch(e.effect){case"hard":var a={};a[n+"transform-style"]="preserve-3d",a[n+"backface-visibility"]="hidden",e.wrapper=t("<div/>",m(0,0,2)).css(a).appendTo(r).prepend(this),e.fpage=t("<div/>",m(0,0,1)).css(a).appendTo(r),i.opts.gradients&&(e.ashadow=t("<div/>",m(0,0,0)).hide().appendTo(r),e.bshadow=t("<div/>",m(0,0,0)));break;case"sheet":if(this.width(),this.height(),e.fparent=e.opts.turn.data().fparent,!e.fparent){var s=t("<div/>",{css:{"pointer-events":"none"}}).hide();s.data().flips=0,s.css(m(0,0,"auto","visible").css).appendTo(e.opts.turn),e.opts.turn.data().fparent=s,e.fparent=s}this.css({position:"absolute",top:0,left:0,bottom:"auto",right:"auto"}),e.wrapper=t("<div/>",m(0,0,this.css("z-index"))).appendTo(r).prepend(this),e.fwrapper=t("<div/>",m(r.offset().top,r.offset().left)).hide().appendTo(e.fparent),e.fpage=t("<div/>",m(0,0,0,"visible")).css({cursor:"default"}).appendTo(e.fwrapper),i.opts.gradients&&(e.ashadow=t("<div/>",m(0,0,1)).appendTo(e.fpage)),g.setData.call(this,e)}g.resize.call(this,!0)},_fold:function(t){var e=this.data().f,s=e.opts.turn.data(),o=g._c.call(this,t.corner),l=this.width(),h=this.height();switch(e.effect){case"hard":"l"==t.corner?t.x=Math.min(Math.max(t.x,0),2*l):t.x=Math.max(Math.min(t.x,l),-l);var c,d,p,u,f,m=s.totalPages,v=e.opts["z-index"]||m,b={overflow:"visible"},_=o.x?(o.x-t.x)/l:t.x/l,P=90*_,S=P<90;switch(t.corner){case"l":u="0% 50%",f="100% 50%",S?(c=0,d=e.opts.next-1>0,p=1):(c="100%",d=e.opts.page+1<m,p=0);break;case"r":u="100% 50%",f="0% 50%",P=-P,l=-l,S?(c=0,d=e.opts.next+1<m,p=0):(c="-100%",d=1!=e.opts.page,p=1)}b[n+"perspective-origin"]=f,e.wrapper.transform("rotateY("+P+"deg)translate3d(0px, 0px, "+(this.attr("depth")||0)+"px)",f),e.fpage.transform("translateX("+l+"px) rotateY("+(180+P)+"deg)",u),e.parent.css(b),S?(_=1-_,e.wrapper.css({zIndex:v+1}),e.fpage.css({zIndex:v})):(_-=1,e.wrapper.css({zIndex:v}),e.fpage.css({zIndex:v+1})),s.opts.gradients&&(d?e.ashadow.css({display:"",left:c,backgroundColor:"rgba(0,0,0,"+.5*_+")"}).transform("rotateY(0deg)"):e.ashadow.hide(),e.bshadow.css({opacity:1-_}),S?e.bshadow.parent()[0]!=e.wrapper[0]&&e.bshadow.appendTo(e.wrapper):e.bshadow.parent()[0]!=e.fpage[0]&&e.bshadow.appendTo(e.fpage),A(e.bshadow,y(100*p,0),y(100*(1-p),0),[[0,"rgba(0,0,0,0.3)"],[1,"rgba(0,0,0,0)"]],2));break;case"sheet":var T,k,C,M,D,E,N,I=this,L=0,F=y(0,0),j=y(0,0),O=y(0,0),B=g._foldingPage.call(this),R=s.opts.acceleration,W=e.wrapper.height(),H="t"==t.corner.substr(0,1),z="l"==t.corner.substr(1,1),q=function(){var e=y(0,0),n=y(0,0);e.x=o.x?o.x-t.x:t.x,e.y=i?o.y?o.y-t.y:t.y:0,n.x=z?l-e.x/2:t.x+e.x/2,n.y=e.y/2;var c=a-Math.atan2(e.y,e.x),d=c-Math.atan2(n.y,n.x),p=Math.max(0,Math.sin(d)*Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2)));if(L=c/r*180,O=y(p*Math.sin(c),p*Math.cos(c)),c>a&&(O.x=O.x+Math.abs(O.y*e.y/e.x),O.y=0,Math.round(O.x*Math.tan(r-c))<h))return t.y=Math.sqrt(Math.pow(h,2)+2*n.x*e.x),H&&(t.y=h-t.y),q();if(c>a){var u=r-c,f=W-h/Math.sin(u);F=y(Math.round(f*Math.cos(u)),Math.round(f*Math.sin(u))),z&&(F.x=-F.x),H&&(F.y=-F.y)}T=Math.round(O.y/Math.tan(c)+O.x);var m=l-T,v=m*Math.cos(2*c),x=m*Math.sin(2*c);if(j=y(Math.round(z?m-v:T+v),Math.round(H?x:h-x)),s.opts.gradients){D=m*Math.sin(c);var w=g._c2.call(I,t.corner),b=Math.sqrt(Math.pow(w.x-t.x,2)+Math.pow(w.y-t.y,2))/l;N=Math.sin(a*(b>1?2-b:b)),E=Math.min(b,1),M=D>100?(D-100)/D:0,k=y(D*Math.sin(c)/l*100,D*Math.cos(c)/h*100),g._backGradient.call(I)&&(C=y(1.2*D*Math.sin(c)/l*100,1.2*D*Math.cos(c)/h*100),z||(C.x=100-C.x),H||(C.y=100-C.y))}return O.x=Math.round(O.x),O.y=Math.round(O.y),!0},G=function(t,i,n,r){var a=["0","auto"],o=(l-W)*n[0]/100,c=(h-W)*n[1]/100,d={left:a[i[0]],top:a[i[1]],right:a[i[2]],bottom:a[i[3]]},p={},u=90!=r&&-90!=r?z?-1:1:0,f=n[0]+"% "+n[1]+"%";I.css(d).transform(w(r)+x(t.x+u,t.y,R),f),e.fpage.css(d).transform(w(r)+x(t.x+j.x-F.x-l*n[0]/100,t.y+j.y-F.y-h*n[1]/100,R)+w((180/r-2)*r),f),e.wrapper.transform(x(-t.x+o-u,-t.y+c,R)+w(-r),f),e.fwrapper.transform(x(-t.x+F.x+o,-t.y+F.y+c,R)+w(-r),f),s.opts.gradients&&(n[0]&&(k.x=100-k.x),n[1]&&(k.y=100-k.y),p["box-shadow"]="0 0 20px rgba(0,0,0,"+.5*N+")",B.css(p),A(e.ashadow,y(z?100:0,H?0:100),y(k.x,k.y),[[M,"rgba(0,0,0,0)"],[.8*(1-M)+M,"rgba(0,0,0,"+.2*E+")"],[1,"rgba(255,255,255,"+.2*E+")"]],3),g._backGradient.call(I)&&A(e.bshadow,y(z?0:100,H?0:100),y(C.x,C.y),[[.6,"rgba(0,0,0,0)"],[.8,"rgba(0,0,0,"+.3*E+")"],[1,"rgba(0,0,0,0)"]],3))};switch(t.corner){case"l":case"r":break;case"tl":t.x=Math.max(t.x,1),q(),G(O,[1,0,0,1],[100,0],L);break;case"tr":t.x=Math.min(t.x,l-1),q(),G(y(-O.x,O.y),[0,0,0,1],[0,0],-L);break;case"bl":t.x=Math.max(t.x,1),q(),G(y(O.x,-O.y),[1,1,0,0],[100,100],-L);break;case"br":t.x=Math.min(t.x,l-1),q(),G(y(-O.x,-O.y),[0,1,1,0],[0,100],L)}}e.point=t},_moveFoldingPage:function(t){var e=this.data().f;if(e){var i=e.opts.turn,n=i.data(),r=n.pagePlace;if(t){var a=e.opts.next;if(r[a]!=e.opts.page)e.folding&&g._moveFoldingPage.call(this,!1),g._foldingPage.call(this).appendTo(e.fpage),r[a]=e.opts.page,e.folding=a;i.turn("update")}else if(e.folding){if(n.pages[e.folding]){var s=n.pages[e.folding].data().f;n.pageObjs[e.folding].appendTo(s.wrapper)}else n.pageWrap[e.folding]&&n.pageObjs[e.folding].appendTo(n.pageWrap[e.folding]);e.folding in r&&(r[e.folding]=e.folding),delete e.folding}}},_showFoldedPage:function(t,e){var i=g._foldingPage.call(this),n=this.data(),r=n.f,a=r.visible;if(i){if(!a||!r.point||r.point.corner!=t.corner){var s="hover"==r.status||"peel"==r.status||r.opts.turn.data().mouseAction?t.corner:null;if(a=!1,"prevented"==P("start",this,[r.opts,s]))return!1}if(e){var o=this,l=r.point&&r.point.corner==t.corner?r.point:g._c.call(this,t.corner,1);this.animatef({from:[l.x,l.y],to:[t.x,t.y],duration:500,frame:function(e){t.x=Math.round(e[0]),t.y=Math.round(e[1]),g._fold.call(o,t)}})}else g._fold.call(this,t),n.effect&&!n.effect.turning&&this.animatef(!1);if(!a)switch(r.effect){case"hard":r.visible=!0,g._moveFoldingPage.call(this,!0),r.fpage.show(),r.opts.shadows&&r.bshadow.show();break;case"sheet":r.visible=!0,r.fparent.show().data().flips++,g._moveFoldingPage.call(this,!0),r.fwrapper.show(),r.bshadow&&r.bshadow.show()}return!0}return!1},hide:function(){var t=this.data().f,e=t.opts.turn.data(),i=g._foldingPage.call(this);switch(t.effect){case"hard":e.opts.gradients&&(t.bshadowLoc=0,t.bshadow.remove(),t.ashadow.hide()),t.wrapper.transform(""),t.fpage.hide();break;case"sheet":0==--t.fparent.data().flips&&t.fparent.hide(),this.css({left:0,top:0,right:"auto",bottom:"auto"}).transform(""),t.wrapper.transform(""),t.fwrapper.hide(),t.bshadow&&t.bshadow.hide(),i.transform("")}return t.visible=!1,this},hideFoldedPage:function(t){var e=this.data().f;if(e.point){var i=this,n=e.point,r=function(){e.point=null,e.status="",i.flip("hide"),i.trigger("end",[e.opts,!1])};if(t){var a=g._c.call(this,n.corner),s="t"==n.corner.substr(0,1)?Math.min(0,n.y-a.y)/2:Math.max(0,n.y-a.y)/2,o=y(n.x,n.y+s),l=y(a.x,a.y-s);this.animatef({from:0,to:1,frame:function(t){var e=v(n,o,l,a,t);n.x=e.x,n.y=e.y,g._fold.call(i,n)},complete:r,duration:800,hiding:!0})}else this.animatef(!1),r()}},turnPage:function(t){var e=this,i=this.data().f,n=i.opts.turn.data();t={corner:i.corner?i.corner.corner:t||g._cAllowed.call(this)[0]};var r=i.point||g._c.call(this,t.corner,i.opts.turn?n.opts.elevation:0),a=g._c2.call(this,t.corner);this.trigger("flip").animatef({from:0,to:1,frame:function(i){var n=v(r,r,a,a,i);t.x=n.x,t.y=n.y,g._showFoldedPage.call(e,t)},complete:function(){e.trigger("end",[i.opts,!0])},duration:n.opts.duration,turning:!0}),i.corner=null},moving:function(){return"effect"in this.data()},isTurning:function(){return this.flip("moving")&&this.data().effect.turning},corner:function(){return this.data().f.corner},_eventStart:function(t){var e=this.data().f,i=e.opts.turn;if(!e.corner&&!e.disabled&&!this.flip("isTurning")&&e.opts.page==i.data().pagePlace[e.opts.page]){if(e.corner=g._isIArea.call(this,t),e.corner&&g._foldingPage.call(this))return this.trigger("pressed",[e.point]),g._showFoldedPage.call(this,e.corner),!1;e.corner=null}},_eventMove:function(t){var e=this.data().f;if(!e.disabled)if(t=s?t.originalEvent.touches:[t],e.corner){var i=e.parent.offset();e.corner.x=t[0].pageX-i.left,e.corner.y=t[0].pageY-i.top,g._showFoldedPage.call(this,e.corner)}else if(e.hover&&!this.data().effect&&this.is(":visible")){var n=g._isIArea.call(this,t[0]);if(n){if("sheet"==e.effect&&2==n.corner.length||"hard"==e.effect){e.status="hover";var r=g._c.call(this,n.corner,e.opts.cornerSize/2);n.x=r.x,n.y=r.y,g._showFoldedPage.call(this,n,!0)}}else"hover"==e.status&&(e.status="",g.hideFoldedPage.call(this,!0))}},_eventEnd:function(){var t=this.data().f,e=t.corner;!t.disabled&&e&&"prevented"!=P("released",this,[t.point||e])&&g.hideFoldedPage.call(this,!0),t.corner=null},disable:function(t){return g.setData.call(this,{disabled:t}),this},hover:function(t){return g.setData.call(this,{hover:t}),this},peel:function(e,i){var n=this.data().f;if(e){if(-1==t.inArray(e,l.all))throw S("Corner "+e+" is not permitted");if(-1!=t.inArray(e,g._cAllowed.call(this))){var r=g._c.call(this,e,n.opts.cornerSize/2);n.status="peel",g._showFoldedPage.call(this,{corner:e,x:r.x,y:r.y},i)}}else n.status="",g.hideFoldedPage.call(this,i);return this}};function f(t,e,i){if(i[0]&&"object"!=typeof i[0]){if(e[i[0]])return e[i[0]].apply(t,Array.prototype.slice.call(i,1));throw S(i[0]+" is not a method or property")}return e.init.apply(t,i)}function m(t,e,i,n){return{css:{position:"absolute",top:t,left:e,overflow:n||"hidden",zIndex:i||"auto"}}}function v(t,e,i,n,r){var a=1-r,s=a*a*a,o=r*r*r;return y(Math.round(s*t.x+3*r*a*a*e.x+3*r*r*a*i.x+o*n.x),Math.round(s*t.y+3*r*a*a*e.y+3*r*r*a*i.y+o*n.y))}function y(t,e){return{x:t,y:e}}function x(t,i,n){return e&&n?" translate3d("+t+"px,"+i+"px, 0px) ":" translate("+t+"px, "+i+"px) "}function w(t){return" rotate("+t+"deg) "}function b(t,e){return Object.prototype.hasOwnProperty.call(e,t)}function _(){for(var t=["Moz","Webkit","Khtml","O","ms"],e=t.length,i="";e--;)t[e]+"Transform"in document.body.style&&(i="-"+t[e].toLowerCase()+"-");return i}function A(t,e,i,r,a){var s,o=[];if("-webkit-"==n){for(s=0;s<a;s++)o.push("color-stop("+r[s][0]+", "+r[s][1]+")");t.css({"background-image":"-webkit-gradient(linear, "+e.x+"% "+e.y+"%,"+i.x+"% "+i.y+"%, "+o.join(",")+" )"})}else{e={x:e.x/100*t.width(),y:e.y/100*t.height()};var l=(i={x:i.x/100*t.width(),y:i.y/100*t.height()}).x-e.x,h=i.y-e.y,c=Math.atan2(h,l),d=c-Math.PI/2,p=Math.abs(t.width()*Math.sin(d))+Math.abs(t.height()*Math.cos(d)),u=Math.sqrt(h*h+l*l),g=y(i.x<e.x?t.width():0,i.y<e.y?t.height():0),f=Math.tan(c),m=-1/f,v=(m*g.x-g.y-f*e.x+e.y)/(m-f),x={x:v,y:m*v-m*g.x+g.y},w=Math.sqrt(Math.pow(x.x-e.x,2)+Math.pow(x.y-e.y,2));for(s=0;s<a;s++)o.push(" "+r[s][1]+" "+100*(w+u*r[s][0])/p+"%");t.css({"background-image":n+"linear-gradient("+-c+"rad,"+o.join(",")+")"})}}function P(e,i,n){var r=t.Event(e);return i.trigger(r,n),r.isDefaultPrevented()?"prevented":r.isPropagationStopped()?"stopped":""}function S(t){function e(t){this.name="TurnJsError",this.message=t}return e.prototype=new Error,e.prototype.constructor=e,new e(t)}function T(t){var e={top:0,left:0};do{e.left+=t.offsetLeft,e.top+=t.offsetTop}while(t=t.offsetParent);return e}window.requestAnim=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.extend(t.fn,{flip:function(){return f(t(this[0]),g,arguments)},turn:function(){return f(t(this[0]),u,arguments)},transform:function(t,e){var i={};return e&&(i[n+"transform-origin"]=e),i[n+"transform"]=t,this.css(i)},animatef:function(e){var i=this.data();if(i.effect&&i.effect.stop(),e){e.to.length||(e.to=[e.to]),e.from.length||(e.from=[e.from]);for(var n=[],r=e.to.length,a=!0,s=this,o=(new Date).getTime(),l=function(){if(i.effect&&a){for(var t=[],h=Math.min(e.duration,(new Date).getTime()-o),c=0;c<r;c++)t.push(i.effect.easing(1,h,e.from[c],n[c],e.duration));e.frame(1==r?t[0]:t),h==e.duration?(delete i.effect,s.data(i),e.complete&&e.complete()):window.requestAnim(l)}},h=0;h<r;h++)n.push(e.to[h]-e.from[h]);i.effect=t.extend({stop:function(){a=!1},easing:function(t,e,i,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+i}},e),this.data(i),l()}else delete i.effect}}),t.isTouch=s,t.mouseEvents=o,t.cssPrefix=_,t.cssTransitionEnd=function(){var t,e=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MSTransition:"transitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(void 0!==e.style[t])return i[t]},t.findPos=T}(jQuery);const J=i("BOOK_DATA",{grades:[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5},{text:"六年级",value:6},{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}],bookTypes:{LAST:"上册",NEXT:"下册"}});i("default",a({name:"courseware-list",setup(){m();const i=h(!1),r=h([]),a=h([]),d=()=>{_({api:"goBack"})},g=l({currentGradeNum:null,bookVersionId:null,page:1,rows:999,type:"COURSEWARE"});A((()=>J.grades.map(((t,e)=>n(n({},t),{},{color:g.currentGradeNum===e?"var(--van-primary-color)":"",className:g.currentGradeNum===e?"fontBlod":""})))));const y=h(!1),x=l({list:[],loading:!1,favoriteList:[],tab:"all",details:[],bookData:{},showBook:!1,book:{}}),w=function(){var t=s((function*(){try{const t=v.user.data.schoolInfos,e=t.length>0?t[0].tenantId:null;if(e){const{data:t}=yield k({id:e});r.value=t.bookVersionList||[],a.value=W(r.value)}}catch(t){}}));return function(){return t.apply(this,arguments)}}(),b=function(){var i=s((function*(){var i;x.loading=!0;const{bookVersionId:r,currentGradeNum:a}=g,s=e(g,t),o=yield C(n(n({},s),{},{bookVersionId:-1==r?null:r,currentGradeNum:a||""}));200===(null==o?void 0:o.code)&&Array.isArray(null==o||null===(i=o.data)||void 0===i?void 0:i.rows)&&(x.list=o.data.rows.map((t=>(t.load=!1,t.key=Date.now()+t.id,t)))),x.loading=!1,setTimeout((()=>{y.value=!0}),100)}));return function(){return i.apply(this,arguments)}}(),F=function(){var t=s((function*(){var t,e,i;x.loading=!0;const n=yield M({clientType:"STUDENT",userId:null===(t=v.user)||void 0===t||null===(e=t.data)||void 0===e?void 0:e.id,page:g.page,rows:g.rows,bookVersionId:-1!=g.bookVersionId?g.bookVersionId:"",currentGradeNum:g.currentGradeNum?g.currentGradeNum:""});200===(null==n?void 0:n.code)&&Array.isArray(null==n||null===(i=n.data)||void 0===i?void 0:i.rows)&&(x.list=n.data.rows.map((t=>(t.name=`${t.name}`,t.load=!1,t.favoriteFlag=!0,t.key=Date.now()+t.id,t)))),x.loading=!1}));return function(){return t.apply(this,arguments)}}(),j=function(){var t=s((function*(){var t;x.loading=!0;const e=yield D({bookVersionId:g.bookVersionId?g.bookVersionId:"",page:g.page,rows:g.rows,currentGradeNum:g.currentGradeNum?g.currentGradeNum:""});200===(null==e?void 0:e.code)&&Array.isArray(null==e||null===(t=e.data)||void 0===t?void 0:t.rows)&&(x.list=e.data.rows.map((t=>(t.load=!1,t.key=Date.now()+t.id,t)))),x.loading=!1}));return function(){return t.apply(this,arguments)}}(),O=()=>{"all"===x.tab&&b(),"favorite"===x.tab&&F(),"course"===x.tab&&j()};c((()=>{w(),O()}));const B=function(){var t=s((function*(t){t.favoriteFlag?yield E({lessonCoursewareId:t.id}):(yield N({lessonCoursewareId:t.id}),"favorite"===x.tab&&O())}));return function(e){return t.apply(this,arguments)}}();let R=null;const K=function(){var t=s((function*(t){if("course"===x.tab){var e;const i=yield I(t.id);if(200!=(null==i?void 0:i.code)||!Array.isArray(null==i||null===(e=i.data)||void 0===e?void 0:e.lessonList))return void T({title:"提示",message:"课程教材已更新,是否重新加载?"}).then((()=>{O()})).catch((()=>{}));x.details=i.data.lessonList||[],x.bookData=i.data,console.log("🚀 ~ data.details course:",x.details)}else{var i;const e=yield L(t.id);200==(null==e?void 0:e.code)&&Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.lessonList)&&(x.details=e.data.lessonList||[],x.bookData=e.data,console.log("🚀 ~ data.details:",x.details))}Y(t.id),Q((()=>{x.showBook=!0}))}));return function(e){return t.apply(this,arguments)}}(),Y=t=>{const e=document.querySelector(`[data-id="${t}"]`);if(!e)return;const i=e.getBoundingClientRect();x.book=i},Q=t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t()}))}))},tt=function(){var t=s((function*(t){yield K(t)}));return function(e){return t.apply(this,arguments)}}();return()=>o("div",{class:U.container},[o("div",{class:U.head,style:{opacity:x.showBook?0:""}},[o("div",{class:U.back,onClick:d},[o("img",{src:V},null)]),o(z,{class:U.tabs,active:x.tab,"onUpdate:active":t=>x.tab=t,onChange:()=>("course"===x.tab?a.value=[...W(r.value),{bookVersionId:-1,bookVersionName:"自定义"}]:a.value=W(r.value),void O())},{default:()=>[o(q,{title:"全部教材",name:"all"},null),o(q,{title:"课程教材",name:"course"},null),o(q,{name:"favorite"},{title:()=>o("div",{id:"courseware-2"},[u("我的收藏")])})]}),o(f,P({class:[U.downBtn,"course"!=x.tab&&g.bookVersionId>0||"course"==x.tab&&g.bookVersionId||g.currentGradeNum?U.activeBtn:""],round:!0,size:"small",onClick:()=>i.value=!0},{id:"courseware-3"}),{default:()=>[u("筛选"),o("svg",{class:[U.icon,i.value?U.iconUp:""],width:"9px",height:"5px",viewBox:"0 0 9 5",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[o("title",null,[u("三角形")]),o("g",{id:"演示用",stroke:"none","stroke-width":"1",fill:"currentColor","fill-rule":"evenodd"},[o("g",{id:"全部教材-筛选",transform:"translate(-769.000000, -35.000000)",fill:"currentColor"},[o("g",{id:"编组-3",transform:"translate(696.000000, 20.000000)"},[o("g",{id:"筛选目录备份-2",transform:"translate(13.000000, 7.000000)"},[o("path",{d:"M64.8716471,8.41294119 L68.2489659,12.1655176 C68.4336954,12.3707726 68.4170562,12.6869176 68.2118012,12.8716471 C68.1199888,12.9542782 68.0008397,13 67.8773188,13 L61.1226812,13 C60.8465388,13 60.6226812,12.7761424 60.6226812,12.5 C60.6226812,12.3764791 60.668403,12.25733 60.7510341,12.1655176 L64.1283529,8.41294119 C64.3130824,8.20768618 64.6292274,8.19104698 64.8344824,8.37577649 C64.8475136,8.38750459 64.859919,8.39990996 64.8716471,8.41294119 Z",id:"三角形",transform:"translate(64.500000, 10.500000) rotate(-180.000000) translate(-64.500000, -10.500000) "},null)])])])])])]})]),o("div",{class:U.content},[o("div",{class:[U.wrap,x.list.length<=0&&!x.loading?U.emtpyWrap:""]},[x.list.map(((t,e)=>o("div",{class:[U.wrapItem,x.bookData.id===t.id&&x.showBook?U.wrapItemHide:""],key:t.key,onClick:()=>tt(t)},[o("div",{class:U.item},[o(H,P({"data-id":t.id},{id:0==e?"courseware-0":""},{class:[U.cover,t.load?U.loaded:""],objectFit:"cover",src:t.coverImg,onLoad:()=>{t.load=!0},onError:()=>{t.load=!0}}),null)]),o("div",{class:U.name},[t.name]),!x.loading&&"course"!==x.tab&&o("div",{id:0===e?"courseware-1":"",class:U.favoriteBtn,onClick:e=>{e.stopPropagation(),t.favoriteFlag=!t.favoriteFlag,((t,e=300)=>{R&&clearTimeout(R),R=setTimeout(t,e)})((()=>B(t)))}},[o(X,{isFavorite:t.favoriteFlag},null)])]))),x.list.length<=0&&!x.loading&&o(S,{image:"list",description:"暂无数据"},null)])]),o(Z,{show:x.showBook,bookData:x.bookData,tab:x.tab,rect:x.book,onClose:()=>{x.showBook=!1}},null),y.value?o($,null,null):null,o(p,{show:i.value,"onUpdate:show":t=>i.value=t,class:U.popupContainer},{default:()=>[o("div",{class:U.popoverContainer},[o("div",{class:U.searchList},[o("div",{class:U.popoverTitle},[u("教材版本")]),o("div",{class:[U.popupList,U.versionList]},[a.value.map((t=>o(G,{plain:g.bookVersionId==t.bookVersionId,round:!0,onClick:()=>g.bookVersionId=t.bookVersionId},{default:()=>[t.bookVersionName]})))]),o("div",{class:U.popoverTitle},[u("选择年级")]),o("div",{class:[U.popupList,U.versionList]},[J.grades.map((t=>o(G,{plain:g.currentGradeNum===t.value,round:!0,onClick:()=>g.currentGradeNum=t.value},{default:()=>[t.text]})))])]),o("div",{class:U.btnGroup},[o(f,{round:!0,onClick:()=>{g.bookVersionId=null,g.currentGradeNum=null}},{default:()=>[u("重置")]}),o(f,{round:!0,class:U.btnSure,onClick:()=>{O(),i.value=!1}},{default:()=>[u("确认")]})])])]})])}}))}}}))}();
|