/*! Copyright (c) 2019 Infopark AG (https://scrivito.com) */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=487)}([function(t,e,n){"use strict";var r=n(2);function i(t){try{return Object(r.isFunction)(t)?function(t){if(function(t){return!!t._scrivitoPrivateSchema}(t)){var e=t._scrivitoPrivateSchema;return"[class "+e.name+"]"}if(function(t){var e=t.prototype;return e&&e.isReactComponent}(t)){var n=t.displayName||t.name;return'[class React.Component "'+n+'"]'}return a(t.toString())}(t):Object(r.isObject)(t)?function(t){var e=t._scrivitoPrivateContent;if(e&&Object(r.isFunction)(e.toPrettyPrint))return e.toPrettyPrint();if(Object(r.isElement)(t))return"[object HTMLElement "+o(t.outerHTML)+"]";return o(t)}(t):o(t)}catch(t){return""}}function o(t){var e=JSON.stringify(t);return e?a(e):e}function a(t){return t.length>100?t.slice(0,100)+"...":t}var s=n(52),u=n(57);u.struct.strict=!0,u.interface.strict=!0,u.fail=function(t){throw new TypeError(t)};var l,c=[];function f(t){l?c.push(t):setTimeout(t,0)}function d(t){f(function(){throw t})}function p(t,e,n){var o=n.docPermalink;return function(){for(var n,a=[],l=0;ln)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(e.map(function(e,n){var r=e[0],o=e[1],a=t[n],s=u.validate(a,o);return s.errors.map(function(t){return function(t,e){var n=function(t,e){var n="argument '"+t+"'";if(0===e.path.length)return n;return"key '"+e.path.join("/")+"' in "+n}(t,e);if(void 0===e.actual)return"Missing required "+n+".";if(e.expected===u.Nil)return"Unexpected "+n+".";var r=u.getTypeName(e.expected),o="got "+i(e.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,t)})}));if(a.length>0)return a.join(" ")}(a,e)}catch(t){d(t)}if(n){var c="Visit https://scrivito.com/"+o+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+t+"': "+n+" "+c)}}}var h=function(){function t(){}return t.prototype.current=function(){return this.currentContext},t.prototype.runWith=function(t,e){var n=this.currentContext;try{return this.currentContext=t,e()}finally{this.currentContext=n}},t}(),v=function(){function t(){var t=this;this.promise=new ot(function(e,n){t.resolve=function(n){t.settled=!0,e(n)},t.reject=function(e){t.settled=!0,n(e)}})}return t.prototype.isPending=function(){return!this.settled},t}();function m(t){try{return{errorThrown:!1,result:t()}}catch(t){return{errorThrown:!0,error:t}}}var y=!1;function g(){for(var t,e=[],n=0;n=0&&e<=E};y.each=y.forEach=function(t,e,n){var r,i;if(e=b(e,n),j(t))for(r=0,i=t.length;r=3;return function(e,n,r,i){var o=!j(e)&&y.keys(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=0},y.invoke=_(function(t,e,n){var r,i;return y.isFunction(e)?i=e:y.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),y.map(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=C(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=j(t)?t:y.values(t)).length;so&&(o=r);else e=w(e,n),y.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},y.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=j(t)?t:y.values(t)).length;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),y.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&oe?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},y.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},a=_(function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,e),s&&(i=t.apply(this,a))}else r=y.delay(o,e,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},y.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},y.once=y.partial(y.before,2),y.restArguments=_;var R=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(t,e){var n=M.length,r=t.constructor,i=y.isFunction(r)&&r.prototype||s,o="constructor";for(x(t,o)&&!y.contains(e,o)&&e.push(o);n--;)(o=M[n])in t&&t[o]!==i[o]&&!y.contains(e,o)&&e.push(o)};y.keys=function(t){if(!y.isObject(t))return[];if(h)return h(t);var e=[];for(var n in t)x(t,n)&&e.push(n);return R&&B(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return R&&B(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,r=Array(n),i=0;i1&&(r=b(r,e[1])),e=y.allKeys(t)):(r=U,e=N(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=y.map(N(e,!1,!1),String),r=function(t,n){return!y.contains(e,n)}),y.pick(t,r,n)}),y.defaults=q(y.allKeys,!0),y.create=function(t,e){var n=O(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},V=y.invert(W),K=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};y.escape=K(W),y.unescape=K(V),y.result=function(t,e,n){y.isArray(e)||(e=[e]);var r=e.length;if(!r)return y.isFunction(n)?n.call(t):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,Z=function(t){return"\\"+G[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var r,i=RegExp([(e.escape||$).source,(e.interpolate||$).source,(e.evaluate||$).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,function(e,n,r,i,s){return a+=t.slice(o,s).replace(Y,Z),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e}),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,y)},u=e.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},y.chain=function(t){var e=y(t);return e._chain=!0,e};var X=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){return y.each(y.functions(t),function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),X(this,n.apply(y,t))}}),y},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=a[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],X(this,n)}}),y.each(["concat","join","slice"],function(t){var e=a[t];y.prototype[t]=function(){return X(this,e.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return y}.apply(e,[]))||(n.exports=r)}()}).call(this,n(48),n(85)(t))},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"deserialize",function(){return J});var i=n(53),o=n(56),a=n(11);var s=function(){function t(t,e,n){this.container=t,this.attributeName=e,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return t.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},t.prototype.update=function(t){var e;this.container.update(((e={})[this.attributeName]=[t,this.typeInfo],e))},t.prototype.getContainer=function(){return this.container},t.prototype.obj=function(){return this.container.obj()},t.prototype.name=function(){return this.attributeName},t.prototype.type=function(){return this.typeInfo[0]},t.prototype.workspaceId=function(){return this.obj().workspaceId()},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.container.equals(e.getContainer())&&this.attributeName===e.name());var n,r},t.prototype.validClasses=function(){return this.typeOptions.validClasses},t.prototype.getDiff=function(){var t=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,t.id(),this.container===t?void 0:this.container.id())},t.prototype.toString=function(){var t=this.obj(),e=this.attributeName;return this.container===t?"":""},t.prototype.id=function(){var t=this.obj();return this.container===t?this.attributeName+"|"+t.id():this.attributeName+"|"+t.id()+"|"+this.container.id()},t}(),u=n(0),l=n(13);function c(t){return l.parseQuery(t)}function f(t){return new l(t).query(!0)}var d=n(2),p=n.n(d),h=n(95);var v=function(){function t(t){var e=t.name,n=t.count,r=t.includedObjIds;this._name=e,this._count=n,this._includedObjIds=r}return t.prototype.name=function(){return this._name},t.prototype.count=function(){return this._count},t.prototype.includedObjs=function(){return Object(d.compact)(this._includedObjIds.map(function(t){return Bt.get(t)}))},t}();function m(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var y=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],g=["equals","startsWith","isGreaterThan","isLessThan"],b=["contains","containsPrefix"],w={query:[]},_=function(){function t(t){void 0===t&&(t=w);this._query=[].concat(t.query),this._batchSize=t.batchSize,this._offset=t.offset,this._sortBy=t.sortBy,this._sortDirection=t.sortDirection,this._includeDeleted=t.includeDeleted}return t.prototype.and=function(e,n,r,i){if(m(e,t))this._query=this._query.concat(e._query);else{if(void 0===n)throw new u.a("Missing operator to search with");if(void 0===r)throw new u.a('Missing value to search (specify "null" for missing)');var o=O(e,n,r);i&&(!function(t){if(!Object(d.contains)(b,t))throw new u.a('Boosting operator "'+t+'" is invalid.')}(n),o.boost=function(t){var e={};return Object(d.each)(t,function(t,n){var r=x(n);e[r]=t}),e}(i)),this._query.push(o)}return this},t.prototype.andNot=function(t,e,n){var r=O(t,e,n);return function(t){if(!Object(d.contains)(g,t))throw new u.a('Negating operator "'+t+'" is invalid.')}(e),r.negate=!0,this._query.push(r),this},t.prototype.offset=function(t){return this._offset=t,this},t.prototype.order=function(t,e){return void 0===e&&(e="asc"),this._sortBy=x(t),this._sortDirection=e,this},t.prototype.batchSize=function(t){return this._batchSize=t,this},t.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},t.prototype.count=function(){return this.getObjDataQuery().count()},t.prototype.first=function(){return this.take(1)[0]||null},t.prototype.take=function(t){for(var e=[],n=1;n=0},"Number (positive)"),S=Object(u.p)("objSearch.take",[["count",u.O.maybe(E)]],{docPermalink:"js-sdk/ObjSearch-take"});function j(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var T=u.O.irreducible("Obj",function(t){return L(t,Bt)}),A=u.O.irreducible("Widget",function(t){return L(t,bt)}),P=u.O.irreducible("Link",function(t){return L(t,Vt)}),N=u.O.irreducible("ObjSearch",function(t){return L(t,_)}),I=u.O.irreducible("Binary",function(t){return j(t,$)});function L(t,e){return!!t&&j(t._scrivitoPrivateContent,e)}var D,R=n(6);function M(t){D=t}var B=function(){function t(t,e){void 0===e&&(e={});var n=e.filename;if(this.contentType=e.contentType,t.idToCopy)this.idToCopy=t.idToCopy;else{var r=t.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return t.prototype.into=function(t){for(var e=[],n=1;n-1){var t=/[^.\\]*$/.exec(this.raw().filename());if(t)return t[0].toLowerCase()}return""},t.prototype.equals=function(e){return n=e,(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&e.id()===this.id()&&e.isPrivate()===this.isPrivate()&&Object(d.isEqual)(e.definition(),this.definition());var n,r},t.prototype.isImage=function(){var t=this.raw().contentType();return!!t&&"image"===t.split("/")[0]},t.prototype.definition=function(){return this._transformation||null},t.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},t.prototype.assertNotTransformed=function(t){if(this.isTransformed())throw new u.i('"'+t+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},t.prototype.isTransformed=function(){return!!this._transformation},t}(),G=u.O.struct({contentType:u.O.maybe(u.O.String),filename:u.O.maybe(u.O.String)}),Y=u.O.refinement(u.O.Object,function(t){return u.c.is(t)||u.f.is(t)},"Blob or File"),Z=Object(u.p)("Binary.upload",[["source",Y],["options",u.O.maybe(G)]],{docPermalink:"js-sdk/Binary-static-upload"});function X(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function J(t,e,n,r){var i=X(e,2),o=i[0],a=i[1];switch(n){case"binary":return function(t,e){if("binary"===t&&e){var n=e.id,r="published"===st();return new $(n,r)}return null}(o,a);case"date":return function(t,e){if("date"!==t)return null;return Object(u.t)(e)}(o,a);case"float":return function(t,e){switch(t){case"string":return e.match(/^-?\d+(\.\d+)?$/)?tt(e):null;case"number":return tt(e);default:return null}}(o,a);case"enum":return function(t,e,n){var r=n.values;if("string"===t&&p.a.contains(r,e))return e;return null}(o,a,r);case"html":return function(t,e){if(p.a.contains(["html","string"],t)&&p.a.isString(e))return e;return""}(o,a);case"integer":return function(t,e){switch(t){case"string":case"number":return Object(u.u)(e);default:return null}}(o,a);case"link":return function(t,e){if("link"!==t||!p.a.isObject(e))return null;return et(e)}(o,a);case"linklist":return function(t,e){if(!p.a.isArray(e))return[];return p.a.compact(e.map(et))}(0,a);case"multienum":return function(t,e,n){var r=n.values;if("stringlist"!==t||!Array.isArray(e))return[];return p.a.intersection(e,r)}(o,a,r);case"reference":return function(t,e,n){if("reference"===t&&e)return nt(e,n);return null}(o,a,t);case"referencelist":return function(t,e,n){if("referencelist"!==t)return[];if(!e)return[];var r=e.map(function(t){return nt(t,n)});return p.a.compact(r)}(o,a,t);case"string":return function(t,e){if(p.a.contains(["html","string"],t)&&p.a.isString(e))return e;return""}(o,a);case"stringlist":return function(t,e){if("stringlist"!==t||!Array.isArray(e))return[];return e}(o,a);case"widgetlist":return function(t,e,n){if("widgetlist"!==t)return[];return p.a.map(e,function(t){return n.widget(t)})}(o,a,t);default:return null}}function tt(t){var e=parseFloat(t);return Object(u.B)(e)?e:null}function et(t){var e=p.a.pick(t,"query","rel","target","title","url");"fragment"in t&&(e.hash=t.fragment),"obj_id"in t&&(e.objId=t.obj_id);var n=new Vt(e);return n.isBroken()?null:n}function nt(t,e){var n=Bt.getInWorkspace(e.workspaceId(),t);return n||null}var rt=function(){function t(){}return t.prototype.get=function(t,e){var n=Object(u.R)(t),i=this.getAttributeData(n);return i&&d.isArray(i)||(i=[]),"string"==typeof e?J(this,i,e):J.apply(r,[this,i].concat(e))},t.prototype.serializeAttributes=function(t){var e=this;return d.mapObject(t,function(t,n){if(function(t){return d.isArray(t)&&"widgetlist"===t[0]}(t)){var r=Object(u.o)(n);return["widgetlist",d.invoke(e.get(r,["widgetlist"]),"serializeAttributes")]}return t})},t.prototype.persistWidgets=function(t,e){d.each(e,function(e){if(function(t){if(!t)return!1;if(!d.isArray(t))return!1;if(t.length<2)return!1;var e=t[1];return d.isArray(e)&&e.length>0&&"widgetlist"===e[0]}(e)){var n=e[0];if(n){var r=d.isArray(n)?n:[n];d.each(r,function(e){e.isPersisted()||e.persistInObj(t)})}}})},t}();function it(t){return d.mapObject(t,function(t,e){if(Object(u.z)(e))return d.isArray(t)?t:[t];if(!d.isArray(t))throw new u.g("Value for "+e+" should be a tuple: [value, typeInfo]");var n=t[0],r=t[1];return"string"==typeof r?[n,[r]]:[n,r]})}var ot,at="published";function st(){return ot||at}function ut(t){ot=t}function lt(){ot=void 0}function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function dt(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}function pt(t,e){return!e||"object"!==ct(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ht(t,e,n){return(ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vt(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function vt(t){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mt(t,e){for(var n=0;n0},e.prototype.orderedChildren=function(){var t=this.children(),e=this.get("childOrder","referencelist");return d.isArray(e)?d.sortBy(t,function(t){var n=d.invoke(e,"id").indexOf(t.id());return-1===n?e.length:n}):t},e.prototype.backlinks=function(){return e.where("*","linksTo",this).take()},e.prototype.ancestors=function(){var t=this.parentPath();return t?function(t){var e=["/"];if("/"===t)return e;var n=t.split("/").slice(1),r="";return n.forEach(function(t){r=r+"/"+t,e.push(r)}),e}(t).map(function(t){return e.getByPath(t)}):[]},e.prototype.isRestricted=function(){var t=this.restriction();return!!t&&t.length>0},e.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},e.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},e.prototype.unrestrict=function(){this.update({_restriction:null})},e.prototype.update=function(t){var e=this,n=it(t);Object(R.r)(function(){e.persistWidgets(e,n);var t=Ct(n);e.objData.update(t)}),this.startLinkResolution()},e.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},e.prototype.insertWidget=function(t,e){var n,r=function(t){if(function(t){return!!t.before}(t))return t.before.id();return t.after.id()}(e),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,u=i.index,l=e.before?u:u+1,c=o.slice(0,l).concat([t],o.slice(l));s.update(((n={})[a]=[c,["widgetlist"]],n))}},e.prototype.removeWidget=function(t){var e=this.fieldContainingWidget(t);if(e){var n=e.get(),r=d.reject(n,function(e){return e.equals(t)});e.update(r)}},e.prototype.siblingWidget=function(t,e){var n=this._widgetPlacementFor(t.id());if(n)return n.attributeValue[n.index+e]},e.prototype.copyAsync=function(t){return void 0===t&&(t={}),function(t){if(d.difference(d.keys(t),["_path"]).length)throw new u.a('Currently only "_path" copy option is supported.')}(t),this._copyAttributes().then(function(n){var r=d.extend(n,t),i=e.createWithSerializedAttributes(st(),r);return i.objData.finishSaving().then(function(){return i})})},e.prototype.moveToAsync=function(t){return this.moveTo(t),this.finishSaving()},e.prototype.moveTo=function(t){this.update({_path:[t+"/"+this.id()]})},e.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},e.prototype.finishSaving=function(){var t=this;return this.finishLinkResolution().then(function(){return t.objData.finishSaving()})},e.prototype.equals=function(t){return!!It(t,e)&&this.id()===t.id()},e.prototype.widget=function(t){return this.getWidgetAttribute(t,"_obj_class")?bt.build(t,this):null},e.prototype.getWidgetAttribute=function(t,e){return this.objData.getWidgetAttribute(t,e)},e.prototype.widgets=function(){var t=this.getData();if(!Ht(t))return[];var e=t._widget_pool;if(!e)return[];var n=[];return this.collectWidgets(n,t,e,{}),n},e.prototype.fieldContainingWidget=function(t){var e=t.id(),n=this._widgetPlacementFor(e);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},e.prototype.generateWidgetId=function(){for(var t=0;t<10;t++){var n=e.generateWidgetId();if(!this.widget(n))return n}throw new u.g("Could not generate a new unused widget id.")},e.prototype.serializeAttributes=function(){var e=t.prototype.serializeAttributes.call(this,this.getData());return delete e._conflicts,delete e._modification,delete e._created_at,delete e._created_by,delete e._last_changed,delete e._last_changed_by,e},e.prototype.slug=function(){var t,e=this.get("title","string");return"string"!=typeof(t=e)?"":h(t)},e.prototype.getWidgetData=function(t){return this.objData.getWidget(t)},e.prototype.startLinkResolution=function(){Object(a.l)()||zt().startLinkResolutionFor(st(),this.id())},e.prototype.finishLinkResolution=function(){return zt().finishLinkResolutionFor(st(),this.id())},e.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},e.prototype.getAttributeData=function(t){return this.objData.getAttribute(t)},e.prototype.getData=function(){return this.objData.get()},e.prototype.blob=function(){return this.get("blob",["binary"])},e.prototype._copyAttributes=function(){var t=e.generateId(),n=this.serializeAttributes(),r=[];return d.each(n,function(e,i){if("_"!==i[0]){if(function(t){return"binary"===t[0]&&!!t[1]}(e)){var o=e[1],a=new z({idToCopy:o.id}).intoId(t).then(function(t){return{name:i,binary:t}});r.push(a)}}else delete n[i]}),n._id=t,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+t),u.j.all(r).then(function(t){return d.each(t,function(t){var e=t.name,r={id:t.binary.id()};n[e]=["binary",r]}),n})},e.prototype.collectWidgets=function(t,e,n,r){var i=this;d.map(e,function(t,e){if(t&&!Object(u.z)(e)){var n=t;return Object(H.h)(n)?n[1]:void 0}}).forEach(function(e){e&&e.forEach(function(e){if(!r[e]){r[e]=!0;var o=i.widget(e);if(o){t.push(o);var a=n[e];i.collectWidgets(t,a,n,r)}}})})},e.prototype._widgetPlacementFor=function(t){var e=this.getData();if(Ht(e)){var n=Object(a.f)(e,t);if(n){var r,i=Object(u.o)(n.attributeName),o=n.parentWidgetId;if(o){if(!(r=this.widget(o)))return}else r=this;return{container:r,attributeName:i,attributeValue:r.get(i,["widgetlist"]),index:n.index,parentWidgetId:o}}}},e}(rt),Bt=Mt;function qt(t){return bt.newWithSerializedAttributes(t)}function Ft(t){return Mt.all().and("_parentPath","equals",t)}function zt(){if(!Dt)throw new Error("No Link Handler");return Dt}function Ut(t){Dt=t}function Ht(t){return!!t&&Object(H.f)(t)}var Wt=function(){return(Wt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0&&e.splice(n,1)}),this.active=!1)},t.prototype.notify=function(){this.active&&this.listener()},t.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},t}(),u=new a(function(t){t.forEach(function(t){t.hasChanges()&&t.notify()})}),l=new a(function(t){t.forEach(function(t){Object(r.G)(function(){t.hasChanges()&&t.notify()})})}),c=function(){function t(){this.listenersStore=new o([],function(t){return t.slice()})}return t.prototype.subscribe=function(t){var e=this,n=!0,r=function(){n&&t()};return this.listenersStore.write(function(t){return t.push(r)}),function(){n=!1,e.listenersStore.write(function(t){var e=t.indexOf(r);t.splice(e,1)})}},t.prototype.count=function(){return this.listenersStore.read(function(t){return t.length})},t.prototype.clear=function(){this.listenersStore.write(function(t){t.length=0})},t.prototype.notify=function(){this.listenersStore.read(function(t){return t.forEach(function(t){return t()})})},t}();function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return null!==t&&"object"===f(t)&&!Array.isArray(t)&&!function(t){var e=Object.getPrototypeOf(t);if(null===e)return!1;return null!==Object.getPrototypeOf(e)}(t)}function p(t,e){return t===e?e:d(e)?function(t,e){var n={},r=!1;void 0===t&&(r=!0);var i=Object.keys(e),o=new Set;t&&Object.keys(t).forEach(function(t){return o.add(t)});o.size!==i.length&&(r=!0);return i.forEach(function(i){o.has(i)||(r=!0);var a=t?t[i]:void 0,s=p(a,e[i]);s!==a&&(r=!0),n[i]=s}),r?Object.freeze(n):t}(d(t)?t:void 0,e):Array.isArray(e)?function(t,e){var n=!1;void 0!==t&&t.length===e.length||(n=!0);var r=e.map(function(e,r){var i=t?t[r]:void 0,o=p(i,e);return o!==i&&(n=!0),o});return n?Object.freeze(r):t}(Array.isArray(t)?t:void 0,e):e}var h,v,m,y,g,b,w,_=(h=function(t,e){var n,r;return(h=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),O=function(){function t(){}return t.prototype.get=function(){var t=this,e=this.untrackedGet();return this.recordDetector(function(){return e!==t.untrackedGet()}),e},t.prototype.recordDetector=function(t){this.getTree().recordDetector(t)},t.prototype.set=function(t){var e=this.untrackedGet(),n=p(e,t);n!==e&&this.uncheckedSet(n)},t.prototype.clear=function(){this.set(void 0)},t.prototype.subState=function(t){return new E(this,t)},t.prototype.reader=function(){return this},t.prototype.setSubState=function(t,e){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===e){var o=Object.keys(i);if(1===o.length&&o[0]===t)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===e?delete s[t]:s[t]=e,this.uncheckedSet(Object.freeze(a))}else{var u=Object.freeze(((n={})[t]=e,n));this.uncheckedSet(u)}},t.prototype.getSubState=function(t){var e=this.untrackedGet();if(null!=e)return e[t]},t}(),k=function(){function t(t){this.detector=t}return t.prototype.hasChanges=function(){return this.detector()},t}(),x=function(t){function e(){var e=t.call(this)||this;return e.listeners=new c,e.detectorRecording=new r.d,e.batchUpdates=new r.d,e.version=0,e.frozenContextContainer=new r.d,e}return _(e,t),e.prototype.untrackedGet=function(){return this.state},e.prototype.withFrozenState=function(t,e){return this.frozenContextContainer.runWith(t,e)},e.prototype.failIfTracking=function(t){if(this.detectorRecording.current())throw new r.g(t)},e.prototype.failIfFrozen=function(t){var e=this.frozenContextContainer.current();if(e){var n=t+" is not permitted inside '"+e.contextName+"'. "+(e.message||"");throw new C(n)}},e.prototype.uncheckedSet=function(t){this.failIfFrozen("Changing state"),this.state=t,this.version++,this.insideBatchUpdate()||this.notifyListeners()},e.prototype.trackStateAccess=function(t){var e=this.trackChanges(t),n=e.detector;return{result:e.result,accessedState:new k(n)}},e.prototype.recordDetector=function(t){var e=this.detectorRecording.current();void 0!==e&&e.push(t)},e.prototype.getTree=function(){return this},e.prototype.id=function(){return""},e.prototype.subscribe=function(t){return this.listeners.subscribe(t)},e.prototype.withBatchedUpdates=function(t){var e=this.state;try{this.batchUpdates.runWith(!0,t)}finally{this.insideBatchUpdate()||e===this.state||this.notifyListeners()}},e.prototype.listenerCount=function(){return this.listeners.count()},e.prototype.clearListeners=function(){this.listeners.clear()},e.prototype.trackChanges=function(t){var e=this,n=this.version,r=this.recordDetectors(t),o=r.result,a=r.detectors;return{result:o,detector:function(){return e.version!==n&&!!Object(i.find)(a,function(t){return t()})}}},e.prototype.recordDetectors=function(t){var e=[],n=this.detectorRecording.runWith(e,t),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,e),{result:n,detectors:e}},e.prototype.notifyListeners=function(){var t=this;this.withFrozenState({contextName:"state listeners"},function(){t.listeners.notify()})},e.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},e}(O),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),e}(r.i),E=function(t){function e(e,n){var r=t.call(this)||this;return r.parentState=e,r.key=n,r.tree=e.getTree(),r}return _(e,t),e.prototype.getTree=function(){return this.tree},e.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},e.prototype.uncheckedSet=function(t){this.parentState.setSubState(this.key,t)},e.prototype.id=function(){if(void 0===this.cachedId){var t=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+t}return this.cachedId},e}(O);function S(t){t?(v=void 0,m=t.stateController(),y=t.createAppState(),w=t.sharedCmsState(),g=y.subState("localCms")):(v=new x,m=v,y=A(),w=v.subState("sharedCms"),g=v.subState("localCms"),b=v.subState("ui")),q()}var j,T=0;function A(){if(!v)throw new r.g;var t=(T++).toString();return v.subState("apps").subState(t)}function P(t){return m.withBatchedUpdates(t)}function N(){return m}function I(t){return m.trackStateAccess(t)}function L(t,e){return m.withFrozenState(t,e)}function D(t){return m.failIfFrozen(t)}function R(t){return m.failIfTracking(t)}function M(t){return l.create(t)}function B(t,e){return void 0===e&&(e=0),u.create(t,e)}function q(){j=m.subscribe(function(){u.notify(),l.notify()})}function F(){j&&j(),y.clear()}var z=[],U=function(){return 0!==z.length};function H(t){U()||Object(r.G)(function(){return P(function(){return function t(e){z=[];try{e.forEach(function(t){return t()})}finally{U()&&t(z)}}(z)})}),z.push(t)}function W(t,e){var n,i=!0,o=!1,a=M(s);function s(){if(i){var s=I(function(){return L({contextName:"observe",message:"Extract all side-effects into the listener function"},t)});a.subscribeChanges(s.accessedState);var u=s.result;o&&Object(r.v)(u,n)||(e(u),n=u,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function V(t,e){var n=I(function(){return L({contextName:"observeSync",message:"Use non-sync observe or nextTick"},t)}),i=n.result,o=B(function(){var n=I(t);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(e(a),i=a)});return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function K(t){return new r.j(function(e){var n=W(t,function(t){null!=t&&(n.unsubscribe(),e(t))})})}n.d(e,"d",function(){return A}),n.d(e,"c",function(){return g}),n.d(e,"m",function(){return w}),n.d(e,"o",function(){return I}),n.d(e,"r",function(){return P}),n.d(e,"s",function(){return L}),n.d(e,"g",function(){return D}),n.d(e,"h",function(){return R}),n.d(e,"i",function(){return N}),n.d(e,"p",function(){return b}),n.d(e,"b",function(){return y}),n.d(e,"j",function(){return S}),n.d(e,"n",function(){return F}),n.d(e,"e",function(){return M}),n.d(e,"f",function(){return B}),n.d(e,"a",function(){return H}),n.d(e,"k",function(){return W}),n.d(e,"l",function(){return V}),n.d(e,"q",function(){return K})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(6),a="GET",s="SEND",u=1;function l(t,e){var n=u++,l={};return Object.keys(t).forEach(function(u){var c=t[u];c===a&&(l[u]=function(){for(var t=[],a=0;a0}function x(t,e,n){var r=n.params,i=n.authorization,o=n.forceVerification;return _?u.j.resolve(new XMLHttpRequest):(O+=1,new u.j(function(n,a){var s=function(t,e,n,r){var i=new XMLHttpRequest;function o(t){!function(t,e){O-=1,e(t)}(new y(t),r)}return i.open("POST"===t?"POST":"PUT",e),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(t,e,n){O-=1;var r=t.status;if(!r||!Object(l.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?t.statusText:t.responseText);n(new y(i))}e(t)}(i,n,r)},i.onerror=function(){return o("XMLHttpRequest Error")},i.ontimeout=function(){return o("XMLHttpRequest Timeout")},i.onabort=function(){return o("XMLHttpRequest Aborted")},i}(t,e,n,a);i&&s.setRequestHeader("Authorization",i),s.setRequestHeader("Scrivito-Client","jssdk/"+Object(u.x)()),o&&s.setRequestHeader("Scrivito-Force-Verification","true"),s.setRequestHeader("Content-type","application/json; charset=utf-8"),s.send(JSON.stringify(r))}))}function C(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}d={},window._scrivitoRegisterVerificator=function(t,e){d[t].resolve(e)};var E,S,j=function(){var t=function(e,n){return(t=Object.setPrototypeOf||C({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T="client_verification_required";!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}j(e,t)}(g);function A(t){return t(N()).catch(function e(n){if(!function(t){return C(t,g)&&t.backendCode===T}(n))throw n;return function(t){if(!E){var e=t.verificator,n=t.data,r=(i=e.id,o=e.url,a=d[i],a||(a=new u.e,d[i]=a,Object(u.E)(o)),a.promise).then(function(t){return new u.j(function(e){t(n,function(t){e((S=t).authorization)})})});E={challenge:{verificator:e,data:n},promise:Object(u.J)(r,function(){E=void 0})}}var i,o,a;return E.promise}(n.details).then(t).catch(e)})}function P(){E=void 0,S=void 0}function N(){if(S){if(!(S.expiresAfter19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,q(n));return Object(u.T)(o).then(function(){return t(e,n+1)})})}(function(){return x(t,i,a)}).then(F)}return"POST"===t?s():function t(e,n){void 0===n&&(n=0);if(D)return new u.j(function(t){return t(e())});return e().catch(function(r){if(o=r,null!=(a=y)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](o):o instanceof a){if(L&&n>5)throw r;var i=q(n);return Object(u.T)(i).then(function(){return t(e,n+1)})}var o,a;throw r})}(s)},t.prototype.handleTask=function(t){var e=this;switch(t.status){case"success":return t.result;case"error":throw h.for(t.message,412,t.code);case"open":return Object(u.S)(2).then(function(){return e.get("tasks/"+t.id).then(function(t){return e.handleTask(t)})});default:throw new y("Invalid task response (unknown status)")}},t}();function q(t){return 500*Math.pow(2,Math.min(t,16))}function F(t){var e,n=t.status;try{e=JSON.parse(t.responseText)}catch(e){throw new y(t.responseText)}if(n>=200&&n<300)return e;if("auth_missing"===e.code){var r=e.details;if(r&&z(r)){var i=r.visit;if("string"==typeof i){var o=function(t){var e=s.augmentedRedirectUrl(Object(R.f)());return t.replace("retry=RETRY","retry="+s.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(e))}(i);throw Object(R.i)(o),new m("Insufficient authorization - please visit "+o)}}}throw function(t,e,n){if(401===t){var r=H(e);return new g(r.error,t,r.code,r.details)}if(403===t){var r=H(e),i=r.code;if(!i||!U(i))throw new y("Authentication failure response no string value for code");return new v(r.error,t,i)}if(e.error&&"4"===t.toString()[0]){var r=H(e);return h.for(r.error,t,r.code)}if(500===t)return U(e.error)?new y(e.error):new y(n);return new y(n)}(n,e,t.responseText)}function z(t){return"object"===M(t)&&!Array.isArray(t)}function U(t){return"string"==typeof t}function H(t){var e=t.error;if("string"!=typeof e)throw new y("Malformed error response (key error is not a string)");var n=t.code;if(void 0!==n&&!U(n))throw new y("Malformed error response (optional key code is not a string)");var r=t.details;if(void 0!==r&&!z(r))throw new y("Malformed error response (optional key details is not an object");return{code:n,error:e,details:r}}var W=new B;var V=new u.b(function(t){return W.get("blobs/mget",{blobs:t}).then(function(e){return e.results.map(function(e,n){return function(t,e){var n=e.public_access.get;if(!n.url)throw new u.g('Missing public access URL for binary "'+t+'"');var r={public_access:{get:{url:n.url}}},i=e.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(t[n].id,e)})})});var K={};function Q(t,e){return function(t){var e=K[t];e||(e=function(t){return new u.b(function(e){return W.get("workspaces/"+t+"/objs/mget",{ids:e,include_deleted:!0}).then(function(t){return t.results})},{batchSize:17})}(t),K[t]=e);return e}(t).retrieve(e).then(function(t){return t||{_deleted:e}})}var $=function(){return($=Object.assign||function(t){for(var e,n=1,r=arguments.length;n3&&void 0!==arguments[3]?arguments[3]:null;return n(t.objClassNameFor(this)).and(e,r,i,o)}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};A(t,this._appClassName());var e=this._prepareAttributesForCreate(t);return o(i.BasicObj.create(e))}},{key:"createFromFile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){if(!c.f.is(t)){if(c.c.is(t))throw new c.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new c.a('Creating CMS objects from file is only available with instances of "File"')}}(t),function(t,e,n){if(A(t,e),Object.prototype.hasOwnProperty.call(t,"blob"))throw new c.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new c.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(e,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(e);return i.BasicObj.createFromFile(t,n).then(function(t){return o(t)})}},{key:"_prepareAttributesForCreate",value:function(e){var n=this._schema(),i=this._appClassName(),o=O(e,t,n,i),a={_objClass:i};return v(Object(r.extend)({},e,o,a),n,i)}},{key:"_appClassName",value:function(){return t.objClassNameFor(this)}},{key:"_schema",value:function(){return s.forClass(this)}}],(f=[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return o(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return o(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return o(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return o(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return o(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var t=s.forInstance(this);return!!t&&t.isBinary()}},{key:"isRestricted",value:function(){return this._scrivitoPrivateContent.isRestricted()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection}},{key:"restrict",value:function(){this._scrivitoPrivateContent.restrict()}},{key:"unrestrict",value:function(){this._scrivitoPrivateContent.unrestrict()}},{key:"widget",value:function(t){return o(this._scrivitoPrivateContent.widget(t))}},{key:"widgets",value:function(){return o(this._scrivitoPrivateContent.widgets())}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}}])&&C(l.prototype,f),d&&C(l,d),u}()}function A(t,e){if(!e)throw new c.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(t.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new c.a('Invalid attribute "_objClass". '+'"'.concat(t._objClass,'.create" will automatically set the CMS object class ')+"correctly.")}var P=function(){function t(t,e){this._registry=t,this._basicObjFacetValue=e}return t.prototype.name=function(){return this._basicObjFacetValue.name()},t.prototype.count=function(){return this._basicObjFacetValue.count()},t.prototype.includedObjs=function(){var t=this._basicObjFacetValue.includedObjs();return d(this._registry,t)},t}();function N(t){var e=function(){function e(){this._scrivitoPrivateContent=new i.BasicObjSearch}return e.prototype.and=function(t,n,r,i){if(u=t,null!=(l=e)&&"undefined"!=typeof Symbol&&l[Symbol.hasInstance]?l[Symbol.hasInstance](u):u instanceof l){var o=t;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}else{if(void 0===n)throw new c.a("Missing operator to search with");if(void 0===r)throw new c.a('Missing value to search (specify "null" for missing)');var a=I(r),s=t;this._scrivitoPrivateContent.and(s,n,a,i)}var u,l;return this},e.prototype.andNot=function(t,e,n){var r=I(n);return this._scrivitoPrivateContent.andNot(t,e,r),this},e.prototype.facet=function(e,n){return this._scrivitoPrivateContent.facet(e,n).map(function(e){return new P(t,e)})},e.prototype.first=function(){var e=this._scrivitoPrivateContent.first();return e?d(t,e):null},e.prototype.take=function(e){return this._scrivitoPrivateContent.take(e).map(function(e){return d(t,e)})},e.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map(function(e){return d(t,e)})},e.prototype.offset=function(t){return this._scrivitoPrivateContent.offset(t),this},e.prototype.order=function(t,e){return this._scrivitoPrivateContent.order(t,e),this},e.prototype.count=function(){return this._scrivitoPrivateContent.count()},e}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)e.prototype[n]=function(){var e=this._scrivitoPrivateContent.iterator();return{next:function(){var n=e.next();return n.done?{done:n.done}:{done:n.done,value:d(t,n.value)}}}}}return e}function I(t){return r.isArray(t)?t.map(function(t){return h(t)}):h(t)}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function R(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};D(this,o),n=this,e=!(r=M(o).call(this))||"object"!==L(r)&&"function"!=typeof r?B(n):r;var u=s.forInstance(B(e)),l=t.objClassNameFor(e.constructor),c=e._prepareAttributesForConstructor(a,u,l),f=new i.BasicWidget(c);return f.onDidPersist(function(e){var n=d(t,e),r=O(c,t,u,l);n.update(r)}),e._scrivitoPrivateContent=f,e}var a,u,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(o,_(e)),a=o,(u=[{key:"obj",value:function(){var e=this._scrivitoPrivateContent.obj();return d(t,e)}},{key:"copy",value:function(){var e=t.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),e)}},{key:"destroy",value:function(){this._scrivitoPrivateContent.remove()}},{key:"_prepareAttributesForConstructor",value:function(t,e,n){!function(t,e){if(!t)throw new c.a("Creating widgets is not supported for the class Widget or abstract classes.");if(e.constructor!==Object)throw new c.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new c.a('Invalid attribute "_objClass". '+'"new '.concat(e._objClass,'" will automatically set the CMS object class correctly.'))}(n,t);var i={_objClass:n};return v(Object(r.extend)({},t,i),e,n)}}])&&R(a.prototype,u),l&&R(a,l),o}()}var z=["hash","obj","query","rel","target","title","url"];function U(t){return function(t){var e=r.without.apply(r,[r.keys(t)].concat(z));if(!r.isEmpty(e))throw new c.a("Unexpected attributes "+Object(c.I)(e)+". Available attributes: "+Object(c.I)(z))}(t),r.has(t,"obj")?r.extend({},t,{objId:H(t.obj)}):t}function H(t){return t?h(t).id():null}n(117);var W=function(){function t(){var t;this.mapping={},this.defaultClassForObjs=T(this),this.defaultClassForWidgets=F(this),this.defaultClassForLinks=(t=this,function(){function e(t){var e=U(t);this._scrivitoPrivateContent=new i.BasicLink(e)}return e.prototype.title=function(){return this._scrivitoPrivateContent.title()},e.prototype.query=function(){return this._scrivitoPrivateContent.query()},e.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},e.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},e.prototype.target=function(){return this._scrivitoPrivateContent.target()},e.prototype.url=function(){return this._scrivitoPrivateContent.url()},e.prototype.obj=function(){var e=this._scrivitoPrivateContent.obj();return e?d(t,e):null},e.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},e.prototype.copy=function(e){var n=this._scrivitoPrivateContent.copy(U(e)),r=Object.create(t.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},e.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},e.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},e}()),this.ObjSearch=N(this)}return t.prototype.register=function(t,e){this.mapping[t]=e},t.prototype.getClass=function(t){return this.mapping[t]||null},t.prototype.allObjClasses=function(){var t=this;return r.pick(this.mapping,function(e){return t.defaultClassForObjs.isPrototypeOf(e)})},t.prototype.allWidgetClasses=function(){var t=this;return r.pick(this.mapping,function(e){return t.defaultClassForWidgets.isPrototypeOf(e)})},t.prototype.objClassFor=function(t){return this.appClassFor(t,this.defaultClassForObjs)},t.prototype.widgetClassFor=function(t){return this.appClassFor(t,this.defaultClassForWidgets)},t.prototype.objClassNameFor=function(t){return r.findKey(this.mapping,function(e){return e===t})},t.prototype.setInitialContentFor=function(t){this.initialContentForFunction=t},t.prototype.initialContentFor=function(t,e){if(this.initialContentForFunction)return this.initialContentForFunction(t,e)},t.prototype.appClassFor=function(t,e){var n=this.getClass(t);return n&&e.isPrototypeOf(n)?n:e},t}();function V(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var K,Q=(K=function(t,e){return(K=Object.setPrototypeOf||V({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}K(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function $(t,e){if(e.extend&&!X(e.extend,t.defaultClassForObjs))throw new c.a('Invalid value for "extend": not a Scrivito Obj class');var n=e.extend||t.defaultClassForObjs,r=new s(e,n);return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),e}(n)}function G(t,e){if(e.extend&&!X(e.extend,t.defaultClassForWidgets))throw new c.a('Invalid value for "extend": not a Scrivito Widget class');var n=e.extend||t.defaultClassForWidgets,r=new s(e,n);return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),Object.defineProperty(e,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),e}(n)}function Y(t,e,n){var i=function(t,e,n){if(u(n))return n;var i=Object(r.extend)({},n,{name:e});return $(t,i)}(t,e,n);return t.register(e,i),i}function Z(t,e,n){var i=function(t,e,n){if(u(n))return n;var i=Object(r.extend)({},n,{name:e});return G(t,i)}(t,e,n);return t.register(e,i),i}function X(t,e){return!!t&&(t===e||V(t.prototype,e))}var J=c.O.refinement(c.O.Function,u,"ObjClass"),tt=c.O.interface({attributes:c.O.maybe(c.O.dict(c.O.refinement(c.O.String,function(t){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(t)},"String (alphanumeric, starting with a lower-case character)"),c.O.union([c.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),c.O.tuple([c.O.enums.of(["enum","multienum"]),c.O.interface({values:c.O.list(c.O.String)})]),c.O.tuple([c.O.enums.of(["reference","referencelist"]),c.O.interface({only:c.O.union([c.O.String,c.O.list(c.O.String)])})]),c.O.tuple([c.O.enums.of(["widgetlist"]),c.O.interface({only:c.O.union([c.O.String,c.O.list(c.O.String)])})])]),"Attributes Specification")),extend:c.O.maybe(J)}),et=c.O.refinement(c.O.Function,u,"WidgetClass"),nt=c.O.interface({attributes:tt.meta.props.attributes,extend:c.O.maybe(et),onlyInside:c.O.maybe(c.O.union([c.O.String,c.O.Array]))}),rt=Object(c.p)("createObjClass",[["options",tt]],{docPermalink:"js-sdk/createObjClass"}),it=Object(c.p)("createWidgetClass",[["options",nt]],{docPermalink:"js-sdk/createWidgetClass"}),ot=c.O.union([tt,J]),at=Object(c.p)("provideObjClass",[["name",c.O.String],["objClassOrDefinition",ot]],{docPermalink:"js-sdk/provideObjClass"}),st=c.O.union([nt,et]),ut=Object(c.p)("provideWidgetClass",[["name",c.O.String],["widgetClassOrDefinition",st]],{docPermalink:"js-sdk/provideWidgetClass"});var lt=function(){function t(){this._registry=new W,this.appModelAccessor=new g(this._registry)}return t.init=function(e){var n=new t;return e.Obj=n.Obj,e.Widget=n.Widget,e.Link=n.Link,e.ObjSearch=n.ObjSearch,e.appModelAccessor=n.appModelAccessor,e.provideObjClass=function(t,e){return n.provideObjClass(t,e)},e.provideWidgetClass=function(t,e){return n.provideWidgetClass(t,e)},e.createObjClass=function(t){return n.createObjClass(t)},e.createWidgetClass=function(t){return n.createWidgetClass(t)},e.getClass=function(t){return n.getClass(t)},e.allObjClasses=function(){return n.allObjClasses()},e.allWidgetClasses=function(){return n.allWidgetClasses()},e._privateRealm=n,n},Object.defineProperty(t.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),t.prototype.provideObjClass=function(t,e){for(var n=[],r=2;r0)if(this._replicationActive)this._bufferedBackendState=t;else{if(t._deleted)this._updateLocalState(null);else{var e=I(this._backendState,t);this._updateLocalState(L(this.localState,e))}this._backendState=t}}},{key:"finishSaving",value:function(){var t;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return c.j.resolve();t=this._currentRequestDeferred.promise}return t.catch(function(){return c.j.reject()})}},{key:"_startReplication",value:function(){var t=this;s.a.isEmpty(I(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new c.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),R.writeStarted(this._currentRequestDeferred.promise),Object(c.G)(function(){return t._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var t=this,e=this._localState,n=I(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then(function(n){t._handleBackendUpdate(e,n),t._currentRequestDeferred.resolve(t._objId),t._currentRequestDeferred=null,t._replicationActive=!1,t._startReplication()},function(e){t._currentRequestDeferred.reject(e),t._currentRequestDeferred=null,t._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(t){if(s.a.isEmpty(t))return c.j.resolve(this._backendState);var e="workspaces/".concat(this._workspaceId,"/objs/").concat(this._objId);return g.d.put(e,{obj:t})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new c.e}},{key:"_handleBackendUpdate",value:function(t,e){var n=I(t,this._localState);this._backendState=function(t,e){if(D(t,e)>0)return t;return e}(e,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(L(this._backendState,n))}},{key:"_updateLocalState",value:function(t){this._localState=t,U(this._workspaceId,this._objId,this._localState)}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}])&&P(e.prototype,n),r&&P(e,r),t}();function I(t,e){return E(t,e)}function L(t,e){return C(t,e)}function D(t,e){return t?e?function(t,e){if(t>e)return 1;if(e>t)return-1;return 0}(t._version,e._version):1:-1}var R=new(function(){function t(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return t.prototype.get=function(t,e){return this.replicationCache[t]||(this.replicationCache[t]={}),this.replicationCache[t][e]||(this.replicationCache[t][e]=new N(t,e)),this.replicationCache[t][e]},t.prototype.subscribeWrites=function(t){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=t,this.subscriptionToken},t.prototype.unsubscribeWrites=function(t){delete this.writeWriteCallbacks[t]},t.prototype.isDisabled=function(){return this.disabled},t.prototype.writeStarted=function(t){Object(a.each)(this.writeWriteCallbacks,function(e){e(t)})},t.prototype.disableReplication=function(){this.disabled=!0},t.prototype.enableReplication=function(){this.disabled=!1},t.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},t.prototype.clearCache=function(){this.replicationCache={}},t}());function M(t){R=t}function B(){return l.m.subState("objData")}var q=new u.LoadableCollection({name:"objdata",state:B,loader:function(t){var e=t[0],n=t[1];return R.get(e,n).start(),new c.j(function(){})}});var F=function(){function t(t,e){this._workspaceId=t,this._id=e,this._loadableData=q.get([t,e])}return t.prototype.get=function(){return Object(l.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},t.prototype.getWidget=function(t){return Object(l.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(t).get()},t.prototype.getWidgetWithBadPerformance=function(t){return this.getWidgetState(t).get()},t.prototype.getAttribute=function(t){if("_widget_pool"===t)throw new c.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(t).get()},t.prototype.getWidgetAttribute=function(t,e){return this.getWidgetState(t).subState(e).get()},t.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},t.prototype.set=function(t){Object(l.g)("Changing CMS content"),this._loadableData.set(t)},t.prototype.setError=function(t){this._loadableData.setError(t)},t.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},t.prototype.isAvailable=function(){return this._loadableData.isAvailable()},t.prototype.update=function(t){var e=C(this.get(),t);this.set(e),this._replication().notifyLocalState(e)},t.prototype.finishSaving=function(){return this._replication().finishSaving()},t.prototype.workspaceId=function(){return this._workspaceId},t.prototype.equals=function(e){return n=e,!!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.workspaceId()===e.workspaceId()&&this._id===e._id);var n,r},t.prototype._replication=function(){return R.get(this._workspaceId,this._id)},t.prototype.getWidgetState=function(t){return this.getSubReader("_widget_pool").subState(t)},t.prototype.getSubReader=function(t){return this._loadableData.reader().subState(t)},t}();function z(t,e){var n=W(t,e);return n.set(null),R.get(t,e).notifyBackendState(null),n}function U(t,e,n){W(t,e).set(n)}function H(t,e){var n=W(t,e);if(n.ensureAvailable())return n}function W(t,e){return new F(t,e)}var V=function(){return(V=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var i=new $(t,e,n,r-1);return Object(u.load)(function(){return i.continuationForNextBatch()})}return c.j.resolve()}(r,i,n,o).then(function(t){if(l())throw new Error;var e={size:n,continuation:t,include_objs:!s()},o=V({},i,e);return g.e.retrieveObjQuery(r,o).then(function(t){var e=t.objs;return e&&a(function(){return e.forEach(function(t){t._id&&R.get(r,t._id).notifyBackendState(t)})}),function(t,e){e.forEach(function(e){return function(t,e){Object(u.load)(function(){return H(t,e)})}(t,e)})}(r,t.results),{results:t.results,total:t.total,continuation:t.continuation}})})},invalidation:function(t){var e=t[0];t[1],t[2];return Object(u.loadableWithDefault)(void 0,function(){return i(e)})||""}}),$=function(){function t(t,e,n,r){void 0===r&&(r=0),this._workspaceId=t,this._params=e,this._batchSize=n,this._index=r}return t.store=function(t,e,n,r){void 0===r&&(r=n.length),Q.get([t,Y(e),0]).set({results:n,total:r})},t.firstBatchFor=function(e,n,r){return new t(e,Y(n),r)},t.countFor=function(t,e){return this.firstBatchFor(t,e,0).count()},t.prototype.objIds=function(){return this._response().results},t.prototype.count=function(){return this._response().total||0},t.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new t(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(t.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),t.prototype.continuationForNextBatch=function(){return this._response().continuation},t.prototype._response=function(){return this._data().get()||K},t.prototype._data=function(){return Q.get([this._workspaceId,this._params,this._index],this._batchSize)},t}(),G=$;function Y(t){var e=Object(a.omit)({query:t.query,offset:t.offset,sort_by:t.sortBy,sort_order:t.sortDirection},a.isUndefined);return t.includeDeleted&&(e.options={include_deleted:!0}),e}function Z(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function X(t,e){for(var n=0;n=1,r=arguments.length>=2;if(!(this instanceof o))return n?r?new o(t,e):new o(t):new o;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}o.version="1.19.1";var a=o.prototype,s=Object.prototype.hasOwnProperty;function u(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function c(t){return"Array"===l(t)}function f(t,e){var n,r,i={};if("RegExp"===l(e))i=null;else if(c(e))for(n=0,r=e.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=m,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=m,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var n=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var y,g={encode:"encode",decode:"decode"},b=function(t,e){return function(n){try{return o[e](n+"").replace(o.characters[t][e].expression,function(n){return o.characters[t][e].map[n]})}catch(t){return n}}};for(y in g)o[y+"PathSegment"]=b("pathname",g[y]),o[y+"UrnPathSegment"]=b("urnpath",g[y]);var w=function(t,e,n){return function(r){var i;i=n?function(t){return o[e](o[n](t))}:o[e];for(var a=(r+"").split(t),s=0,u=a.length;s-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),(n=t.indexOf("?"))>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=o.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},o.parseHost=function(t,e){t||(t="");var n,r,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u-1?r:t.length-1);return i>-1&&(-1===r||i-1?p.slice(0,h)+p.slice(h).replace(a,""):p.replace(a,"")).length<=l[0].length||n.ignore&&n.ignore.test(p))){var y=e(p,c,d=c+p.length,t);void 0!==y?(y=String(y),t=t.slice(0,c)+y+t.slice(d),r.lastIndex=c+y.length):r.lastIndex=d}}return r.lastIndex=0,t},o.ensureValidHostname=function(e,n){var r=!!e,i=!1;if(!!n&&(i=d(o.hostProtocols,n)),i&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=i),this},a.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new o(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=O("query","?"),a.fragment=O("fragment","#"),a.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},a.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},a.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(n):n}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},a.path=a.pathname,a.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var r=t instanceof o,i="object"==typeof t&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1);if(!r&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)"query"!==n&&s.call(this._parts,n)&&(this._parts[n]=a[n]);a.query&&this.query(a.query,!1)}return this.build(!e),this},a.is=function(t){var e=!1,r=!1,i=!1,a=!1,s=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,r=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),s=(a=!(e=r||i))&&n&&n.has(this._parts.hostname),u=a&&o.idn_expression.test(this._parts.hostname),l=a&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var k=a.protocol,x=a.port,C=a.hostname;a.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,t,e)},a.scheme=a.protocol,a.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),x.call(this,t,e))},a.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol)}return C.call(this,t,e)},a.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=o(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},a.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=o.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},a.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=o.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},a.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,r),a=new RegExp("^"+u(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},a.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},a.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[i.toLowerCase()]&&n.get(this._parts.hostname)||i}var o;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},a.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?o.decodePath(r):r}var i=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,i),s=new RegExp("^"+u(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},a.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?o.decodePathSegment(r):r}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var a=new RegExp(u(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),i?this.normalizePath(e):this.build(!e),this},a.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,i=this.filename(),a=i.lastIndexOf(".");return-1===a?"":(n=i.substring(a+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?o.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var s,l=this.suffix();if(l)s=t?new RegExp(u(l)+"$"):new RegExp(u("."+l)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return s&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},a.segment=function(t,e,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(c(e)){a=[];for(var s=0,u=e.length;s0&&void 0!==arguments[0]?arguments[0]:window).devicePixelRatio||1}function i(){return window.location}function o(t){window.location.assign(t)}function a(){return window.history}function s(){return window.screen}function u(){return document}function l(){return window.innerHeight}function c(){return window.pageXOffset}function f(){return window.pageYOffset}function d(t,e){window.scrollTo(t,e)}function p(){return window.document.body.scrollHeight}n.d(e,"a",function(){return r}),n.d(e,"f",function(){return i}),n.d(e,"i",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"j",function(){return s}),n.d(e,"b",function(){return u}),n.d(e,"e",function(){return l}),n.d(e,"g",function(){return c}),n.d(e,"h",function(){return f}),n.d(e,"k",function(){return d}),n.d(e,"c",function(){return p})},function(t,e,n){"use strict";n.d(e,"a",function(){return l}),n.d(e,"c",function(){return c}),n.d(e,"b",function(){return f});var r=n(0),i=n(3),o=n(14);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=!1,u=!1;function l(){var t=o.f().href,e=Object(i.queryParametersFromUrl)(t),n=e._scrivito_workspace_id||"published";"string"==typeof n?(Object(i.setCurrentWorkspaceId)(n),"published"!==n&&(s=e.hasOwnProperty("_scrivito_editing"),u=!s&&e.hasOwnProperty("_scrivito_comparison"))):Object(r.Q)(new r.g("Expected value of _scrivito_workspace_id to be a string, but it is "+a(n)))}function c(){return s}function f(){return u}},function(t,e,n){"use strict";var r=n(1),i=n.n(r),o=n(5),a=n(0),s=n(6),u=n(79);var l=function(t){return t.displayName||t.name};function c(t){if(r.isValidElement(t))return t.props.__scrivitoForwardElementType||t.type}var f,d=(f=function(t,e){var n,r;return(f=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(){return(p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],i=t&&c(t),o=e&&c(e),a=i||o;if(t&&c(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var u=r[r.length-1];s="."===u||".."===u||""===u}else s=!1;for(var l=0,d=r.length;d>=0;d--){var p=r[d];"."===p?f(r,d):".."===p?(f(r,d),l++):l&&(f(r,d),l--)}if(!a)for(;l--;l)r.unshift("..");!a||""===r[0]||r[0]&&c(r[0])||r.unshift("");var h=r.join("/");return s&&"/"!==h.substr(-1)&&(h+="/"),h};"function"==typeof Symbol&&Symbol.iterator;var p,h,v=function(t){return"/"===t.charAt(0)?t:"/"+t},m=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},y=function(t,e){return m(t,e)?t.substr(e.length):t},g=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},b=function(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i},w=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};l()(k,"Browser history needs a DOM");var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t.forceRefresh,a=void 0!==o&&o,u=t.getUserConfirmation,c=void 0===u?E:u,f=t.keyLength,d=void 0===f?6:f,p=t.basename?g(v(t.basename)):"",h=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return s()(!p||m(o,p),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+o+'" to begin with "'+p+'".'),p&&(o=y(o,p)),_(o,r,n)},w=function(){return Math.random().toString(36).substr(2,d)},A=O(),P=function(t){j(W,t),W.length=n.length,A.notifyListeners(W.location,W.action)},N=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||D(h(t.state))},I=function(){D(h(T()))},L=!1,D=function(t){L?(L=!1,P()):A.confirmTransitionTo(t,"POP",c,function(e){e?P({action:"POP",location:t}):R(t)})},R=function(t){var e=W.location,n=B.indexOf(e.key);-1===n&&(n=0);var r=B.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(L=!0,F(i))},M=h(T()),B=[M.key],q=function(t){return p+b(t)},F=function(t){n.go(t)},z=0,U=function(t){1===(z+=t)?(x(window,"popstate",N),i&&x(window,"hashchange",I)):0===z&&(C(window,"popstate",N),i&&C(window,"hashchange",I))},H=!1,W={length:n.length,action:"POP",location:M,createHref:q,push:function(t,e){s()(!("object"===(void 0===t?"undefined":S(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=_(t,e,w(),W.location);A.confirmTransitionTo(i,"PUSH",c,function(t){if(t){var e=q(i),o=i.key,u=i.state;if(r)if(n.pushState({key:o,state:u},null,e),a)window.location.href=e;else{var l=B.indexOf(W.location.key),c=B.slice(0,-1===l?0:l+1);c.push(i.key),B=c,P({action:"PUSH",location:i})}else s()(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){s()(!("object"===(void 0===t?"undefined":S(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=_(t,e,w(),W.location);A.confirmTransitionTo(i,"REPLACE",c,function(t){if(t){var e=q(i),o=i.key,u=i.state;if(r)if(n.replaceState({key:o,state:u},null,e),a)window.location.replace(e);else{var l=B.indexOf(W.location.key);-1!==l&&(B[l]=i.key),P({action:"REPLACE",location:i})}else s()(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:F,goBack:function(){return F(-1)},goForward:function(){return F(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=A.setPrompt(t);return H||(U(1),H=!0),function(){return H&&(H=!1,U(-1)),e()}},listen:function(t){var e=A.appendListener(t);return U(1),function(){U(-1),e()}}};return W};Object.assign,"function"==typeof Symbol&&Symbol.iterator,Object.assign;n.d(e,"f",function(){return N}),n.d(e,"a",function(){return I}),n.d(e,"c",function(){return L}),n.d(e,"b",function(){return D}),n.d(e,"d",function(){return R}),n.d(e,"e",function(){return M});var P=0;function N(t){if("/"!==t.createHref({pathname:"/"}))throw new i.a("Expected a history without a preconfigured basename. For further details, see: https://www.scrivito.com/js-sdk/useHistory");if(t!==p){var e=!p;!function(t){h&&h();h=t.listen(F)}(t),p=t,e||F()}}function I(){var t=q().location;return""+t.pathname+t.search+t.hash}function L(){return""+r.f().origin+I()}function D(){return z().get()||0}function R(t){return q().push(t)}function M(t){return q().replace(t)}function B(){p||N(A())}function q(){return B(),p}function F(){P++,z().set(P)}function z(){return o.b.subState("historyChangesCount")}},function(t,e,n){var r=n(31),i=n(60);t.exports=function(t){return r(t)?t.displayName:i(t)}},,function(t,e,n){"use strict";n.d(e,"d",function(){return f}),n.d(e,"f",function(){return d}),n.d(e,"c",function(){return p}),n.d(e,"e",function(){return h}),n.d(e,"b",function(){return v}),n.d(e,"a",function(){return m});var r=n(10),i=n(19),o=n(0),a=n(6);var s,u,l=(s=function(t,e){var n,r;return(s=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(t,e){t.__proto__=e})||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e}(o.i);function f(t){u=t}function d(){return!!u}function p(t){var e=u(Object(r.f)(Object(i.a)(),t));return"string"==typeof e&&e.length>0?e:null}function h(t){if(!u)throw new c("Scrivito.unstable_selectSiteId is only available in the multi-site mode");if(v())throw new c("Scrivito.unstable_selectSiteId can be called only once");if("string"!=typeof t||!t)throw new c("Scrivito.unstable_selectSiteId can only be called with a non-empty string");y().set(t)}function v(){if(!u)throw new o.g("Calling getSelectedSiteId is only available in multi-site mode");return y().get()||null}function m(t){if(!v())throw new c("Used "+t+" in the multi-site mode, but the site ID is not yet selected. Forgot to use Scrivito.unstable_selectSiteId?")}function y(){return a.b.subState("selectedSiteId")}},function(t,e,n){(function(e){ /*! * Quill Editor v1.3.5 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */ var n;n=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),u=n(47),l=n(48),c=n(49),f=n(12),d=n(31),p=n(32),h=n(30),v=n(1),m={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:l.default,Scroll:a.default,Block:u.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:d.default,Style:p.default,Store:h.default}};e.default=m},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=o;var a,s={},u={},l={},c={};function f(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||l[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new o("Unable to create "+t+" blot");var r=n,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(i,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n1)return e.map(function(e){return t(e)});var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?s[r.keyName]=r:(null!=r.className&&(u[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(t){return t.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(t){null!=l[t]&&null!=r.className||(l[t]=r)})));return r}},function(t,e,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),u=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};u.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},u.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},u.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},u.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},u.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},u.prototype.filter=function(t){return this.ops.filter(t)},u.prototype.forEach=function(t){this.ops.forEach(t)},u.prototype.map=function(t){return this.ops.map(t)},u.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(r){(t(r)?e:n).push(r)}),[e,n]},u.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},u.prototype.changeLength=function(){return this.reduce(function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t},0)},u.prototype.length=function(){return this.reduce(function(t,e){return t+a.length(e)},0)},u.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},u.prototype.diff=function(t,e){if(this.ops===t.ops)return new u;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")}).join("")}),o=new u,l=r(n[0],n[1],e),c=a.iterator(this.ops),f=a.iterator(t.ops);return l.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),o.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var s=c.next(n),u=f.next(n);i(s.insert,u.insert)?o.retain(n,a.attributes.diff(s.attributes,u.attributes)):o.push(u).delete(n)}e-=n}}),o.chop()},u.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),r=new u,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),l="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new u}}r.length()>0&&t(r,{},i)},u.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),r=a.iterator(t.ops),i=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),l=r.next(o);if(s.delete)continue;l.delete?i.push(l):i.retain(o,a.attributes.transform(s.attributes,l.attributes,e))}else i.retain(a.length(n.next()));return i.chop()},u.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}();function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:y(t.parent,e))}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[l.default,s.default.Embed,c.default],e.bubbleFormats=y,e.BlockEmbed=v,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=w(e,r),this.container=this.options.container,null==this.container)return g.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new d.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,function(t){t===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(u.default.events.SCROLL_UPDATE,function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;_.call(n,function(){return n.editor.update(null,e,i)},t)});var o=this.clipboard.convert("
"+i+"


");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),h.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&g.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||g.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=O(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],_.call(this,function(){return r.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;return _.call(this,function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(t,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,y({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,y({},t,e))}return n.setSelection(r,u.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(t,e,n,r,o){var a,s=this,u=O(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],_.call(this,function(){return s.editor.formatLine(t,e,a)},o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var a,s=this,u=O(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],_.call(this,function(){return s.editor.formatText(t,e,a)},o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=O(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=O(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return _.call(this,function(){return i.editor.insertEmbed(e,n,r)},o,e)}},{key:"insertText",value:function(t,e,n,r,o){var a,s=this,u=O(t,0,n,r,o),l=i(u,4);return t=l[0],a=l[2],o=l[3],_.call(this,function(){return s.editor.insertText(t,e,a)},o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=O(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],_.call(this,function(){return r.editor.removeFormat(t,e)},n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return _.call(this,function(){t=new a.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=O(e,n,r),a=i(o,4);e=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(e,n),r),r!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return _.call(this,function(){return t=new a.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();function w(t,e){if((e=(0,p.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==b.DEFAULTS.theme){if(e.theme=b.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=v.default;var n=(0,p.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){!0===t.modules[e]&&(t.modules[e]={})})});var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce(function(t,e){var n=b.import("modules/"+e);return null==n?g.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,p.default)(!0,{},b.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e.modules=Object.keys(e.modules).reduce(function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t},{}),e}function _(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===u.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=k(i,s,e):0!==r&&(i=k(i,n,r,e)),this.setSelection(i,u.default.sources.SILENT)),s.length()>0){var l,c,f=[u.default.events.TEXT_CHANGE,s,o,e];if((l=this.emitter).emit.apply(l,[u.default.events.EDITOR_CHANGE].concat(f)),e!==u.default.sources.SILENT)(c=this.emitter).emit.apply(c,f)}return s}function O(t,e,n,i,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=i,i=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[t,e,a,o=o||u.default.sources.API]}function k(t,e,n,r){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var l=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r!==u.default.sources.USER)}),c=i(l,2);o=c[0],s=c[1]}else{var d=[t.index,t.index+t.length].map(function(t){return t=0?t+n:Math.max(e,t+n)}),p=i(d,2);o=p[0],s=p[1]}return new f.Range(o,s-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=u.default.events,b.sources=u.default.sources,b.version="1.3.5",b.imports={delta:a.default,parchment:c.default,"core/module":l.default,"core/theme":v.default},e.expandConfig=w,e.overload=O,e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a=0;l--)if(f[l]!=d[l])return!1;for(l=f.length-1;l>=0;l--)if(c=f[l],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function u(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,u=o-a+1,l=this.isolate(a,u),c=l.next;l.format(r,i),c instanceof e&&c.formatAt(0,t-a+n-u,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(c.default,t),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}();m.blotName="code-block",m.tagName="PRE",m.TAB=" ",e.Code=v,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n=o&&!p.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,p);var h=e.scroll.line(t),v=i(h,2),y=v[0],g=v[1],b=(0,m.default)({},(0,f.bubbleFormats)(y));if(y instanceof d.default){var w=y.descendant(u.default.Leaf,g),_=i(w,1)[0];b=(0,m.default)(b,(0,f.bubbleFormats)(_))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var O=Object.keys(a.insert)[0];if(null==O)return t;e.scroll.insertAt(t,O,a.insert[O])}o+=l}return Object.keys(c).forEach(function(n){e.scroll.formatAt(t,l,n,c[n])}),t+l},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach(function(e){var o=e.length();if(e instanceof l.default){var s=t-e.offset(n.scroll),u=e.newlineIndex(s+a)-s+1;e.formatAt(s,u,i,r[i])}else e.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,h.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(t,e,i,r[i])}),this.update((new a.default).retain(t).retain(e,(0,h.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=i(t,1)[0];e instanceof d.default?n.push(e):e instanceof u.default.Leaf&&r.push(e)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(u.default.Leaf,t,e));var o=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=w((0,f.bubbleFormats)(n),e)}return e});return m.default.apply(m.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(i){n.scroll.formatAt(t,e.length,i,r[i])}),this.update((new a.default).retain(t).insert(e,(0,h.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===d.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof p.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=i(r,2),s=o[0],u=o[1],c=0,f=new a.default;null!=s&&(c=s instanceof l.default?s.newlineIndex(u)-u+1:s.length()-u,f=s.delta().slice(u,u+c-1).insert("\n"));var d=this.getContents(t,e+c).diff((new a.default).insert(n).concat(f)),p=(new a.default).retain(t).concat(d);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(g)&&u.default.find(e[0].target)){var i=u.default.find(e[0].target),o=(0,f.bubbleFormats)(i),s=i.offset(this.scroll),l=e[0].oldValue.replace(c.default.CONTENTS,""),d=(new a.default).insert(l),p=(new a.default).insert(i.value());t=(new a.default).retain(s).concat(d.diff(p,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)},new a.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,v.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function w(t,e){return Object.keys(e).reduce(function(n,r){return null==t[r]?n:(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]],n)},{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},h=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,u.default.sources.USER),1)}),this.emitter.on(u.default.events.EDITOR_CHANGE,function(t,e){t===u.default.events.TEXT_CHANGE&&e.length()>0&&r.update(u.default.sources.SILENT)}),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(u.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}})}}),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}}),this.update(u.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",function(){t.composing=!0}),this.root.addEventListener("compositionend",function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout(function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,function(){t.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){t.mouseDown=!1,t.update(u.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,o=this.scroll.leaf(t),a=r(o,2),s=a[0],u=a[1];if(null==s)return null;var l=s.position(u,!0),c=r(l,2);i=c[0],u=c[1];var f=document.createRange();if(e>0){f.setStart(i,u);var d=this.scroll.leaf(t+e),p=r(d,2);if(s=p[0],u=p[1],null==s)return null;var h=s.position(u,!0),v=r(h,2);return i=v[0],u=v[1],f.setEnd(i,u),f.getBoundingClientRect()}var m="left",y=void 0;return i instanceof Text?(u0&&(m="right")),{bottom:y.top+y.height,height:y.height,left:y[m],right:y[m],top:y.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map(function(t){var n=r(t,2),i=n[0],a=n[1],s=o.default.find(i,!0),u=s.offset(e.scroll);return 0===a?u:s instanceof o.default.Container?u+s.length():u+s.index(i,a)}),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(i)));return new p(s,a-s)}},{key:"normalizeNative",value:function(t){if(!v(this.root,t.startContainer)||!t.collapsed&&!v(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],o=this.scroll.length();return n.forEach(function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),u=r(s,2),l=u[0],c=u[1],f=l.position(c,0!==n),d=r(f,2);a=d[0],c=d[1],i.push(a,c)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,i)),a=r(o,1)[0],s=a;if(e.length>0){var u=this.scroll.line(Math.min(e.index+e.length,i));s=r(u,1)[0]}if(null!=a&&null!=s){var l=t.getBoundingClientRect();n.topl.bottom&&(t.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e&&(n=e,e=!1),d.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],l=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=l&&l.native.collapsed&&l.start.node!==this.cursor.textNode&&this.cursor.restore();var f,d=[u.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];if((c=this.emitter).emit.apply(c,[u.default.events.EDITOR_CHANGE].concat(d)),t!==u.default.sources.SILENT)(f=this.emitter).emit.apply(f,d)}}}]),t}();function v(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=p,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t;var t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var r=n(11),i=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=i(!0,{},e);for(var o in n||(r=Object.keys(r).reduce(function(t,e){return null!=r[e]&&(t[e]=r[e]),t},{})),t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,i){return r(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.exports=o},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,i;try{n=Map}catch(t){n=function(){}}try{r=Set}catch(t){r=function(){}}try{i=Promise}catch(t){i=function(){}}function o(a,u,l,c,f){"object"==typeof u&&(l=u.depth,c=u.prototype,f=u.includeNonEnumerable,u=u.circular);var d=[],p=[],h=void 0!==e;return void 0===u&&(u=!0),void 0===l&&(l=1/0),function a(l,v){if(null===l)return null;if(0===v)return l;var m,y;if("object"!=typeof l)return l;if(t(l,n))m=new n;else if(t(l,r))m=new r;else if(t(l,i))m=new i(function(t,e){l.then(function(e){t(a(e,v-1))},function(t){e(a(t,v-1))})});else if(o.__isArray(l))m=[];else if(o.__isRegExp(l))m=new RegExp(l.source,s(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(o.__isDate(l))m=new Date(l.getTime());else{if(h&&e.isBuffer(l))return m=new e(l.length),l.copy(m),m;t(l,Error)?m=Object.create(l):void 0===c?(y=Object.getPrototypeOf(l),m=Object.create(y)):(m=Object.create(c),y=c)}if(u){var g=d.indexOf(l);if(-1!=g)return p[g];d.push(l),p.push(m)}for(var b in t(l,n)&&l.forEach(function(t,e){var n=a(e,v-1),r=a(t,v-1);m.set(n,r)}),t(l,r)&&l.forEach(function(t){var e=a(t,v-1);m.add(e)}),l){var w;y&&(w=Object.getOwnPropertyDescriptor(y,b)),w&&null==w.set||(m[b]=a(l[b],v-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(l);for(b=0;b<_.length;b++){var O=_[b];(!(x=Object.getOwnPropertyDescriptor(l,O))||x.enumerable||f)&&(m[O]=a(l[O],v-1),x.enumerable||Object.defineProperty(m,O,{enumerable:!1}))}}if(f){var k=Object.getOwnPropertyNames(l);for(b=0;b0){if(s instanceof u.BlockEmbed||p instanceof u.BlockEmbed)return void this.optimize();if(s instanceof f.default){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.split(h+1))===p)return void this.optimize()}else if(p instanceof f.default){var v=p.newlineIndex(0);v>-1&&p.split(v+1)}var m=p.children.head instanceof c.default?null:p.children.head;s.moveChildren(p,m),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(t),t=r}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(h,t)}},{key:"lines",value:function(){return function t(e,n,r){var i=[],o=r;return e.children.forEachAt(n,r,function(e,n,r){h(e)?i.push(e):e instanceof a.default.Container&&(i=i.concat(t(e,n,o))),o-=r}),i}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}();v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[l.default,u.BlockEmbed,d.default],e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function t(t,e){for(var n=0;n-1}u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=u,e.sanitize=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":i(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(n(0)),i=y(n(5)),o=n(4),a=y(o),s=y(n(16)),u=y(n(24)),l=y(n(23)),c=y(n(35)),f=y(n(6)),d=y(n(22)),p=y(n(7)),h=y(n(55)),v=y(n(42)),m=y(n(34));function y(t){return t&&t.__esModule?t:{default:t}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":u.default,"blots/cursor":l.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":d.default,"blots/text":p.default,"modules/clipboard":h.default,"modules/history":v.default,"modules/keyboard":m.default}),r.default.register(a.default,s.default,l.default,f.default,d.default,p.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),null!=this.next&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),i=n(31),o=n(32),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach(function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=S(t);if(null==r||null==r.key)return y.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,u.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter(function(t){return e.match(n,t)});if(0!==a.length){var u=t.quill.getSelection();if(null!=u&&t.quill.hasFocus()){var l=t.quill.getLine(u.index),c=i(l,2),d=c[0],p=c[1],h=t.quill.getLeaf(u.index),v=i(h,2),m=v[0],y=v[1],g=0===u.length?[m,y]:t.quill.getLeaf(u.index+u.length),b=i(g,2),w=b[0],_=b[1],O=m instanceof f.default.Text?m.value().slice(0,y):"",k=w instanceof f.default.Text?w.value().slice(_):"",x={collapsed:0===u.length,empty:0===u.length&&d.length()<=1,format:t.quill.getFormat(u),offset:p,prefix:O,suffix:k};a.some(function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==x.format[t]}))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,s.default)(e.format[t],x.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix))&&(!(null!=e.suffix&&!e.suffix.test(x.suffix))&&!0!==e.handler.call(t,u,x))})&&n.preventDefault()}}}})}}]),e}();function w(t,e){var n,r=t===b.keys.LEFT?"prefix":"suffix";return m(n={key:t,shiftKey:e,altKey:null},r,/^$/),m(n,"handler",function(n){var r=n.index;t===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof f.default.Embed)||(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),!1)}),n}function _(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=i(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var u=r.formats(),l=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(u,l)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-f,f,o,d.default.sources.USER),this.quill.focus()}}function O(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(t.index),s=i(a,1)[0];if(e.offset>=s.length()-1){var u=this.quill.getLine(t.index+1),l=i(u,1)[0];if(l){var f=s.formats(),p=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,p)||{},o=l.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,d.default.sources.USER)}}function k(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function x(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],d.default.sources.USER))})}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,o=e.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),u=s[0],l=s[1];if(null!=u){var c=this.quill.getIndex(u),p=u.newlineIndex(l,!0)+1,h=u.newlineIndex(c+l+o),v=u.domNode.textContent.slice(p,h).split("\n");l=0,v.forEach(function(e,i){t?(u.insertAt(p+l,n.TAB),l+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(u.deleteAt(p+l,n.TAB.length),l-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),l+=e.length+1}),this.quill.update(d.default.sources.USER),this.quill.setSelection(r,o,d.default.sources.SILENT)}}}}function E(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function S(t){if("string"==typeof t||"number"==typeof t)return S({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[g]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:E("bold"),italic:E("italic"),underline:E("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new l.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(0,u.default)({},r.formats(),{list:"checked"}),s=(new l.default).retain(t.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=i(n,2),o=r[0],a=r[1],s=(new l.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var u=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":u="unchecked";break;case"[x]":u="checked";break;case"-":case"*":u="bullet";break;default:u="ordered"}this.quill.insertText(t.index," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new l.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:u});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(new l.default).retain(t.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,d.default.sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}();function l(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)}))}(t)&&(n-=1),n}u.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=u,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,a.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",a.default.sources.USER),this.quill.setSelection(r+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}();function x(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}e.BaseTooltip=k,e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(ta?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,s),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},u=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(u),t.optimize(n))},l=e,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach(function(t){s(t,!1)})})):"attributes"===t.type&&s(e.prev)),s(e))}),this.children.forEach(u),i=(l=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map(function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==r&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)}),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=u},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var r=a.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),o=a.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;oe.length?t:e,f=t.length>e.length?e:t,d=c.indexOf(f);if(-1!=d)return l=[[r,c.substring(0,d)],[i,f],[r,c.substring(d+f.length)]],t.length>e.length&&(l[0][0]=l[2][0]=n),l;if(1==f.length)return[[n,t],[r,e]];var p=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,i,o,a,f]:null}var o,a,l,c,f,d=i(n,r,Math.ceil(n.length/4)),p=i(n,r,Math.ceil(n.length/2));if(!d&&!p)return null;o=p?d&&d[4].length>p[4].length?d:p:d;t.length>e.length?(a=o[0],l=o[1],c=o[2],f=o[3]):(c=o[0],f=o[1],a=o[2],l=o[3]);var h=o[4];return[a,l,c,f,h]}(t,e);if(p){var h=p[0],v=p[1],m=p[2],y=p[3],g=p[4],b=o(h,m),w=o(v,y);return b.concat([[i,g]],w)}return function(t,e){for(var i=t.length,o=e.length,s=Math.ceil((i+o)/2),u=s,l=2*s,c=new Array(l),f=new Array(l),d=0;di)m+=2;else if(O>o)v+=2;else if(h){var k=u+p-w;if(k>=0&&k=x)return a(t,e,S,O)}}}for(var C=-b+y;C<=b-g;C+=2){for(var k=u+C,E=(x=C==-b||C!=b&&f[k-1]i)g+=2;else if(E>o)y+=2;else if(!h){var _=u+p-C;if(_>=0&&_=(x=i-x))return a(t,e,S,O)}}}}return[[n,t],[r,e]]}(t,e)}(t=t.substring(0,t.length-f),e=e.substring(0,e.length-f));return d&&h.unshift([i,d]),p&&h.push([i,p]),function t(e){e.push([i,""]);var o=0;var a=0;var l=0;var c="";var f="";var d;for(;o1?(0!==a&&0!==l&&(0!==(d=s(f,c))&&(o-a-l>0&&e[o-a-l-1][0]==i?e[o-a-l-1][1]+=f.substring(0,d):(e.splice(0,0,[i,f.substring(0,d)]),o++),f=f.substring(d),c=c.substring(d)),0!==(d=u(f,c))&&(e[o][1]=f.substring(f.length-d)+e[o][1],f=f.substring(0,f.length-d),c=c.substring(0,c.length-d))),0===a?e.splice(o-l,a+l,[r,f]):0===l?e.splice(o-a,a+l,[n,c]):e.splice(o-a-l,a+l,[n,c],[r,f]),o=o-a-l+(a?1:0)+(l?1:0)+1):0!==o&&e[o-1][0]==i?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,l=0,a=0,c="",f=""}""===e[e.length-1][1]&&e.pop();var p=!1;o=1;for(;o0&&o.splice(a+2,0,[u[0],l]),c(o,a,3)}return t}(h,l)),h=function(t){for(var e=!1,o=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},a=2;a=55296&&s.charCodeAt(s.length-1)<=56319)&&t[a-1][0]===n&&o(t[a-1][1])&&t[a][0]===r&&o(t[a][1])&&(e=!0,t[a-1][1]=t[a-2][1].slice(-1)+t[a-1][1],t[a][1]=t[a-2][1].slice(-1)+t[a][1],t[a-2][1]=t[a-2][1].slice(0,-1));var s;if(!e)return t;for(var u=[],a=0;a0&&u.push(t[a]);return u}(h)}function a(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),u=e.substring(r),l=o(i,a),c=o(s,u);return l.concat(c)}function s(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n=0&&r>=e-1;r--)if(r+1=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=S(e,n));parseFloat(r.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e));return e}],["li",function(t,e){var n=u.default.query(t);if(null==n||"list-item"!==n.blotName||!T(e,"\n"))return e;var r=-1,i=t.parentNode;for(;!i.classList.contains("ql-clipboard");)"list"===(u.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new s.default}]],x=[d.AlignAttribute,m.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),C=[d.AlignStyle,p.BackgroundStyle,v.ColorStyle,m.DirectionStyle,y.FontStyle,g.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),E=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],k.concat(r.options.matchers).forEach(function(t){var e=i(t,2),o=e[0],a=e[1];(n.matchVisual||a!==D)&&r.addMatcher(o,a)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,f.default),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,w({},h.default.blotName,e[h.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],u=o[1],l=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce(function(t,n){return n(e,t)},new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(i,o){var a=t(o,n,r);return o.nodeType===e.ELEMENT_NODE&&(a=n.reduce(function(t,e){return e(o,t)},a),a=(o[O]||[]).reduce(function(t,e){return e(o,t)},a)),i.concat(a)},new s.default):new s.default}(this.container,a,u);return T(l,"\n")&&null==l.ops[l.ops.length-1].attributes&&(l=l.compose((new s.default).retain(l.length()-1).delete(1))),_.log("convert",this.container.innerHTML,l),this.container.innerHTML="",l}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,l.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),l.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l.default.sources.SILENT),setTimeout(function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,l.default.sources.USER),e.quill.setSelection(r.length()-n.length,l.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),function(t){t[O]=t[O]||[],t[O].push(s)})}}),[e,n]}}]),e}();function S(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce(function(t,n){return S(t,n,e[n])},t):t.reduce(function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,a.default)({},w({},e,n),r.attributes))},new s.default)}function j(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function T(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function P(t,e,n){return S(n,t,!0)}function N(t,e){var n=u.default.Attributor.Attribute.keys(t),r=u.default.Attributor.Class.keys(t),i=u.default.Attributor.Style.keys(t),o={};return n.concat(r).concat(i).forEach(function(e){var n=u.default.query(e,u.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=x[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(n=C[e],o[n.attrName]=n.value(t)||void 0))}),Object.keys(o).length>0&&(e=S(e,o)),e}function I(t,e){var n=u.default.query(t);if(null==n)return e;if(n.prototype instanceof u.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new s.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=S(e,n.blotName,n.formats(t)));return e}function L(t,e){return T(e,"\n")||(A(t)||e.length()>0&&t.nextSibling&&A(t.nextSibling))&&e.insert("\n"),e}function D(t,e){if(A(t)&&null!=t.nextElementSibling&&!T(e,"\n\n")){var n=t.offsetHeight+parseFloat(j(t).marginTop)+parseFloat(j(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!j(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&A(t.parentNode)||null!=t.previousSibling&&A(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&A(t.parentNode)||null!=t.nextSibling&&A(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}E.DEFAULTS={matchers:[],matchVisual:!0},e.default=E,e.matchAttributor=N,e.matchBlot=I,e.matchNewline=L,e.matchSpacing=D,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;nr.right&&(o=r.right-i.right,this.root.style.left=e+o+"px"),i.leftr.bottom){var a=i.bottom-i.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=D(n(28)),i=n(36),o=n(38),a=n(64),s=D(n(65)),u=D(n(66)),l=n(67),c=D(l),f=n(37),d=n(25),p=n(39),h=n(40),v=D(n(56)),m=D(n(68)),y=D(n(26)),g=D(n(69)),b=D(n(70)),w=D(n(71)),_=D(n(72)),O=D(n(73)),k=n(13),x=D(k),C=D(n(74)),E=D(n(75)),S=D(n(57)),j=D(n(41)),T=D(n(27)),A=D(n(59)),P=D(n(60)),N=D(n(61)),I=D(n(108)),L=D(n(62));function D(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":h.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":p.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s.default,"formats/code-block":x.default,"formats/header":u.default,"formats/list":c.default,"formats/bold":v.default,"formats/code":k.Code,"formats/italic":m.default,"formats/link":y.default,"formats/script":g.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":_.default,"formats/video":O.default,"formats/list/item":l.ListItem,"modules/formula":C.default,"modules/syntax":E.default,"modules/toolbar":S.default,"themes/bubble":I.default,"themes/snow":L.default,"ui/icons":j.default,"ui/picker":T.default,"ui/icon-picker":P.default,"ui/color-picker":A.default,"ui/tooltip":N.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,i=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof d)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}();p.blotName="list",p.scope=o.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[d],e.ListItem=d,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(56),o=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),e}();a.blotName="italic",a.tagName=["EM","I"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return l.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,u.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return l.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return u.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}();d.className="ql-syntax";var p=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),h=function(t){function e(t,n){l(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(o.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return f(e,a.default),r(e,null,[{key:"register",value:function(){o.default.register(p,!0),o.default.register(d,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(o.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(d).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(o.default.sources.SILENT),null!=e&&this.quill.setSelection(e,o.default.sources.SILENT)}}}]),e}();h.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=d,e.CodeToken=p,e.default=h},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(e.index,e.length);if(1===o.length)r.position(r.quill.getBounds(e));else{var s=o[o.length-1],u=r.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-u),f=r.quill.getBounds(new l.Range(u,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return h(e,s.BaseTooltip),i(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}();y.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=y,e.default=m},function(t,e,n){t.exports=n(63)}]).default},t.exports=n()}).call(this,n(236).Buffer)},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){var r=n(30),i=n(43);t.exports=function(t){return r(t)&&i(t.meta)}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(12);function i(){if(!r.b)throw new Error("Not expected to be rendered without UI");return r.b}},function(t,e,n){n(17),n(69),n(30),n(61);t.exports=function(t,e){function n(t,e){return t}return n.meta={kind:"irreducible",name:t,predicate:e,identity:!0},n.displayName=t,n.is=e,n}},function(t,e,n){"use strict";n.d(e,"a",function(){return p}),n.d(e,"c",function(){return h}),n.d(e,"b",function(){return v});var r=n(3),i=n(6),o=n(5),a=n(39),s=n(25),u=n(51),l=n(20),c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);is)return{value:t,errors:[a.of(t,e,n,i.context)]};for(var u={value:[],errors:[]},l=0;l1&&s.errors.push(a.of(t,e,n,r.context)),s},f.interface=function(t,e,n,i){if(!r.Object.is(t))return{value:t,errors:[a.of(t,e,n,i.context)]};var o={value:{},errors:[]},s=e.meta.props;for(var u in s){var l=c(t[u],s[u],n.concat(u),i);o.value[u]=l.value,o.errors=o.errors.concat(l.errors)}if(i.hasOwnProperty("strict")?i.strict:e.meta.strict)for(var f in t)s.hasOwnProperty(f)||r.Nil.is(t[f])||o.errors.push(a.of(t[f],r.Nil,n.concat(f),i.context));return o},r.mixin(r,{ValidationError:a,ValidationResult:u,validate:l}),t.exports=r},function(t,e,n){"use strict";n.d(e,"a",function(){return l}),n.d(e,"b",function(){return c});var r=n(81),i=n(24),o=n(19),a=n(0),s=n(10),u=n(3);function l(t,e){return c(Object(u.currentWorkspaceId)(),t,e)}function c(t,e,n){var l=u.BasicObj.getIncludingDeletedInWorkspace(t,e);if(null!==l){var c,f=l.widget(n);if(null!==f)return function(t){var e=Object(s.f)(Object(o.a)(),t),n=t.objClass();return Object(r.a)(n,"titleForContent",e)}(f)||(c=f.objClass(),Object(i.a)(c,"title")||Object(a.N)(c))}}},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(13),i=n(3),o=n(54),a=n(20),s=/\bobjid:[a-f0-9]{16}\b[^"']*/g;function u(t){return t.replace(s,function(t){return function(t){var e,n,s=t.slice(6,22),u=i.BasicObj.get(s);u?(e=r(Object(o.a)(u)),n=a.e(e)):(e=a.b({path:s}),n=!0);if(n){var l=r(t);e.query(l.query()).hash(l.hash())}return e}(t).toString()})}},function(t,e){t.exports=function(t){return t.displayName||t.name||""}},function(t,e,n){var r=n(17),i=n(26);t.exports=function(t,e){r(!(t instanceof e),function(){return"Cannot use the new operator to instantiate the type "+i(e)})}},function(t,e,n){"use strict";n.d(e,"a",function(){return d}),n.d(e,"b",function(){return p});var r=n(2),i=n(3),o=n(0),a=n(66),s=n(19),u=n(55),l=n(10),c=n(5),f=n(28);function d(t){if(e=t,!(null!=(n=i.BasicObj)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n))throw new o.a("Parameter obj needs to be a BasicObj.");var e,n;if(function(t){var e=Object(c.loadableWithDefault)(null,u.a);if(!e)return!1;return e.id()===t.id()}(t))return"/";var r=t.permalink();if(r){if(!Object(f.f)())return h(t,r);if(Object(f.a)("routing-related API (e.g. Scrivito.navigateTo)"),function(t){var e=Object(f.c)(t),n=Object(f.b)();return!e||e===n}(t))return h(t,r)}var a=function(t){var e=Object(s.a)(),n=Object(l.f)(e,t);if(function(t){var e=t;return e.slug&&"function"==typeof e.slug}(n)){var r=n.slug();if("string"==typeof r)return r}}(t);return a?"/"+a+"-"+t.id():"/"+t.id()}function p(t){var e=t.replace(new RegExp("^/+|/+$","g"),"");if(""===e)return Object(u.a)();var n=function(t){if(t.length<16)return null;if(t.length>16&&"-"!==t.slice(-17,-16))return null;var e=t.slice(-16);if(e.match(/[^0-9a-f]/))return null;return e}(e);return n?i.BasicObj.get(n):function(t){var e=a.a(t);if(e)return i.BasicObj.get(e);if(Object(f.f)())return function(t){Object(f.a)("routing-related API (e.g. Scrivito.currentPage, Scrivito.urlFor)");var e=Object(f.b)(),n=i.BasicObj.getAllByPermalink(t);return Object(r.find)(n,function(t){var n=Object(f.c)(t);return!n||n===e})||null}(t);return i.BasicObj.getByPermalink(t)}(e)}function h(t,e){return a.b(t.id(),e),"/"+e}},function(t,e,n){var r,i,o; /*! * jQuery JavaScript Library v1.11.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-05-01T17:42Z */ /*! * jQuery JavaScript Library v1.11.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-05-01T17:42Z */ i="undefined"!=typeof window?window:this,o=function(n,i){var o=[],a=o.slice,s=o.concat,u=o.push,l=o.indexOf,c={},f=c.toString,d=c.hasOwnProperty,p={},h=function(t,e){return new h.fn.init(t,e)},v=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,m=/^-ms-/,y=/-([\da-z])/gi,g=function(t,e){return e.toUpperCase()};function b(t){var e=t.length,n=h.type(t);return"function"!==n&&!h.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t))}h.fn=h.prototype={jquery:"1.11.1",constructor:h,selector:"",length:0,toArray:function(){return a.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:a.call(this)},pushStack:function(t){var e=h.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return h.each(this,t,e)},map:function(t){return this.pushStack(h.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==h.type(t)||t.nodeType||h.isWindow(t))return!1;try{if(t.constructor&&!d.call(t,"constructor")&&!d.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(p.ownLast)for(e in t)return d.call(t,e);for(e in t);return void 0===e||d.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[f.call(t)]||"object":typeof t},globalEval:function(t){t&&h.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(t){return t.replace(m,"ms-").replace(y,g)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var r=0,i=t.length,o=b(t);if(n){if(o)for(;r+~]|"+B+")"+B+"*"),K=new RegExp("="+B+"*([^\\]'\"]*?)"+B+"*\\]","g"),Q=new RegExp(U),$=new RegExp("^"+F+"$"),G={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q.replace("w","w*")+")"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+B+"?|("+B+")|.)","ig"),rt=function(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{L.apply(P=D.call(_.childNodes),_.childNodes),P[_.childNodes.length].nodeType}catch(t){L={apply:P.length?function(t,e){I.apply(t,D.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function it(t,e,r,i){var o,s,l,c,f,h,y,g,O,k;if((e?e.ownerDocument||e:_)!==p&&d(e),r=r||[],!t||"string"!=typeof t)return r;if(1!==(c=(e=e||p).nodeType)&&9!==c)return[];if(v&&!i){if(o=J.exec(t))if(l=o[1]){if(9===c){if(!(s=e.getElementById(l))||!s.parentNode)return r;if(s.id===l)return r.push(s),r}else if(e.ownerDocument&&(s=e.ownerDocument.getElementById(l))&&b(e,s)&&s.id===l)return r.push(s),r}else{if(o[2])return L.apply(r,e.getElementsByTagName(t)),r;if((l=o[3])&&n.getElementsByClassName&&e.getElementsByClassName)return L.apply(r,e.getElementsByClassName(l)),r}if(n.qsa&&(!m||!m.test(t))){if(g=y=w,O=e,k=9===c&&t,1===c&&"object"!==e.nodeName.toLowerCase()){for(h=a(t),(y=e.getAttribute("id"))?g=y.replace(et,"\\$&"):e.setAttribute("id",g),g="[id='"+g+"'] ",f=h.length;f--;)h[f]=g+vt(h[f]);O=tt.test(t)&&pt(e.parentNode)||e,k=h.join(",")}if(k)try{return L.apply(r,O.querySelectorAll(k)),r}catch(t){}finally{y||e.removeAttribute("id")}}}return u(t.replace(H,"$1"),e,r,i)}function ot(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function at(t){return t[w]=!0,t}function st(t){var e=p.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var n=t.split("|"),i=t.length;i--;)r.attrHandle[n[i]]=e}function lt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||T)-(~t.sourceIndex||T);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ct(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function dt(t){return at(function(e){return e=+e,at(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function pt(t){return t&&typeof t.getElementsByTagName!==j&&t}for(e in n=it.support={},o=it.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=it.setDocument=function(t){var e,i=t?t.ownerDocument||t:_,a=i.defaultView;return i!==p&&9===i.nodeType&&i.documentElement?(p=i,h=i.documentElement,v=!o(i),a&&a!==a.top&&(a.addEventListener?a.addEventListener("unload",function(){d()},!1):a.attachEvent&&a.attachEvent("onunload",function(){d()})),n.attributes=st(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=st(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(i.getElementsByClassName)&&st(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),n.getById=st(function(t){return h.appendChild(t).id=w,!i.getElementsByName||!i.getElementsByName(w).length}),n.getById?(r.find.ID=function(t,e){if(typeof e.getElementById!==j&&v){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(t){var e=t.replace(nt,rt);return function(t){return t.getAttribute("id")===e}}):(delete r.find.ID,r.filter.ID=function(t){var e=t.replace(nt,rt);return function(t){var n=typeof t.getAttributeNode!==j&&t.getAttributeNode("id");return n&&n.value===e}}),r.find.TAG=n.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==j)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(typeof e.getElementsByClassName!==j&&v)return e.getElementsByClassName(t)},y=[],m=[],(n.qsa=X.test(i.querySelectorAll))&&(st(function(t){t.innerHTML="",t.querySelectorAll("[msallowclip^='']").length&&m.push("[*^$]="+B+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+B+"*(?:value|"+M+")"),t.querySelectorAll(":checked").length||m.push(":checked")}),st(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+B+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=X.test(g=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&st(function(t){n.disconnectedMatch=g.call(t,"div"),g.call(t,"[s!='']:x"),y.push("!=",U)}),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),e=X.test(h.compareDocumentPosition),b=e||X.test(h.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t===i||t.ownerDocument===_&&b(_,t)?-1:e===i||e.ownerDocument===_&&b(_,e)?1:c?R.call(c,t)-R.call(c,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,o=t.parentNode,a=e.parentNode,s=[t],u=[e];if(!o||!a)return t===i?-1:e===i?1:o?-1:a?1:c?R.call(c,t)-R.call(c,e):0;if(o===a)return lt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?lt(s[r],u[r]):s[r]===_?-1:u[r]===_?1:0},i):p},it.matches=function(t,e){return it(t,null,null,e)},it.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),e=e.replace(K,"='$1']"),n.matchesSelector&&v&&(!y||!y.test(e))&&(!m||!m.test(e)))try{var r=g.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return it(e,p,null,[t]).length>0},it.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),b(t,e)},it.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var i=r.attrHandle[e.toLowerCase()],o=i&&A.call(r.attrHandle,e.toLowerCase())?i(t,e,!v):void 0;return void 0!==o?o:n.attributes||!v?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},it.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},it.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(S),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=it.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=it.selectors={cacheLength:50,createPseudo:at,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,rt),t[3]=(t[3]||t[4]||t[5]||"").replace(nt,rt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||it.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&it.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Q.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(nt,rt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+B+")"+t+"("+B+"|$)"))&&x(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==j&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=it.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,f,d,p,h,v=o!==a?"nextSibling":"previousSibling",m=e.parentNode,y=s&&e.nodeName.toLowerCase(),g=!u&&!s;if(m){if(o){for(;v;){for(f=e;f=f[v];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&g){for(p=(l=(c=m[w]||(m[w]={}))[t]||[])[0]===O&&l[1],d=l[0]===O&&l[2],f=p&&m.childNodes[p];f=++p&&f&&f[v]||(d=p=0)||h.pop();)if(1===f.nodeType&&++d&&f===e){c[t]=[O,p,d];break}}else if(g&&(l=(e[w]||(e[w]={}))[t])&&l[0]===O)d=l[1];else for(;(f=++p&&f&&f[v]||(d=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++d||(g&&((f[w]||(f[w]={}))[t]=[O,d]),f!==e)););return(d-=i)===r||d%r==0&&d/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||it.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=R.call(t,o[a])]=!(n[r]=o[a])}):function(t){return i(t,0,n)}):i}},pseudos:{not:at(function(t){var e=[],n=[],r=s(t.replace(H,"$1"));return r[w]?at(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),!n.pop()}}),has:at(function(t){return function(e){return it(t,e).length>0}}),contains:at(function(t){return function(e){return(e.textContent||e.innerText||i(e)).indexOf(t)>-1}}),lang:at(function(t){return $.test(t||"")||it.error("unsupported lang: "+t),t=t.replace(nt,rt).toLowerCase(),function(e){var n;do{if(n=v?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return Z.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:dt(function(){return[0]}),last:dt(function(t,e){return[e-1]}),eq:dt(function(t,e,n){return[n<0?n+e:n]}),even:dt(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:dt(function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function gt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,l=null!=e;s-1&&(o[l]=!(a[l]=f))}}else y=gt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):L.apply(a,y)})}function wt(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,c=mt(function(t){return t===e},s,!0),f=mt(function(t){return R.call(e,t)>-1},s,!0),d=[function(t,n,r){return!a&&(r||n!==l)||((e=n).nodeType?c(t,n,r):f(t,n,r))}];u1&&yt(d),u>1&&vt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(H,"$1"),n,u0,i=t.length>0,o=function(o,a,s,u,c){var f,d,h,v=0,m="0",y=o&&[],g=[],b=l,w=o||i&&r.find.TAG("*",c),_=O+=null==b?1:Math.random()||.1,k=w.length;for(c&&(l=a!==p&&a);m!==k&&null!=(f=w[m]);m++){if(i&&f){for(d=0;h=t[d++];)if(h(f,a,s)){u.push(f);break}c&&(O=_)}n&&((f=!h&&f)&&v--,o&&y.push(f))}if(v+=m,n&&m!==v){for(d=0;h=e[d++];)h(y,g,a,s);if(o){if(v>0)for(;m--;)y[m]||g[m]||(g[m]=N.call(u));g=gt(g)}L.apply(u,g),c&&!o&&g.length>0&&v+e.length>1&&it.uniqueSort(u)}return c&&(O=_,l=b),y};return n?at(o):o}(o,i))).selector=t}return s},u=it.select=function(t,e,i,o){var u,l,c,f,d,p="function"==typeof t&&t,h=!o&&a(t=p.selector||t);if(i=i||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&n.getById&&9===e.nodeType&&v&&r.relative[l[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(nt,rt),e)||[])[0]))return i;p&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(u=G.needsContext.test(t)?0:l.length;u--&&(c=l[u],!r.relative[f=c.type]);)if((d=r.find[f])&&(o=d(c.matches[0].replace(nt,rt),tt.test(l[0].type)&&pt(e.parentNode)||e))){if(l.splice(u,1),!(t=o.length&&vt(l)))return L.apply(i,o),i;break}}return(p||s(t,h))(o,e,!v,i,tt.test(t)&&pt(e.parentNode)||e),i},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!f,d(),n.sortDetached=st(function(t){return 1&t.compareDocumentPosition(p.createElement("div"))}),st(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ut("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&&st(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ut("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),st(function(t){return null==t.getAttribute("disabled")})||ut(M,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),it}(n);h.find=w,h.expr=w.selectors,h.expr[":"]=h.expr.pseudos,h.unique=w.uniqueSort,h.text=w.getText,h.isXMLDoc=w.isXML,h.contains=w.contains;var _=h.expr.match.needsContext,O=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^.[^:#\[\.,]*$/;function x(t,e,n){if(h.isFunction(e))return h.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return h.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(k.test(e))return h.filter(e,t,n);e=h.filter(e,t)}return h.grep(t,function(t){return h.inArray(t,e)>=0!==n})}h.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?h.find.matchesSelector(r,t)?[r]:[]:h.find.matches(t,h.grep(e,function(t){return 1===t.nodeType}))},h.fn.extend({find:function(t){var e,n=[],r=this,i=r.length;if("string"!=typeof t)return this.pushStack(h(t).filter(function(){for(e=0;e1?h.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(x(this,t||[],!1))},not:function(t){return this.pushStack(x(this,t||[],!0))},is:function(t){return!!x(this,"string"==typeof t&&_.test(t)?h(t):t||[],!1).length}});var C,E=n.document,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(h.fn.init=function(t,e){var n,r;if(!t)return this;if("string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:S.exec(t))||!n[1]&&e)return!e||e.jquery?(e||C).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof h?e[0]:e,h.merge(this,h.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:E,!0)),O.test(n[1])&&h.isPlainObject(e))for(n in e)h.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((r=E.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return C.find(t);this.length=1,this[0]=r}return this.context=E,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):h.isFunction(t)?void 0!==C.ready?C.ready(t):t(h):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),h.makeArray(t,this))}).prototype=h.fn,C=h(E);var j=/^(?:parents|prev(?:Until|All))/,T={children:!0,contents:!0,next:!0,prev:!0};function A(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}h.extend({dir:function(t,e,n){for(var r=[],i=t[e];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!h(i).is(n));)1===i.nodeType&&r.push(i),i=i[e];return r},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),h.fn.extend({has:function(t){var e,n=h(t,this),r=n.length;return this.filter(function(){for(e=0;e-1:1===n.nodeType&&h.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?h.unique(o):o)},index:function(t){return t?"string"==typeof t?h.inArray(this[0],h(t)):h.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(h.unique(h.merge(this.get(),h(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),h.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return h.dir(t,"parentNode")},parentsUntil:function(t,e,n){return h.dir(t,"parentNode",n)},next:function(t){return A(t,"nextSibling")},prev:function(t){return A(t,"previousSibling")},nextAll:function(t){return h.dir(t,"nextSibling")},prevAll:function(t){return h.dir(t,"previousSibling")},nextUntil:function(t,e,n){return h.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return h.dir(t,"previousSibling",n)},siblings:function(t){return h.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return h.sibling(t.firstChild)},contents:function(t){return h.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:h.merge([],t.childNodes)}},function(t,e){h.fn[t]=function(n,r){var i=h.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=h.filter(r,i)),this.length>1&&(T[t]||(i=h.unique(i)),j.test(t)&&(i=i.reverse())),this.pushStack(i)}});var P,N=/\S+/g,I={};function L(){E.addEventListener?(E.removeEventListener("DOMContentLoaded",D,!1),n.removeEventListener("load",D,!1)):(E.detachEvent("onreadystatechange",D),n.detachEvent("onload",D))}function D(){(E.addEventListener||"load"===event.type||"complete"===E.readyState)&&(L(),h.ready())}h.Callbacks=function(t){t="string"==typeof t?I[t]||function(t){var e=I[t]={};return h.each(t.match(N)||[],function(t,n){e[n]=!0}),e}(t):h.extend({},t);var e,n,r,i,o,a,s=[],u=!t.once&&[],l=function(f){for(n=t.memory&&f,r=!0,o=a||0,a=0,i=s.length,e=!0;s&&o-1;)s.splice(r,1),e&&(r<=i&&i--,r<=o&&o--)}),this},has:function(t){return t?h.inArray(t,s)>-1:!(!s||!s.length)},empty:function(){return s=[],i=0,this},disable:function(){return s=u=n=void 0,this},disabled:function(){return!s},lock:function(){return u=void 0,n||c.disable(),this},locked:function(){return!u},fireWith:function(t,n){return!s||r&&!u||(n=[t,(n=n||[]).slice?n.slice():n],e?u.push(n):l(n)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},h.extend({Deferred:function(t){var e=[["resolve","done",h.Callbacks("once memory"),"resolved"],["reject","fail",h.Callbacks("once memory"),"rejected"],["notify","progress",h.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return h.Deferred(function(n){h.each(e,function(e,o){var a=h.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&h.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?h.extend(t,r):r}},i={};return r.pipe=r.then,h.each(e,function(t,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=a.call(arguments),s=o.length,u=1!==s||t&&h.isFunction(t.promise)?s:0,l=1===u?t:h.Deferred(),c=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?a.call(arguments):i,r===e?l.notifyWith(n,r):--u||l.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);i0||(P.resolveWith(E,[h]),h.fn.triggerHandler&&(h(E).triggerHandler("ready"),h(E).off("ready")))}}}),h.ready.promise=function(t){if(!P)if(P=h.Deferred(),"complete"===E.readyState)setTimeout(h.ready);else if(E.addEventListener)E.addEventListener("DOMContentLoaded",D,!1),n.addEventListener("load",D,!1);else{E.attachEvent("onreadystatechange",D),n.attachEvent("onload",D);var e=!1;try{e=null==n.frameElement&&E.documentElement}catch(t){}e&&e.doScroll&&function t(){if(!h.isReady){try{e.doScroll("left")}catch(e){return setTimeout(t,50)}L(),h.ready()}}()}return P.promise(t)};var R,M="undefined";for(R in h(p))break;p.ownLast="0"!==R,p.inlineBlockNeedsLayout=!1,h(function(){var t,e,n,r;(n=E.getElementsByTagName("body")[0])&&n.style&&(e=E.createElement("div"),(r=E.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(e),typeof e.style.zoom!==M&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",p.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(r))}),function(){var t=E.createElement("div");if(null==p.deleteExpando){p.deleteExpando=!0;try{delete t.test}catch(t){p.deleteExpando=!1}}t=null}(),h.acceptData=function(t){var e=h.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)};var B=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,q=/([A-Z])/g;function F(t,e,n){if(void 0===n&&1===t.nodeType){var r="data-"+e.replace(q,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:B.test(n)?h.parseJSON(n):n)}catch(t){}h.data(t,e,n)}else n=void 0}return n}function z(t){var e;for(e in t)if(("data"!==e||!h.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function U(t,e,n,r){if(h.acceptData(t)){var i,a,s=h.expando,u=t.nodeType,l=u?h.cache:t,c=u?t[s]:t[s]&&s;if(c&&l[c]&&(r||l[c].data)||void 0!==n||"string"!=typeof e)return c||(c=u?t[s]=o.pop()||h.guid++:s),l[c]||(l[c]=u?{}:{toJSON:h.noop}),"object"!=typeof e&&"function"!=typeof e||(r?l[c]=h.extend(l[c],e):l[c].data=h.extend(l[c].data,e)),a=l[c],r||(a.data||(a.data={}),a=a.data),void 0!==n&&(a[h.camelCase(e)]=n),"string"==typeof e?null==(i=a[e])&&(i=a[h.camelCase(e)]):i=a,i}}function H(t,e,n){if(h.acceptData(t)){var r,i,o=t.nodeType,a=o?h.cache:t,s=o?t[h.expando]:h.expando;if(a[s]){if(e&&(r=n?a[s]:a[s].data)){i=(e=h.isArray(e)?e.concat(h.map(e,h.camelCase)):e in r?[e]:(e=h.camelCase(e))in r?[e]:e.split(" ")).length;for(;i--;)delete r[e[i]];if(n?!z(r):!h.isEmptyObject(r))return}(n||(delete a[s].data,z(a[s])))&&(o?h.cleanData([t],!0):p.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}h.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?h.cache[t[h.expando]]:t[h.expando])&&!z(t)},data:function(t,e,n){return U(t,e,n)},removeData:function(t,e){return H(t,e)},_data:function(t,e,n){return U(t,e,n,!0)},_removeData:function(t,e){return H(t,e,!0)}}),h.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=h.data(o),1===o.nodeType&&!h._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&F(o,r=h.camelCase(r.slice(5)),i[r]);h._data(o,"parsedAttrs",!0)}return i}return"object"==typeof t?this.each(function(){h.data(this,t)}):arguments.length>1?this.each(function(){h.data(this,t,e)}):o?F(o,t,h.data(o,t)):void 0},removeData:function(t){return this.each(function(){h.removeData(this,t)})}}),h.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=h._data(t,e),n&&(!r||h.isArray(n)?r=h._data(t,e,h.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=h.queue(t,e),r=n.length,i=n.shift(),o=h._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){h.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return h._data(t,n)||h._data(t,n,{empty:h.Callbacks("once memory").add(function(){h._removeData(t,e+"queue"),h._removeData(t,n)})})}}),h.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",p.leadingWhitespace=3===e.firstChild.nodeType,p.tbody=!e.getElementsByTagName("tbody").length,p.htmlSerialize=!!e.getElementsByTagName("link").length,p.html5Clone="<:nav>"!==E.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),p.appendChecked=t.checked,e.innerHTML="",p.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="",p.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,p.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){p.noCloneEvent=!1}),e.cloneNode(!0).click()),null==p.deleteExpando){p.deleteExpando=!0;try{delete e.test}catch(t){p.deleteExpando=!1}}}(),function(){var t,e,r=E.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})e="on"+t,(p[t+"Bubbles"]=e in n)||(r.setAttribute(e,"t"),p[t+"Bubbles"]=!1===r.attributes[e].expando);r=null}();var G=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,J=/^([^.]*)(?:\.(.+)|)$/;function tt(){return!0}function et(){return!1}function nt(){try{return E.activeElement}catch(t){}}function rt(t){var e=it.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}h.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,v,m,y=h._data(t);if(y){for(n.handler&&(n=(u=n).handler,i=u.selector),n.guid||(n.guid=h.guid++),(a=y.events)||(a=y.events={}),(c=y.handle)||((c=y.handle=function(t){return typeof h===M||t&&h.event.triggered===t.type?void 0:h.event.dispatch.apply(c.elem,arguments)}).elem=t),s=(e=(e||"").match(N)||[""]).length;s--;)p=m=(o=J.exec(e[s])||[])[1],v=(o[2]||"").split(".").sort(),p&&(l=h.event.special[p]||{},p=(i?l.delegateType:l.bindType)||p,l=h.event.special[p]||{},f=h.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&h.expr.match.needsContext.test(i),namespace:v.join(".")},u),(d=a[p])||((d=a[p]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(t,r,v,c)||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),l.add&&(l.add.call(t,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),h.event.global[p]=!0);t=null}},remove:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,v,m,y=h.hasData(t)&&h._data(t);if(y&&(c=y.events)){for(l=(e=(e||"").match(N)||[""]).length;l--;)if(p=m=(s=J.exec(e[l])||[])[1],v=(s[2]||"").split(".").sort(),p){for(f=h.event.special[p]||{},d=c[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)a=d[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,f.remove&&f.remove.call(t,a));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,v,y.handle)||h.removeEvent(t,p,y.handle),delete c[p])}else for(p in c)h.event.remove(t,p+e[l],n,r,!0);h.isEmptyObject(c)&&(delete y.handle,h._removeData(t,"events"))}},trigger:function(t,e,r,i){var o,a,s,u,l,c,f,p=[r||E],v=d.call(t,"type")?t.type:t,m=d.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||E,3!==r.nodeType&&8!==r.nodeType&&!X.test(v+h.event.triggered)&&(v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),a=v.indexOf(":")<0&&"on"+v,(t=t[h.expando]?t:new h.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:h.makeArray(e,[t]),l=h.event.special[v]||{},i||!l.trigger||!1!==l.trigger.apply(r,e))){if(!i&&!l.noBubble&&!h.isWindow(r)){for(u=l.delegateType||v,X.test(u+v)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(r.ownerDocument||E)&&p.push(c.defaultView||c.parentWindow||n)}for(f=0;(s=p[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||v,(o=(h._data(s,"events")||{})[t.type]&&h._data(s,"handle"))&&o.apply(s,e),(o=a&&s[a])&&o.apply&&h.acceptData(s)&&(t.result=o.apply(s,e),!1===t.result&&t.preventDefault());if(t.type=v,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(p.pop(),e))&&h.acceptData(r)&&a&&r[v]&&!h.isWindow(r)){(c=r[a])&&(r[a]=null),h.event.triggered=v;try{r[v]()}catch(t){}h.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(t){t=h.event.fix(t);var e,n,r,i,o,s,u=a.call(arguments),l=(h._data(this,"events")||{})[t.type]||[],c=h.event.special[t.type]||{};if(u[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(s=h.event.handlers.call(this,t,l),e=0;(i=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(n=((h.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,u))&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,r,i,o,a=[],s=e.delegateCount,u=t.target;if(s&&u.nodeType&&(!t.button||"click"!==t.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==t.type)){for(i=[],o=0;o=0:h.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s]","i"),st=/^\s+/,ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,lt=/<([\w:]+)/,ct=/\s*$/g,yt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:p.htmlSerialize?[0,"",""]:[1,"X
","
"]},gt=rt(E).appendChild(E.createElement("div"));function bt(t,e){var n,r,i=0,o=typeof t.getElementsByTagName!==M?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==M?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(r=n[i]);i++)!e||h.nodeName(r,e)?o.push(r):h.merge(o,bt(r,e));return void 0===e||e&&h.nodeName(t,e)?h.merge([t],o):o}function wt(t){$.test(t.type)&&(t.defaultChecked=t.checked)}function _t(t,e){return h.nodeName(t,"table")&&h.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function Ot(t){return t.type=(null!==h.find.attr(t,"type"))+"/"+t.type,t}function kt(t){var e=vt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function xt(t,e){for(var n,r=0;null!=(n=t[r]);r++)h._data(n,"globalEval",!e||h._data(e[r],"globalEval"))}function Ct(t,e){if(1===e.nodeType&&h.hasData(t)){var n,r,i,o=h._data(t),a=h._data(e,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r")?o=t.cloneNode(!0):(gt.innerHTML=t.outerHTML,gt.removeChild(o=gt.firstChild)),!(p.noCloneEvent&&p.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||h.isXMLDoc(t)))for(r=bt(o),s=bt(t),a=0;null!=(i=s[a]);++a)r[a]&&Et(i,r[a]);if(e)if(n)for(s=s||bt(t),r=r||bt(o),a=0;null!=(i=s[a]);a++)Ct(i,r[a]);else Ct(t,o);return(r=bt(o,"script")).length>0&&xt(r,!u&&bt(t,"script")),r=s=i=null,o},buildFragment:function(t,e,n,r){for(var i,o,a,s,u,l,c,f=t.length,d=rt(e),v=[],m=0;m")+c[2],i=c[0];i--;)s=s.lastChild;if(!p.leadingWhitespace&&st.test(o)&&v.push(e.createTextNode(st.exec(o)[0])),!p.tbody)for(i=(o="table"!==u||ct.test(o)?""!==c[1]||ct.test(o)?0:s:s.firstChild)&&o.childNodes.length;i--;)h.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(h.merge(v,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else v.push(e.createTextNode(o));for(s&&d.removeChild(s),p.appendChecked||h.grep(bt(v,"input"),wt),m=0;o=v[m++];)if((!r||-1===h.inArray(o,r))&&(a=h.contains(o.ownerDocument,o),s=bt(d.appendChild(o),"script"),a&&xt(s),n))for(i=0;o=s[i++];)ht.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(t,e){for(var n,r,i,a,s=0,u=h.expando,l=h.cache,c=p.deleteExpando,f=h.event.special;null!=(n=t[s]);s++)if((e||h.acceptData(n))&&(a=(i=n[u])&&l[i])){if(a.events)for(r in a.events)f[r]?h.event.remove(n,r):h.removeEvent(n,r,a.handle);l[i]&&(delete l[i],c?delete n[u]:typeof n.removeAttribute!==M?n.removeAttribute(u):n[u]=null,o.push(i))}}}),h.fn.extend({text:function(t){return Q(this,function(t){return void 0===t?h.text(this):this.empty().append((this[0]&&this[0].ownerDocument||E).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||_t(this,t).appendChild(t)})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=_t(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?h.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||h.cleanData(bt(n)),n.parentNode&&(e&&h.contains(n.ownerDocument,n)&&xt(bt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&h.cleanData(bt(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&h.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return h.clone(this,t,e)})},html:function(t){return Q(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(ot,""):void 0;if("string"==typeof t&&!dt.test(t)&&(p.htmlSerialize||!at.test(t))&&(p.leadingWhitespace||!st.test(t))&&!yt[(lt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(ut,"<$1>");try{for(;n1&&"string"==typeof v&&!p.checkClone&&pt.test(v))return this.each(function(n){var r=f.eq(n);m&&(t[0]=v.call(this,n,r.html())),r.domManip(t,e)});if(c&&(n=(u=h.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===u.childNodes.length&&(u=n),n)){for(i=(o=h.map(bt(u,"script"),Ot)).length;l")).appendTo(e.documentElement))[0].contentWindow||St[0].contentDocument).document).write(),e.close(),n=At(t,e),St.detach()),Tt[t]=n),n}p.shrinkWrapBlocks=function(){return null!=jt?jt:(jt=!1,(e=E.getElementsByTagName("body")[0])&&e.style?(t=E.createElement("div"),(n=E.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(n).appendChild(t),typeof t.style.zoom!==M&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(E.createElement("div")).style.width="5px",jt=3!==t.offsetWidth),e.removeChild(n),jt):void 0);var t,e,n};var Nt,It,Lt=/^margin/,Dt=new RegExp("^("+W+")(?!px)[a-z%]+$","i"),Rt=/^(top|right|bottom|left)$/;function Mt(t,e){return{get:function(){var n=t();if(null!=n){if(!n)return(this.get=e).apply(this,arguments);delete this.get}}}}n.getComputedStyle?(Nt=function(t){return t.ownerDocument.defaultView.getComputedStyle(t,null)},It=function(t,e,n){var r,i,o,a,s=t.style;return a=(n=n||Nt(t))?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==a||h.contains(t.ownerDocument,t)||(a=h.style(t,e)),Dt.test(a)&&Lt.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):E.documentElement.currentStyle&&(Nt=function(t){return t.currentStyle},It=function(t,e,n){var r,i,o,a,s=t.style;return null==(a=(n=n||Nt(t))?n[e]:void 0)&&s&&s[e]&&(a=s[e]),Dt.test(a)&&!Rt.test(e)&&(r=s.left,(o=(i=t.runtimeStyle)&&i.left)&&(i.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"}),function(){var t,e,r,i,o,a,s;function u(){var t,e,r,u;(e=E.getElementsByTagName("body")[0])&&e.style&&(t=E.createElement("div"),(r=E.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(r).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",i=o=!1,s=!0,n.getComputedStyle&&(i="1%"!==(n.getComputedStyle(t,null)||{}).top,o="4px"===(n.getComputedStyle(t,null)||{width:"4px"}).width,(u=t.appendChild(E.createElement("div"))).style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",u.style.marginRight=u.style.width="0",t.style.width="1px",s=!parseFloat((n.getComputedStyle(u,null)||{}).marginRight)),t.innerHTML="
t
",(u=t.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(a=0===u[0].offsetHeight)&&(u[0].style.display="",u[1].style.display="none",a=0===u[0].offsetHeight),e.removeChild(r))}(t=E.createElement("div")).innerHTML="
a",(e=(r=t.getElementsByTagName("a")[0])&&r.style)&&(e.cssText="float:left;opacity:.5",p.opacity="0.5"===e.opacity,p.cssFloat=!!e.cssFloat,t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===t.style.backgroundClip,p.boxSizing=""===e.boxSizing||""===e.MozBoxSizing||""===e.WebkitBoxSizing,h.extend(p,{reliableHiddenOffsets:function(){return null==a&&u(),a},boxSizingReliable:function(){return null==o&&u(),o},pixelPosition:function(){return null==i&&u(),i},reliableMarginRight:function(){return null==s&&u(),s}}))}(),h.swap=function(t,e,n,r){var i,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];for(o in i=n.apply(t,r||[]),e)t.style[o]=a[o];return i};var Bt=/alpha\([^)]*\)/i,qt=/opacity\s*=\s*([^)]*)/,Ft=/^(none|table(?!-c[ea]).+)/,zt=new RegExp("^("+W+")(.*)$","i"),Ut=new RegExp("^([+-])=("+W+")","i"),Ht={position:"absolute",visibility:"hidden",display:"block"},Wt={letterSpacing:"0",fontWeight:"400"},Vt=["Webkit","O","Moz","ms"];function Kt(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Vt.length;i--;)if((e=Vt[i]+n)in t)return e;return r}function Qt(t,e){for(var n,r,i,o=[],a=0,s=t.length;a=1||""===e)&&""===h.trim(o.replace(Bt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||r&&!r.filter)||(n.filter=Bt.test(o)?o.replace(Bt,i):o+" "+i)}}),h.cssHooks.marginRight=Mt(p.reliableMarginRight,function(t,e){if(e)return h.swap(t,{display:"inline-block"},It,[t,"marginRight"])}),h.each({margin:"",padding:"",border:"Width"},function(t,e){h.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+V[r]+e]=o[r]||o[r-2]||o[0];return i}},Lt.test(t)||(h.cssHooks[t+e].set=$t)}),h.fn.extend({css:function(t,e){return Q(this,function(t,e,n){var r,i,o={},a=0;if(h.isArray(e)){for(r=Nt(t),i=e.length;a1)},show:function(){return Qt(this,!0)},hide:function(){return Qt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){K(this)?h(this).show():h(this).hide()})}}),h.Tween=Zt,Zt.prototype={constructor:Zt,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(h.cssNumber[n]?"":"px")},cur:function(){var t=Zt.propHooks[this.prop];return t&&t.get?t.get(this):Zt.propHooks._default.get(this)},run:function(t){var e,n=Zt.propHooks[this.prop];return this.options.duration?this.pos=e=h.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Zt.propHooks._default.set(this),this}},Zt.prototype.init.prototype=Zt.prototype,Zt.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=h.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){h.fx.step[t.prop]?h.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[h.cssProps[t.prop]]||h.cssHooks[t.prop])?h.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},Zt.propHooks.scrollTop=Zt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},h.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},h.fx=Zt.prototype.init,h.fx.step={};var Xt,Jt,te,ee,ne,re,ie,oe=/^(?:toggle|show|hide)$/,ae=new RegExp("^(?:([+-])=|)("+W+")([a-z%]*)$","i"),se=/queueHooks$/,ue=[function(t,e,n){var r,i,o,a,s,u,l,c=this,f={},d=t.style,v=t.nodeType&&K(t),m=h._data(t,"fxshow");n.queue||(null==(s=h._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,c.always(function(){c.always(function(){s.unqueued--,h.queue(t,"fx").length||s.empty.fire()})}));1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],l=h.css(t,"display"),"inline"===("none"===l?h._data(t,"olddisplay")||Pt(t.nodeName):l)&&"none"===h.css(t,"float")&&(p.inlineBlockNeedsLayout&&"inline"!==Pt(t.nodeName)?d.zoom=1:d.display="inline-block"));n.overflow&&(d.overflow="hidden",p.shrinkWrapBlocks()||c.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in e)if(i=e[r],oe.exec(i)){if(delete e[r],o=o||"toggle"===i,i===(v?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;v=!0}f[r]=m&&m[r]||h.style(t,r)}else l=void 0;if(h.isEmptyObject(f))"inline"===("none"===l?Pt(t.nodeName):l)&&(d.display=l);else for(r in m?"hidden"in m&&(v=m.hidden):m=h._data(t,"fxshow",{}),o&&(m.hidden=!v),v?h(t).show():c.done(function(){h(t).hide()}),c.done(function(){var e;for(e in h._removeData(t,"fxshow"),f)h.style(t,e,f[e])}),f)a=de(v?m[r]:0,r,c),r in m||(m[r]=a.start,v&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}],le={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=ae.exec(e),o=i&&i[3]||(h.cssNumber[t]?"":"px"),a=(h.cssNumber[t]||"px"!==o&&+r)&&ae.exec(h.css(n.elem,t)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{a/=s=s||".5",h.style(n.elem,t,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function ce(){return setTimeout(function(){Xt=void 0}),Xt=h.now()}function fe(t,e){var n,r={height:t},i=0;for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=V[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function de(t,e,n){for(var r,i=(le[e]||[]).concat(le["*"]),o=0,a=i.length;o
a",re=ee.getElementsByTagName("a")[0],ie=(ne=E.createElement("select")).appendChild(E.createElement("option")),te=ee.getElementsByTagName("input")[0],re.style.cssText="top:1px",p.getSetAttribute="t"!==ee.className,p.style=/top/.test(re.getAttribute("style")),p.hrefNormalized="/a"===re.getAttribute("href"),p.checkOn=!!te.value,p.optSelected=ie.selected,p.enctype=!!E.createElement("form").enctype,ne.disabled=!0,p.optDisabled=!ie.disabled,(te=E.createElement("input")).setAttribute("value",""),p.input=""===te.getAttribute("value"),te.value="t",te.setAttribute("type","radio"),p.radioValue="t"===te.value;var he=/\r/g;h.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=h.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,h(this).val()):t)?i="":"number"==typeof i?i+="":h.isArray(i)&&(i=h.map(i,function(t){return null==t?"":t+""})),(e=h.valHooks[this.type]||h.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=h.valHooks[i.type]||h.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(he,""):null==n?"":n:void 0}}),h.extend({valHooks:{option:{get:function(t){var e=h.find.attr(t,"value");return null!=e?e:h.trim(h.text(t))}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u=0)try{r.selected=n=!0}catch(t){r.scrollHeight}else r.selected=!1;return n||(t.selectedIndex=-1),i}}}}),h.each(["radio","checkbox"],function(){h.valHooks[this]={set:function(t,e){if(h.isArray(e))return t.checked=h.inArray(h(t).val(),e)>=0}},p.checkOn||(h.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ve,me,ye=h.expr.attrHandle,ge=/^(?:checked|selected)$/i,be=p.getSetAttribute,we=p.input;h.fn.extend({attr:function(t,e){return Q(this,h.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){h.removeAttr(this,t)})}}),h.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===M?h.prop(t,e,n):(1===o&&h.isXMLDoc(t)||(e=e.toLowerCase(),r=h.attrHooks[e]||(h.expr.match.bool.test(e)?me:ve)),void 0===n?r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=h.find.attr(t,e))?void 0:i:null!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):void h.removeAttr(t,e))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(N);if(o&&1===t.nodeType)for(;n=o[i++];)r=h.propFix[n]||n,h.expr.match.bool.test(n)?we&&be||!ge.test(n)?t[r]=!1:t[h.camelCase("default-"+n)]=t[r]=!1:h.attr(t,n,""),t.removeAttribute(be?n:r)},attrHooks:{type:{set:function(t,e){if(!p.radioValue&&"radio"===e&&h.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),me={set:function(t,e,n){return!1===e?h.removeAttr(t,n):we&&be||!ge.test(n)?t.setAttribute(!be&&h.propFix[n]||n,n):t[h.camelCase("default-"+n)]=t[n]=!0,n}},h.each(h.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ye[e]||h.find.attr;ye[e]=we&&be||!ge.test(e)?function(t,e,r){var i,o;return r||(o=ye[e],ye[e]=i,i=null!=n(t,e,r)?e.toLowerCase():null,ye[e]=o),i}:function(t,e,n){if(!n)return t[h.camelCase("default-"+e)]?e.toLowerCase():null}}),we&&be||(h.attrHooks.value={set:function(t,e,n){if(!h.nodeName(t,"input"))return ve&&ve.set(t,e,n);t.defaultValue=e}}),be||(ve={set:function(t,e,n){var r=t.getAttributeNode(n);if(r||t.setAttributeNode(r=t.ownerDocument.createAttribute(n)),r.value=e+="","value"===n||e===t.getAttribute(n))return e}},ye.id=ye.name=ye.coords=function(t,e,n){var r;if(!n)return(r=t.getAttributeNode(e))&&""!==r.value?r.value:null},h.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:ve.set},h.attrHooks.contenteditable={set:function(t,e,n){ve.set(t,""!==e&&e,n)}},h.each(["width","height"],function(t,e){h.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),p.style||(h.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var _e=/^(?:input|select|textarea|button|object)$/i,Oe=/^(?:a|area)$/i;h.fn.extend({prop:function(t,e){return Q(this,h.prop,t,e,arguments.length>1)},removeProp:function(t){return t=h.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),h.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return(1!==o||!h.isXMLDoc(t))&&(e=h.propFix[e]||e,i=h.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=h.find.attr(t,"tabindex");return e?parseInt(e,10):_e.test(t.nodeName)||Oe.test(t.nodeName)&&t.href?0:-1}}}}),p.hrefNormalized||h.each(["href","src"],function(t,e){h.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),p.optSelected||(h.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),h.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){h.propFix[this.toLowerCase()]=this}),p.enctype||(h.propFix.enctype="encoding");var ke=/[\t\r\n\f]/g;h.fn.extend({addClass:function(t){var e,n,r,i,o,a,s=0,u=this.length,l="string"==typeof t&&t;if(h.isFunction(t))return this.each(function(e){h(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(N)||[];s=0;)r=r.replace(" "+i+" "," ");a=t?h.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):h.isFunction(t)?this.each(function(n){h(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,r=0,i=h(this),o=t.match(N)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else n!==M&&"boolean"!==n||(this.className&&h._data(this,"__className__",this.className),this.className=this.className||!1===t?"":h._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;n=0)return!0;return!1}}),h.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){h.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),h.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var xe=h.now(),Ce=/\?/,Ee=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;h.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var e,r=null,i=h.trim(t+"");return i&&!h.trim(i.replace(Ee,function(t,n,i,o){return e&&n&&(r=0),0===r?t:(e=i||n,r+=!o-!i,"")}))?Function("return "+i)():h.error("Invalid JSON: "+t)},h.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{n.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t))}catch(t){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||h.error("Invalid XML: "+t),e};var Se,je,Te=/#.*$/,Ae=/([?&])_=[^&]*/,Pe=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ne=/^(?:GET|HEAD)$/,Ie=/^\/\//,Le=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,De={},Re={},Me="*/".concat("*");try{je=location.href}catch(t){(je=E.createElement("a")).href="",je=je.href}function Be(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(N)||[];if(h.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function qe(t,e,n,r){var i={},o=t===Re;function a(s){var u;return i[s]=!0,h.each(t[s]||[],function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)}),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Fe(t,e){var n,r,i=h.ajaxSettings.flatOptions||{};for(r in e)void 0!==e[r]&&((i[r]?t:n||(n={}))[r]=e[r]);return n&&h.extend(!0,t,n),t}Se=Le.exec(je.toLowerCase())||[],h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:je,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Me,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":h.parseJSON,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Fe(Fe(t,h.ajaxSettings),e):Fe(h.ajaxSettings,t)},ajaxPrefilter:Be(De),ajaxTransport:Be(Re),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,i,o,a,s,u,l,c=h.ajaxSetup({},e),f=c.context||c,d=c.context&&(f.nodeType||f.jquery)?h(f):h.event,p=h.Deferred(),v=h.Callbacks("once memory"),m=c.statusCode||{},y={},g={},b=0,w="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!l)for(l={};e=Pe.exec(o);)l[e[1].toLowerCase()]=e[2];e=l[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=g[n]=g[n]||t,y[t]=e),this},overrideMimeType:function(t){return b||(c.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)m[e]=[m[e],t[e]];else _.always(t[_.status]);return this},abort:function(t){var e=t||w;return u&&u.abort(e),O(0,e),this}};if(p.promise(_).complete=v.add,_.success=_.done,_.error=_.fail,c.url=((t||c.url||je)+"").replace(Te,"").replace(Ie,Se[1]+"//"),c.type=e.method||e.type||c.method||c.type,c.dataTypes=h.trim(c.dataType||"*").toLowerCase().match(N)||[""],null==c.crossDomain&&(n=Le.exec(c.url.toLowerCase()),c.crossDomain=!(!n||n[1]===Se[1]&&n[2]===Se[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(Se[3]||("http:"===Se[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=h.param(c.data,c.traditional)),qe(De,c,e,_),2===b)return _;for(r in(s=c.global)&&0==h.active++&&h.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Ne.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(Ce.test(i)?"&":"?")+c.data,delete c.data),!1===c.cache&&(c.url=Ae.test(i)?i.replace(Ae,"$1_="+xe++):i+(Ce.test(i)?"&":"?")+"_="+xe++)),c.ifModified&&(h.lastModified[i]&&_.setRequestHeader("If-Modified-Since",h.lastModified[i]),h.etag[i]&&_.setRequestHeader("If-None-Match",h.etag[i])),(c.data&&c.hasContent&&!1!==c.contentType||e.contentType)&&_.setRequestHeader("Content-Type",c.contentType),_.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+Me+"; q=0.01":""):c.accepts["*"]),c.headers)_.setRequestHeader(r,c.headers[r]);if(c.beforeSend&&(!1===c.beforeSend.call(f,_,c)||2===b))return _.abort();for(r in w="abort",{success:1,error:1,complete:1})_[r](c[r]);if(u=qe(Re,c,e,_)){_.readyState=1,s&&d.trigger("ajaxSend",[_,c]),c.async&&c.timeout>0&&(a=setTimeout(function(){_.abort("timeout")},c.timeout));try{b=1,u.send(y,O)}catch(t){if(!(b<2))throw t;O(-1,t)}}else O(-1,"No Transport");function O(t,e,n,r){var l,y,g,w,O,k=e;2!==b&&(b=2,a&&clearTimeout(a),u=void 0,o=r||"",_.readyState=t>0?4:0,l=t>=200&&t<300||304===t,n&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||t.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==u[0]&&u.unshift(o),n[o]}(c,_,n)),w=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(c,w,_,l),l?(c.ifModified&&((O=_.getResponseHeader("Last-Modified"))&&(h.lastModified[i]=O),(O=_.getResponseHeader("etag"))&&(h.etag[i]=O)),204===t||"HEAD"===c.type?k="nocontent":304===t?k="notmodified":(k=w.state,y=w.data,l=!(g=w.error))):(g=k,!t&&k||(k="error",t<0&&(t=0))),_.status=t,_.statusText=(e||k)+"",l?p.resolveWith(f,[y,k,_]):p.rejectWith(f,[_,k,g]),_.statusCode(m),m=void 0,s&&d.trigger(l?"ajaxSuccess":"ajaxError",[_,c,l?y:g]),v.fireWith(f,[_,k]),s&&(d.trigger("ajaxComplete",[_,c]),--h.active||h.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,n){return h.get(t,e,n,"json")},getScript:function(t,e){return h.get(t,void 0,e,"script")}}),h.each(["get","post"],function(t,e){h[e]=function(t,n,r,i){return h.isFunction(n)&&(i=i||r,r=n,n=void 0),h.ajax({url:t,type:e,dataType:i,data:n,success:r})}}),h.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){h.fn[e]=function(t){return this.on(e,t)}}),h._evalUrl=function(t){return h.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},h.fn.extend({wrapAll:function(t){if(h.isFunction(t))return this.each(function(e){h(this).wrapAll(t.call(this,e))});if(this[0]){var e=h(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 h.isFunction(t)?this.each(function(e){h(this).wrapInner(t.call(this,e))}):this.each(function(){var e=h(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=h.isFunction(t);return this.each(function(n){h(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()}}),h.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!p.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||h.css(t,"display"))},h.expr.filters.visible=function(t){return!h.expr.filters.hidden(t)};var ze=/%20/g,Ue=/\[\]$/,He=/\r?\n/g,We=/^(?:submit|button|image|reset|file)$/i,Ve=/^(?:input|select|textarea|keygen)/i;function Ke(t,e,n,r){var i;if(h.isArray(e))h.each(e,function(e,i){n||Ue.test(t)?r(t,i):Ke(t+"["+("object"==typeof i?e:"")+"]",i,n,r)});else if(n||"object"!==h.type(e))r(t,e);else for(i in e)Ke(t+"["+i+"]",e[i],n,r)}h.param=function(t,e){var n,r=[],i=function(t,e){e=h.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=h.ajaxSettings&&h.ajaxSettings.traditional),h.isArray(t)||t.jquery&&!h.isPlainObject(t))h.each(t,function(){i(this.name,this.value)});else for(n in t)Ke(n,t[n],e,i);return r.join("&").replace(ze,"+")},h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=h.prop(this,"elements");return t?h.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!h(this).is(":disabled")&&Ve.test(this.nodeName)&&!We.test(t)&&(this.checked||!$.test(t))}).map(function(t,e){var n=h(this).val();return null==n?null:h.isArray(n)?h.map(n,function(t){return{name:e.name,value:t.replace(He,"\r\n")}}):{name:e.name,value:n.replace(He,"\r\n")}}).get()}}),h.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Ye()||function(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}()}:Ye;var Qe=0,$e={},Ge=h.ajaxSettings.xhr();function Ye(){try{return new n.XMLHttpRequest}catch(t){}}n.ActiveXObject&&h(n).on("unload",function(){for(var t in $e)$e[t](void 0,!0)}),p.cors=!!Ge&&"withCredentials"in Ge,(Ge=p.ajax=!!Ge)&&h.ajaxTransport(function(t){var e;if(!t.crossDomain||p.cors)return{send:function(n,r){var i,o=t.xhr(),a=++Qe;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];for(i in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(t.hasContent&&t.data||null),e=function(n,i){var s,u,l;if(e&&(i||4===o.readyState))if(delete $e[a],e=void 0,o.onreadystatechange=h.noop,i)4!==o.readyState&&o.abort();else{l={},s=o.status,"string"==typeof o.responseText&&(l.text=o.responseText);try{u=o.statusText}catch(t){u=""}s||!t.isLocal||t.crossDomain?1223===s&&(s=204):s=l.text?200:404}l&&r(s,u,l,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=$e[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}),h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return h.globalEval(t),t}}}),h.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),h.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=E.head||h("head")[0]||E.documentElement;return{send:function(r,i){(e=E.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||i(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var Ze=[],Xe=/(=)\?(?=&|$)|\?\?/;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||h.expando+"_"+xe++;return this[t]=!0,t}}),h.ajaxPrefilter("json jsonp",function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=h.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+i):!1!==t.jsonp&&(t.url+=(Ce.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||h.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always(function(){n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ze.push(i)),a&&h.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),h.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||E;var r=O.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=h.buildFragment([t],e,i),i&&i.length&&h(i).remove(),h.merge([],r.childNodes))};var Je=h.fn.load;h.fn.load=function(t,e,n){if("string"!=typeof t&&Je)return Je.apply(this,arguments);var r,i,o,a=this,s=t.indexOf(" ");return s>=0&&(r=h.trim(t.slice(s,t.length)),t=t.slice(0,s)),h.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),a.length>0&&h.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){i=arguments,a.html(r?h("
").append(h.parseHTML(t)).find(r):t)}).complete(n&&function(t,e){a.each(n,i||[t.responseText,e,t])}),this},h.expr.filters.animated=function(t){return h.grep(h.timers,function(e){return t===e.elem}).length};var tn=n.document.documentElement;function en(t){return h.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}h.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,l=h.css(t,"position"),c=h(t),f={};"static"===l&&(t.style.position="relative"),s=c.offset(),o=h.css(t,"top"),u=h.css(t,"left"),("absolute"===l||"fixed"===l)&&h.inArray("auto",[o,u])>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),h.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):c.css(f)}},h.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){h.offset.setOffset(this,t,e)});var e,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(e=o.documentElement,h.contains(e,i)?(typeof i.getBoundingClientRect!==M&&(r=i.getBoundingClientRect()),n=en(o),{top:r.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:r.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var t,e,n={top:0,left:0},r=this[0];return"fixed"===h.css(r,"position")?e=r.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),h.nodeName(t[0],"html")||(n=t.offset()),n.top+=h.css(t[0],"borderTopWidth",!0),n.left+=h.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-h.css(r,"marginTop",!0),left:e.left-n.left-h.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||tn;t&&!h.nodeName(t,"html")&&"static"===h.css(t,"position");)t=t.offsetParent;return t||tn})}}),h.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);h.fn[t]=function(r){return Q(this,function(t,r,i){var o=en(t);if(void 0===i)return o?e in o?o[e]:o.document.documentElement[r]:t[r];o?o.scrollTo(n?h(o).scrollLeft():i,n?i:h(o).scrollTop()):t[r]=i},t,r,arguments.length,null)}}),h.each(["top","left"],function(t,e){h.cssHooks[e]=Mt(p.pixelPosition,function(t,n){if(n)return n=It(t,e),Dt.test(n)?h(t).position()[e]+"px":n})}),h.each({Height:"height",Width:"width"},function(t,e){h.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){h.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Q(this,function(e,n,r){var i;return h.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===r?h.css(e,n,a):h.style(e,n,r,a)},e,o?r:void 0,o,null)}})}),h.fn.size=function(){return this.length},h.fn.andSelf=h.fn.addBack,void 0===(r=function(){return h}.apply(e,[]))||(t.exports=r);var nn=n.jQuery,rn=n.$;return h.noConflict=function(t){return n.$===h&&(n.$=rn),t&&n.jQuery===h&&(n.jQuery=nn),h},typeof i===M&&(n.jQuery=n.$=h),h},"object"==typeof t.exports?t.exports=i.document?o(i,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return o(t)}:o(i)},function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n(2),i=n(6),o=n(5),a=n(3),s=n(10),u=n(39),l=n(25),c=n(20),f=n(0),d=n(51);function p(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?e[Symbol.hasInstance](t):t instanceof e}var h=0;function v(t,e){for(var n=[],d=2;d1)for(var n=1;n"}function c(t,e){var n=e||l(t),c=(i(t),o(t));function f(e,n){if(c)return e;for(var r=!0,i=[],o=0,s=e.length;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=l-c,O=Math.floor,k=String.fromCharCode;function x(t){throw new RangeError(w[t])}function C(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function E(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+C((t=t.replace(b,".")).split("."),e).join(".")}function S(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=k((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=k(t)}).join("")}function T(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function A(t,e,n){var r=0;for(t=n?O(t/p):t>>1,t+=O(t/e);t>_*f>>1;r+=l)t=O(t/_);return O(r+(_+1)*t/(t+d))}function P(t){var e,n,r,i,o,a,s,d,p,y,g,b=[],w=t.length,_=0,k=v,C=h;for((n=t.lastIndexOf(m))<0&&(n=0),r=0;r=128&&x("not-basic"),b.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=w&&x("invalid-input"),((d=(g=t.charCodeAt(i++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:l)>=l||d>O((u-_)/a))&&x("overflow"),_+=d*a,!(d<(p=s<=C?c:s>=C+f?f:s-C));s+=l)a>O(u/(y=l-p))&&x("overflow"),a*=y;C=A(_-o,e=b.length+1,0==o),O(_/e)>u-k&&x("overflow"),k+=O(_/e),_%=e,b.splice(_++,0,k)}return j(b)}function N(t){var e,n,r,i,o,a,s,d,p,y,g,b,w,_,C,E=[];for(b=(t=S(t)).length,e=v,n=0,o=h,a=0;a=e&&gO((u-n)/(w=r+1))&&x("overflow"),n+=(s-e)*w,e=s,a=0;au&&x("overflow"),g==e){for(d=n,p=l;!(d<(y=p<=o?c:p>=o+f?f:p-o));p+=l)C=d-y,_=l-y,E.push(k(T(y+C%_,0))),d=O(C/_);E.push(k(T(d,0))),o=A(n,w,r==i),n=0,++r}++n,++e}return E.join("")}s={version:"1.3.2",ucs2:{decode:S,encode:j},decode:P,encode:N,toASCII:function(t){return E(t,function(t){return g.test(t)?"xn--"+N(t):t})},toUnicode:function(t){return E(t,function(t){return y.test(t)?P(t.slice(4).toLowerCase()):t})}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(85)(t),n(48))},function(t,e,n){var r,i; /*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.1 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ /*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.1 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ !function(o,a){"use strict";t.exports?t.exports=a():void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}(0,function(t){"use strict";var e=t&&t.IPv6;return{best:function(t){var e,n,r=t.toLowerCase().split(":"),i=r.length,o=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[i-1]&&""===r[i-2]&&r.pop(),-1!==r[(i=r.length)-1].indexOf(".")&&(o=7),e=0;e1;s++)n.splice(0,1);r[a]=n.join("")}var u=-1,l=0,c=0,f=-1,d=!1;for(a=0;al&&(u=f,l=c)):"0"===r[a]&&(d=!0,f=a,c=1);c>l&&(u=f,l=c),l>1&&r.splice(u,l,""),i=r.length;var p="";for(""===r[0]&&(p=":"),a=0;a=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})},function(t,e){},function(t,e,n){var r=n(1),i=n(57);function o(t,e){i.Object.is(t)&&(t=i.struct(t));var n="subtype"===t.meta.kind;var r={},o=n?t.meta.type:t;if("struct"===o.meta.kind||"interface"===o.meta.kind){var a=o.meta.props;Object.keys(a).forEach(function(t){var e,n=a[t];(e=function(){}).tcomb=n,r[t]=e})}else 0;return n&&(r.__subtype__=function(){},r.__subtype__.predicate=t.meta.predicate),r}var a=i.irreducible("ReactElement",r.isValidElement),s=i.irreducible("ReactNode",function(t){return i.Str.is(t)||i.Num.is(t)||a.is(t)||i.list(s).is(t)}),u=i.irreducible("ReactChild",function(t){return s.is(t)||i.Bool.is(t)||i.Nil.is(t)}),l=i.irreducible("ReactChildren",function(t){return u.is(t)||i.list(l).is(t)});i.ReactElement=a,i.ReactNode=s,i.ReactChild=u,i.ReactChildren=l,t.exports={t:i,propTypes:o,props:function(t,e){return function(e){e.propTypes=o(t)}},ReactElement:a,ReactNode:s,ReactChild:u,ReactChildren:l,ReactElementT:a,ReactNodeT:s,ReactChildT:u,ReactChildrenT:l}},,,,,function(t,e,n){"use strict";function r(){if(window.parent!==window){var t;try{t=window.parent.connectAppDocument}catch(t){}return t?t(window.document):void 0}}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";function r(t,e){"interactive"===t.readyState||"complete"===t.readyState?e():t.addEventListener("DOMContentLoaded",e)}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";(function(t){var r=n(126),i=setTimeout;function o(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function s(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void l(e.promise,t)}u(e.promise,r)}else(1===t._state?u:l)(e.promise,t._value)})):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void d((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}var r,i}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&a._immediateFn(function(){t._handled||a._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e(Number(t.attributes.indent)||0)},t.prototype.isInline=function(){return!(this.isContainerBlock()||this.isVideo()||this.isCustomBlock())},t.prototype.isCodeBlock=function(){return!!this.attributes["code-block"]},t.prototype.isJustNewline=function(){return this.insert.value===r.NewLine},t.prototype.isList=function(){return this.isOrderedList()||this.isBulletList()||this.isCheckedList()||this.isUncheckedList()},t.prototype.isOrderedList=function(){return this.attributes.list===r.ListType.Ordered},t.prototype.isBulletList=function(){return this.attributes.list===r.ListType.Bullet},t.prototype.isCheckedList=function(){return this.attributes.list===r.ListType.Checked},t.prototype.isUncheckedList=function(){return this.attributes.list===r.ListType.Unchecked},t.prototype.isACheckList=function(){return this.attributes.list==r.ListType.Unchecked||this.attributes.list===r.ListType.Checked},t.prototype.isSameListAs=function(t){return!!t.attributes.list&&(this.attributes.list===t.attributes.list||t.isACheckList()&&this.isACheckList())},t.prototype.isText=function(){return this.insert.type===r.DataType.Text},t.prototype.isImage=function(){return this.insert.type===r.DataType.Image},t.prototype.isFormula=function(){return this.insert.type===r.DataType.Formula},t.prototype.isVideo=function(){return this.insert.type===r.DataType.Video},t.prototype.isLink=function(){return this.isText()&&!!this.attributes.link},t.prototype.isCustom=function(){return this.insert instanceof i.InsertDataCustom},t.prototype.isCustomBlock=function(){return this.isCustom()&&!!this.attributes.renderAsBlock},t.prototype.isMentions=function(){return this.isText()&&!!this.attributes.mentions},t}();e.DeltaInsertOp=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){this.type=t,this.value=e}}();e.InsertDataQuill=r;var i=function(){return function(t,e){this.type=t,this.value=e}}();e.InsertDataCustom=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=function(t){var e=t;return e=e.replace(/^\s*/gm,""),/^\s*((|https?|s?ftp|file|blob|mailto|tel):|#|\/|data:image\/)/.test(e)?e:"unsafe:"+e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assign=function(t){for(var e=[],n=1;n=2?t[1]:t[0]},e.flatten=function t(e){return e.reduce(function(e,n){return e.concat(Array.isArray(n)?t(n):n)},[])},e.groupConsecutiveElementsWhile=function(t,e){for(var n,r=[],i=0;i0&&e(n,t[i-1])?r[r.length-1].push(n):r.push([n]);return r.map(function(t){return 1===t.length?t[0]:t})},e.sliceFromReverseWhile=function(t,e,n){for(var r={elements:[],sliceStartsAt:-1},i=e;i>=0&&n(t[i]);i--)r.sliceStartsAt=i,r.elements.unshift(t[i]);return r},e.intersperse=function(t,e){return t.reduce(function(n,r,i){return n.push(r),i "+u(e)}function f(t){return r.is(t)&&o(t.instrumentation)}function d(t){for(var e=t.length,n=!1,r=e-1;r>=0;r--){var i=t[r];if(!l(i)||"maybe"!==i.meta.kind)return r+1;n=!0}return n?0:e}function p(t,e,n){t=i(t)?t:[t];var r=n||c(t,e),o=t.length;d(t);function u(t,e){return f(t)?t:u.of(t)}return u.meta={kind:"func",domain:t,codomain:e,name:n,identity:!0},u.displayName=r,u.is=function(n){return f(n)&&n.instrumentation.domain.length===o&&n.instrumentation.domain.every(function(e,n){return e===t[n]})&&n.instrumentation.codomain===e},u.of=function(n,r){if(u.is(n))return n;function i(){var i=Array.prototype.slice.call(arguments),s=i.length;if(r&&s0?e.concat(t):e},$remove:function(t,e){if(t.length>0){e=a(e);for(var n=0,r=t.length;n0?(e=a(e),t.reduce(function(t,e){return t.splice.apply(t,e),t},e)):e},$swap:function(t,e){if(t.from!==t.to){var n=(e=a(e))[t.to];e[t.to]=e[t.from],e[t.from]=n}return e},$unshift:function(t,e){return t.length>0?t.concat(e):e},$merge:function(t,e){var n=!1,r=a(e);for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i],n=n||r[i]!==e[i]);return n?r:e}},t.exports=l},function(t,e,n){var r=n(17),i=n(30),o=n(31),a=n(86);t.exports=function(t){for(var e,n,s,u=1,l=arguments.length;u=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(174),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(48))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){h(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&h(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),f=[".","!","~","*","'","(",")"].join(""),d=function(t,e){var n,r,d,v,m,y,g,b,w,_,O,k,x,C,E="-",S="",j="",T=!0,A={},P="";if("string"!=typeof t)return"";if("string"==typeof e&&(E=e),g=u.en,b=s.en,"object"==typeof e)for(O in n=e.maintainCase||!1,A=e.custom&&"object"==typeof e.custom?e.custom:A,d=+e.truncate>1&&e.truncate||!1,v=e.uric||!1,m=e.uricNoSlash||!1,y=e.mark||!1,T=!1!==e.symbols&&!1!==e.lang,E=e.separator||E,v&&(P+=l),m&&(P+=c),y&&(P+=f),g=e.lang&&u[e.lang]&&T?u[e.lang]:T?u.en:{},b=e.lang&&s[e.lang]?s[e.lang]:!1===e.lang||!0===e.lang?{}:s.en,e.titleCase&&"number"==typeof e.titleCase.length&&Array.prototype.toString.call(e.titleCase)?(e.titleCase.forEach(function(t){A[t+""]=t+""}),r=!0):r=!!e.titleCase,e.custom&&"number"==typeof e.custom.length&&Array.prototype.toString.call(e.custom)&&e.custom.forEach(function(t){A[t+""]=t+""}),Object.keys(A).forEach(function(e){var n;n=e.length>1?new RegExp("\\b"+p(e)+"\\b","gi"):new RegExp(p(e),"gi"),t=t.replace(n,A[e])}),A)P+=O;for(P=p(P+=E),x=!1,C=!1,_=0,k=(t=t.replace(/(^\s+|\s+$)/g,"")).length;_=0?(j+=O,O=""):!0===C?(O=a[j]+i[O],j=""):O=x&&i[O].match(/[A-Za-z0-9]/)?" "+i[O]:i[O],x=!1,C=!1):O in a?(j+=O,O="",_===k-1&&(O=a[j]),C=!0):!g[O]||v&&-1!==l.indexOf(O)||m&&-1!==c.indexOf(O)?(!0===C?(O=a[j]+O,j="",C=!1):x&&(/[A-Za-z0-9]/.test(O)||S.substr(-1).match(/A-Za-z0-9]/))&&(O=" "+O),x=!1):(O=x||S.substr(-1).match(/[A-Za-z0-9]/)?E+g[O]:g[O],O+=void 0!==t[_+1]&&t[_+1].match(/[A-Za-z0-9]/)?E:"",x=!0),S+=O.replace(new RegExp("[^\\w\\s"+P+"_-]","g"),E);return r&&(S=S.replace(/(\w)(\S*)/g,function(t,e,n){var r=e.toUpperCase()+(null!==n?n:"");return Object.keys(A).indexOf(r.toLowerCase())<0?r:r.toLowerCase()})),S=S.replace(/\s+/g,E).replace(new RegExp("\\"+E+"+","g"),E).replace(new RegExp("(^\\"+E+"+|\\"+E+"+$)","g"),""),d&&S.length>d&&(w=S.charAt(d)===E,S=S.slice(0,d),w||(S=S.slice(0,S.lastIndexOf(E)))),n||r||(S=S.toLowerCase()),S},p=function(t){return t.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},h=function(t,e){for(var n in e)if(e[n]===t)return!0};t.exports?(t.exports=d,t.exports.createSlug=function(t){return function(e){return d(e,t)}}):void 0===(r=function(){return d}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(65),i=n(242),o=n(134),a=function(){function t(){}return t.sanitize=function(e){var n={};if(!e||"object"!=typeof e)return n;var a=["bold","italic","underline","strike","code","blockquote","code-block","renderAsBlock"],s=["background","color"],u=e.font,l=e.size,c=e.link,f=e.script,d=e.list,p=e.header,h=e.align,v=e.direction,m=e.indent,y=e.mentions,g=e.mention,b=e.width,w=e.target,_=a.concat(s,["font","size","link","script","list","header","align","direction","indent","mentions","mention","width"]);if(a.forEach(function(t){var r=e[t];r&&(n[t]=!!r)}),s.forEach(function(r){var i=e[r];i&&(t.IsValidHexColor(i+"")||t.IsValidColorLiteral(i+""))&&(n[r]=i)}),u&&t.IsValidFontName(u+"")&&(n.font=u),l&&t.IsValidSize(l+"")&&(n.size=l),b&&t.IsValidWidth(b+"")&&(n.width=b),c&&(n.link=o.sanitize(c+"")),w&&t.isValidTarget(w)&&(n.target=w),f!==r.ScriptType.Sub&&r.ScriptType.Super!==f||(n.script=f),d!==r.ListType.Bullet&&d!==r.ListType.Ordered&&d!==r.ListType.Checked&&d!==r.ListType.Unchecked||(n.list=d),Number(p)&&(n.header=Math.min(Number(p),6)),h!==r.AlignType.Center&&h!==r.AlignType.Right&&h!==r.AlignType.Justify||(n.align=h),v===r.DirectionType.Rtl&&(n.direction=v),m&&Number(m)&&(n.indent=Math.min(Number(m),30)),y&&g){var O=i.MentionSanitizer.sanitize(g);Object.keys(O).length>0&&(n.mentions=!!y,n.mention=g)}return Object.keys(e).reduce(function(t,n){return-1===_.indexOf(n)&&(t[n]=e[n]),t},n)},t.IsValidHexColor=function(t){return!!t.match(/^#([0-9A-F]{6}|[0-9A-F]{3})$/i)},t.IsValidColorLiteral=function(t){return!!t.match(/^[a-z]{1,50}$/i)},t.IsValidFontName=function(t){return!!t.match(/^[a-z\s0-9\- ]{1,30}$/i)},t.IsValidSize=function(t){return!!t.match(/^[a-z0-9\-]{1,20}$/i)},t.IsValidWidth=function(t){return!!t.match(/^[0-9]*(px|em|%)?$/)},t.isValidTarget=function(t){return!!t.match(/^[_a-zA-Z0-9\-]{1,50}$/)},t}();e.OpAttributeSanitizer=a},function(t,e,n){"use strict";var r;function i(t){return o(r.Html).reduce(s,t)}function o(t){var e=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["\\/","/"],["\\(","("],["\\)",")"]];return t===r.Html?e.filter(function(t){var e=t[0];t[1];return-1===e.indexOf("(")&&-1===e.indexOf(")")}):e.filter(function(t){var e=t[0];t[1];return-1===e.indexOf("/")})}function a(t,e){return t.replace(new RegExp(e[0],"g"),e[1])}function s(t,e){return t.replace(new RegExp(e[1],"g"),e[0].replace("\\",""))}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Html=0]="Html",t[t.Url=1]="Url"}(r||(r={})),e.makeStartTag=function(t,e){if(void 0===e&&(e=void 0),!t)return"";var n="";e&&(n=[].concat(e).map(function(t){return t.key+(t.value?'="'+t.value+'"':"")}).join(" "));var r=">";return"img"!==t&&"br"!==t||(r="/>"),n?"<"+t+" "+n+r:"<"+t+r},e.makeEndTag=function(t){return void 0===t&&(t=""),t&&""||""},e.decodeHtml=i,e.encodeHtml=function(t,e){return void 0===e&&(e=!0),e&&(t=i(t)),o(r.Html).reduce(a,t)},e.encodeLink=function(t){var e=o(r.Url),n=e.reduce(s,t);return e.reduce(a,n)}},function(t,e,n){"use strict"; /** @license React v16.6.1 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(92),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.concurrent_mode"):60111,p=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function g(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;rP.length&&P.push(t)}function L(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return r(i,e,""===n?"."+D(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var l=0;lthis.eventPool.length&&this.eventPool.push(t)}function ft(t){t.eventPool=[],t.getPooled=lt,t.release=ct}i(ut.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=at)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=at)},persist:function(){this.isPersistent=at},isPersistent:st,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=st,this._dispatchInstances=this._dispatchListeners=null}}),ut.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ut.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,ft(n),n},ft(ut);var dt=ut.extend({data:null}),pt=ut.extend({data:null}),ht=[9,13,27,32],vt=V&&"CompositionEvent"in window,mt=null;V&&"documentMode"in document&&(mt=document.documentMode);var yt=V&&"TextEvent"in window&&!mt,gt=V&&(!vt||mt&&8=mt),bt=String.fromCharCode(32),wt={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},_t=!1;function Ot(t,e){switch(t){case"keyup":return-1!==ht.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function kt(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var xt=!1;var Ct={eventTypes:wt,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(vt)t:{switch(t){case"compositionstart":i=wt.compositionStart;break t;case"compositionend":i=wt.compositionEnd;break t;case"compositionupdate":i=wt.compositionUpdate;break t}i=void 0}else xt?Ot(t,n)&&(i=wt.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=wt.compositionStart);return i?(gt&&"ko"!==n.locale&&(xt||i!==wt.compositionStart?i===wt.compositionEnd&&xt&&(o=ot()):(rt="value"in(nt=r)?nt.value:nt.textContent,xt=!0)),i=dt.getPooled(i,e,n,r),o?i.data=o:null!==(o=kt(n))&&(i.data=o),W(i),o=i):o=null,(t=yt?function(t,e){switch(t){case"compositionend":return kt(e);case"keypress":return 32!==e.which?null:(_t=!0,bt);case"textInput":return(t=e.data)===bt&&_t?null:t;default:return null}}(t,n):function(t,e){if(xt)return"compositionend"===t||!vt&&Ot(t,e)?(t=ot(),it=rt=nt=null,xt=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1