define("core/adapter",[],(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,(function(e){var n=t[o][1][e];return s(n||e)}),l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o0&&void 0!==arguments[0]?arguments[0]:{},window=_ref.window,options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0},logging=utils.log,browserDetails=utils.detectBrowser(window),adapter={browserDetails:browserDetails,commonShim:commonShim,extractVersion:utils.extractVersion,disableLog:utils.disableLog,disableWarnings:utils.disableWarnings,sdp:sdp};switch(browserDetails.browser){case"chrome":if(!chromeShim||!chromeShim.shimPeerConnection||!options.shimChrome)return logging("Chrome shim is not included in this adapter release."),adapter;if(null===browserDetails.version)return logging("Chrome shim can not determine version, not shimming."),adapter;logging("adapter.js shimming chrome."),adapter.browserShim=chromeShim,commonShim.shimAddIceCandidateNullOrEmpty(window,browserDetails),chromeShim.shimGetUserMedia(window,browserDetails),chromeShim.shimMediaStream(window,browserDetails),chromeShim.shimPeerConnection(window,browserDetails),chromeShim.shimOnTrack(window,browserDetails),chromeShim.shimAddTrackRemoveTrack(window,browserDetails),chromeShim.shimGetSendersWithDtmf(window,browserDetails),chromeShim.shimGetStats(window,browserDetails),chromeShim.shimSenderReceiverGetStats(window,browserDetails),chromeShim.fixNegotiationNeeded(window,browserDetails),commonShim.shimRTCIceCandidate(window,browserDetails),commonShim.shimConnectionState(window,browserDetails),commonShim.shimMaxMessageSize(window,browserDetails),commonShim.shimSendThrowTypeError(window,browserDetails),commonShim.removeExtmapAllowMixed(window,browserDetails);break;case"firefox":if(!firefoxShim||!firefoxShim.shimPeerConnection||!options.shimFirefox)return logging("Firefox shim is not included in this adapter release."),adapter;logging("adapter.js shimming firefox."),adapter.browserShim=firefoxShim,commonShim.shimAddIceCandidateNullOrEmpty(window,browserDetails),firefoxShim.shimGetUserMedia(window,browserDetails),firefoxShim.shimPeerConnection(window,browserDetails),firefoxShim.shimOnTrack(window,browserDetails),firefoxShim.shimRemoveStream(window,browserDetails),firefoxShim.shimSenderGetStats(window,browserDetails),firefoxShim.shimReceiverGetStats(window,browserDetails),firefoxShim.shimRTCDataChannel(window,browserDetails),firefoxShim.shimAddTransceiver(window,browserDetails),firefoxShim.shimGetParameters(window,browserDetails),firefoxShim.shimCreateOffer(window,browserDetails),firefoxShim.shimCreateAnswer(window,browserDetails),commonShim.shimRTCIceCandidate(window,browserDetails),commonShim.shimConnectionState(window,browserDetails),commonShim.shimMaxMessageSize(window,browserDetails),commonShim.shimSendThrowTypeError(window,browserDetails);break;case"safari":if(!safariShim||!options.shimSafari)return logging("Safari shim is not included in this adapter release."),adapter;logging("adapter.js shimming safari."),adapter.browserShim=safariShim,commonShim.shimAddIceCandidateNullOrEmpty(window,browserDetails),safariShim.shimRTCIceServerUrls(window,browserDetails),safariShim.shimCreateOfferLegacy(window,browserDetails),safariShim.shimCallbacksAPI(window,browserDetails),safariShim.shimLocalStreamsAPI(window,browserDetails),safariShim.shimRemoteStreamsAPI(window,browserDetails),safariShim.shimTrackEventTransceiver(window,browserDetails),safariShim.shimGetUserMedia(window,browserDetails),safariShim.shimAudioContext(window,browserDetails),commonShim.shimRTCIceCandidate(window,browserDetails),commonShim.shimMaxMessageSize(window,browserDetails),commonShim.shimSendThrowTypeError(window,browserDetails),commonShim.removeExtmapAllowMixed(window,browserDetails);break;default:logging("Unsupported browser!")}return adapter};var utils=_interopRequireWildcard(require("./utils")),chromeShim=_interopRequireWildcard(require("./chrome/chrome_shim")),firefoxShim=_interopRequireWildcard(require("./firefox/firefox_shim")),safariShim=_interopRequireWildcard(require("./safari/safari_shim")),commonShim=_interopRequireWildcard(require("./common_shim")),sdp=_interopRequireWildcard(require("sdp"));function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}},{"./chrome/chrome_shim":3,"./common_shim":6,"./firefox/firefox_shim":7,"./safari/safari_shim":10,"./utils":11,sdp:12}],3:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.shimGetDisplayMedia=exports.shimGetUserMedia=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_getusermedia=require("./getusermedia");Object.defineProperty(exports,"shimGetUserMedia",{enumerable:!0,get:function(){return _getusermedia.shimGetUserMedia}});var _getdisplaymedia=require("./getdisplaymedia");Object.defineProperty(exports,"shimGetDisplayMedia",{enumerable:!0,get:function(){return _getdisplaymedia.shimGetDisplayMedia}}),exports.shimMediaStream=function(window){window.MediaStream=window.MediaStream||window.webkitMediaStream},exports.shimOnTrack=function(window){if("object"===(void 0===window?"undefined":_typeof(window))&&window.RTCPeerConnection&&!("ontrack"in window.RTCPeerConnection.prototype)){Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(f){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=f)},enumerable:!0,configurable:!0});var origSetRemoteDescription=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function(){var _this=this;return this._ontrackpoly||(this._ontrackpoly=function(e){e.stream.addEventListener("addtrack",(function(te){var receiver=void 0;receiver=window.RTCPeerConnection.prototype.getReceivers?_this.getReceivers().find((function(r){return r.track&&r.track.id===te.track.id})):{track:te.track};var event=new Event("track");event.track=te.track,event.receiver=receiver,event.transceiver={receiver:receiver},event.streams=[e.stream],_this.dispatchEvent(event)})),e.stream.getTracks().forEach((function(track){var receiver=void 0;receiver=window.RTCPeerConnection.prototype.getReceivers?_this.getReceivers().find((function(r){return r.track&&r.track.id===track.id})):{track:track};var event=new Event("track");event.track=track,event.receiver=receiver,event.transceiver={receiver:receiver},event.streams=[e.stream],_this.dispatchEvent(event)}))},this.addEventListener("addstream",this._ontrackpoly)),origSetRemoteDescription.apply(this,arguments)}}else utils.wrapPeerConnectionEvent(window,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}))},exports.shimGetSendersWithDtmf=function(window){if("object"===(void 0===window?"undefined":_typeof(window))&&window.RTCPeerConnection&&!("getSenders"in window.RTCPeerConnection.prototype)&&"createDTMFSender"in window.RTCPeerConnection.prototype){var shimSenderWithDtmf=function(pc,track){return{track:track,get dtmf(){return void 0===this._dtmf&&("audio"===track.kind?this._dtmf=pc.createDTMFSender(track):this._dtmf=null),this._dtmf},_pc:pc}};if(!window.RTCPeerConnection.prototype.getSenders){window.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var origAddTrack=window.RTCPeerConnection.prototype.addTrack;window.RTCPeerConnection.prototype.addTrack=function(track,stream){var sender=origAddTrack.apply(this,arguments);return sender||(sender=shimSenderWithDtmf(this,track),this._senders.push(sender)),sender};var origRemoveTrack=window.RTCPeerConnection.prototype.removeTrack;window.RTCPeerConnection.prototype.removeTrack=function(sender){origRemoveTrack.apply(this,arguments);var idx=this._senders.indexOf(sender);-1!==idx&&this._senders.splice(idx,1)}}var origAddStream=window.RTCPeerConnection.prototype.addStream;window.RTCPeerConnection.prototype.addStream=function(stream){var _this2=this;this._senders=this._senders||[],origAddStream.apply(this,[stream]),stream.getTracks().forEach((function(track){_this2._senders.push(shimSenderWithDtmf(_this2,track))}))};var origRemoveStream=window.RTCPeerConnection.prototype.removeStream;window.RTCPeerConnection.prototype.removeStream=function(stream){var _this3=this;this._senders=this._senders||[],origRemoveStream.apply(this,[stream]),stream.getTracks().forEach((function(track){var sender=_this3._senders.find((function(s){return s.track===track}));sender&&_this3._senders.splice(_this3._senders.indexOf(sender),1)}))}}else if("object"===(void 0===window?"undefined":_typeof(window))&&window.RTCPeerConnection&&"getSenders"in window.RTCPeerConnection.prototype&&"createDTMFSender"in window.RTCPeerConnection.prototype&&window.RTCRtpSender&&!("dtmf"in window.RTCRtpSender.prototype)){var origGetSenders=window.RTCPeerConnection.prototype.getSenders;window.RTCPeerConnection.prototype.getSenders=function(){var _this4=this,senders=origGetSenders.apply(this,[]);return senders.forEach((function(sender){return sender._pc=_this4})),senders},Object.defineProperty(window.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},exports.shimGetStats=function(window){if(!window.RTCPeerConnection)return;var origGetStats=window.RTCPeerConnection.prototype.getStats;window.RTCPeerConnection.prototype.getStats=function(){var _this5=this,_arguments=Array.prototype.slice.call(arguments),selector=_arguments[0],onSucc=_arguments[1],onErr=_arguments[2];if(arguments.length>0&&"function"==typeof selector)return origGetStats.apply(this,arguments);if(0===origGetStats.length&&(0===arguments.length||"function"!=typeof selector))return origGetStats.apply(this,[]);var fixChromeStats_=function(response){var standardReport={};return response.result().forEach((function(report){var standardStats={id:report.id,timestamp:report.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[report.type]||report.type};report.names().forEach((function(name){standardStats[name]=report.stat(name)})),standardReport[standardStats.id]=standardStats})),standardReport},makeMapStats=function(stats){return new Map(Object.keys(stats).map((function(key){return[key,stats[key]]})))};if(arguments.length>=2){var successCallbackWrapper_=function(response){onSucc(makeMapStats(fixChromeStats_(response)))};return origGetStats.apply(this,[successCallbackWrapper_,selector])}return new Promise((function(resolve,reject){origGetStats.apply(_this5,[function(response){resolve(makeMapStats(fixChromeStats_(response)))},reject])})).then(onSucc,onErr)}},exports.shimSenderReceiverGetStats=function(window){if(!("object"===(void 0===window?"undefined":_typeof(window))&&window.RTCPeerConnection&&window.RTCRtpSender&&window.RTCRtpReceiver))return;if(!("getStats"in window.RTCRtpSender.prototype)){var origGetSenders=window.RTCPeerConnection.prototype.getSenders;origGetSenders&&(window.RTCPeerConnection.prototype.getSenders=function(){var _this6=this,senders=origGetSenders.apply(this,[]);return senders.forEach((function(sender){return sender._pc=_this6})),senders});var origAddTrack=window.RTCPeerConnection.prototype.addTrack;origAddTrack&&(window.RTCPeerConnection.prototype.addTrack=function(){var sender=origAddTrack.apply(this,arguments);return sender._pc=this,sender}),window.RTCRtpSender.prototype.getStats=function(){var sender=this;return this._pc.getStats().then((function(result){return utils.filterStats(result,sender.track,!0)}))}}if(!("getStats"in window.RTCRtpReceiver.prototype)){var origGetReceivers=window.RTCPeerConnection.prototype.getReceivers;origGetReceivers&&(window.RTCPeerConnection.prototype.getReceivers=function(){var _this7=this,receivers=origGetReceivers.apply(this,[]);return receivers.forEach((function(receiver){return receiver._pc=_this7})),receivers}),utils.wrapPeerConnectionEvent(window,"track",(function(e){return e.receiver._pc=e.srcElement,e})),window.RTCRtpReceiver.prototype.getStats=function(){var receiver=this;return this._pc.getStats().then((function(result){return utils.filterStats(result,receiver.track,!1)}))}}if(!("getStats"in window.RTCRtpSender.prototype)||!("getStats"in window.RTCRtpReceiver.prototype))return;var origGetStats=window.RTCPeerConnection.prototype.getStats;window.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof window.MediaStreamTrack){var track=arguments[0],sender=void 0,receiver=void 0,err=void 0;return this.getSenders().forEach((function(s){s.track===track&&(sender?err=!0:sender=s)})),this.getReceivers().forEach((function(r){return r.track===track&&(receiver?err=!0:receiver=r),r.track===track})),err||sender&&receiver?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):sender?sender.getStats():receiver?receiver.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return origGetStats.apply(this,arguments)}},exports.shimAddTrackRemoveTrackWithNative=shimAddTrackRemoveTrackWithNative,exports.shimAddTrackRemoveTrack=function(window,browserDetails){if(!window.RTCPeerConnection)return;if(window.RTCPeerConnection.prototype.addTrack&&browserDetails.version>=65)return shimAddTrackRemoveTrackWithNative(window);var origGetLocalStreams=window.RTCPeerConnection.prototype.getLocalStreams;window.RTCPeerConnection.prototype.getLocalStreams=function(){var _this11=this,nativeStreams=origGetLocalStreams.apply(this);return this._reverseStreams=this._reverseStreams||{},nativeStreams.map((function(stream){return _this11._reverseStreams[stream.id]}))};var origAddStream=window.RTCPeerConnection.prototype.addStream;window.RTCPeerConnection.prototype.addStream=function(stream){var _this12=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},stream.getTracks().forEach((function(track){if(_this12.getSenders().find((function(s){return s.track===track})))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[stream.id]){var newStream=new window.MediaStream(stream.getTracks());this._streams[stream.id]=newStream,this._reverseStreams[newStream.id]=stream,stream=newStream}origAddStream.apply(this,[stream])};var origRemoveStream=window.RTCPeerConnection.prototype.removeStream;function replaceInternalStreamId(pc,description){var sdp=description.sdp;return Object.keys(pc._reverseStreams||[]).forEach((function(internalId){var externalStream=pc._reverseStreams[internalId],internalStream=pc._streams[externalStream.id];sdp=sdp.replace(new RegExp(internalStream.id,"g"),externalStream.id)})),new RTCSessionDescription({type:description.type,sdp:sdp})}function replaceExternalStreamId(pc,description){var sdp=description.sdp;return Object.keys(pc._reverseStreams||[]).forEach((function(internalId){var externalStream=pc._reverseStreams[internalId],internalStream=pc._streams[externalStream.id];sdp=sdp.replace(new RegExp(externalStream.id,"g"),internalStream.id)})),new RTCSessionDescription({type:description.type,sdp:sdp})}window.RTCPeerConnection.prototype.removeStream=function(stream){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},origRemoveStream.apply(this,[this._streams[stream.id]||stream]),delete this._reverseStreams[this._streams[stream.id]?this._streams[stream.id].id:stream.id],delete this._streams[stream.id]},window.RTCPeerConnection.prototype.addTrack=function(track,stream){var _this13=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var streams=[].slice.call(arguments,1);if(1!==streams.length||!streams[0].getTracks().find((function(t){return t===track})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var alreadyExists=this.getSenders().find((function(s){return s.track===track}));if(alreadyExists)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var oldStream=this._streams[stream.id];if(oldStream)oldStream.addTrack(track),Promise.resolve().then((function(){_this13.dispatchEvent(new Event("negotiationneeded"))}));else{var newStream=new window.MediaStream([track]);this._streams[stream.id]=newStream,this._reverseStreams[newStream.id]=stream,this.addStream(newStream)}return this.getSenders().find((function(s){return s.track===track}))},["createOffer","createAnswer"].forEach((function(method){var nativeMethod=window.RTCPeerConnection.prototype[method],methodObj=_defineProperty({},method,(function(){var _this14=this,args=arguments,isLegacyCall=arguments.length&&"function"==typeof arguments[0];return isLegacyCall?nativeMethod.apply(this,[function(description){var desc=replaceInternalStreamId(_this14,description);args[0].apply(null,[desc])},function(err){args[1]&&args[1].apply(null,err)},arguments[2]]):nativeMethod.apply(this,arguments).then((function(description){return replaceInternalStreamId(_this14,description)}))}));window.RTCPeerConnection.prototype[method]=methodObj[method]}));var origSetLocalDescription=window.RTCPeerConnection.prototype.setLocalDescription;window.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=replaceExternalStreamId(this,arguments[0]),origSetLocalDescription.apply(this,arguments)):origSetLocalDescription.apply(this,arguments)};var origLocalDescription=Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(window.RTCPeerConnection.prototype,"localDescription",{get:function(){var description=origLocalDescription.get.apply(this);return""===description.type?description:replaceInternalStreamId(this,description)}}),window.RTCPeerConnection.prototype.removeTrack=function(sender){var _this15=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!sender._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(sender._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var stream=void 0;Object.keys(this._streams).forEach((function(streamid){_this15._streams[streamid].getTracks().find((function(track){return sender.track===track}))&&(stream=_this15._streams[streamid])})),stream&&(1===stream.getTracks().length?this.removeStream(this._reverseStreams[stream.id]):stream.removeTrack(sender.track),this.dispatchEvent(new Event("negotiationneeded")))}},exports.shimPeerConnection=function(window,browserDetails){!window.RTCPeerConnection&&window.webkitRTCPeerConnection&&(window.RTCPeerConnection=window.webkitRTCPeerConnection);if(!window.RTCPeerConnection)return;browserDetails.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(method){var nativeMethod=window.RTCPeerConnection.prototype[method],methodObj=_defineProperty({},method,(function(){return arguments[0]=new("addIceCandidate"===method?window.RTCIceCandidate:window.RTCSessionDescription)(arguments[0]),nativeMethod.apply(this,arguments)}));window.RTCPeerConnection.prototype[method]=methodObj[method]}))},exports.fixNegotiationNeeded=function(window,browserDetails){utils.wrapPeerConnectionEvent(window,"negotiationneeded",(function(e){var pc=e.target;if(!(browserDetails.version<72||pc.getConfiguration&&"plan-b"===pc.getConfiguration().sdpSemantics)||"stable"===pc.signalingState)return e}))};var utils=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(require("../utils.js"));function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function shimAddTrackRemoveTrackWithNative(window){window.RTCPeerConnection.prototype.getLocalStreams=function(){var _this8=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(streamId){return _this8._shimmedLocalStreams[streamId][0]}))};var origAddTrack=window.RTCPeerConnection.prototype.addTrack;window.RTCPeerConnection.prototype.addTrack=function(track,stream){if(!stream)return origAddTrack.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var sender=origAddTrack.apply(this,arguments);return this._shimmedLocalStreams[stream.id]?-1===this._shimmedLocalStreams[stream.id].indexOf(sender)&&this._shimmedLocalStreams[stream.id].push(sender):this._shimmedLocalStreams[stream.id]=[stream,sender],sender};var origAddStream=window.RTCPeerConnection.prototype.addStream;window.RTCPeerConnection.prototype.addStream=function(stream){var _this9=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},stream.getTracks().forEach((function(track){if(_this9.getSenders().find((function(s){return s.track===track})))throw new DOMException("Track already exists.","InvalidAccessError")}));var existingSenders=this.getSenders();origAddStream.apply(this,arguments);var newSenders=this.getSenders().filter((function(newSender){return-1===existingSenders.indexOf(newSender)}));this._shimmedLocalStreams[stream.id]=[stream].concat(newSenders)};var origRemoveStream=window.RTCPeerConnection.prototype.removeStream;window.RTCPeerConnection.prototype.removeStream=function(stream){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[stream.id],origRemoveStream.apply(this,arguments)};var origRemoveTrack=window.RTCPeerConnection.prototype.removeTrack;window.RTCPeerConnection.prototype.removeTrack=function(sender){var _this10=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},sender&&Object.keys(this._shimmedLocalStreams).forEach((function(streamId){var idx=_this10._shimmedLocalStreams[streamId].indexOf(sender);-1!==idx&&_this10._shimmedLocalStreams[streamId].splice(idx,1),1===_this10._shimmedLocalStreams[streamId].length&&delete _this10._shimmedLocalStreams[streamId]})),origRemoveTrack.apply(this,arguments)}}},{"../utils.js":11,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.shimGetDisplayMedia=function(window,getSourceId){if(window.navigator.mediaDevices&&"getDisplayMedia"in window.navigator.mediaDevices)return;if(!window.navigator.mediaDevices)return;if("function"!=typeof getSourceId)return void console.error("shimGetDisplayMedia: getSourceId argument is not a function");window.navigator.mediaDevices.getDisplayMedia=function(constraints){return getSourceId(constraints).then((function(sourceId){var widthSpecified=constraints.video&&constraints.video.width,heightSpecified=constraints.video&&constraints.video.height,frameRateSpecified=constraints.video&&constraints.video.frameRate;return constraints.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:sourceId,maxFrameRate:frameRateSpecified||3}},widthSpecified&&(constraints.video.mandatory.maxWidth=widthSpecified),heightSpecified&&(constraints.video.mandatory.maxHeight=heightSpecified),window.navigator.mediaDevices.getUserMedia(constraints)}))}}},{}],5:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.shimGetUserMedia=function(window,browserDetails){var navigator=window&&window.navigator;if(!navigator.mediaDevices)return;var constraintsToChrome_=function(c){if("object"!==(void 0===c?"undefined":_typeof(c))||c.mandatory||c.optional)return c;var cc={};return Object.keys(c).forEach((function(key){if("require"!==key&&"advanced"!==key&&"mediaSource"!==key){var r="object"===_typeof(c[key])?c[key]:{ideal:c[key]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var oldname_=function(prefix,name){return prefix?prefix+name.charAt(0).toUpperCase()+name.slice(1):"deviceId"===name?"sourceId":name};if(void 0!==r.ideal){cc.optional=cc.optional||[];var oc={};"number"==typeof r.ideal?(oc[oldname_("min",key)]=r.ideal,cc.optional.push(oc),(oc={})[oldname_("max",key)]=r.ideal,cc.optional.push(oc)):(oc[oldname_("",key)]=r.ideal,cc.optional.push(oc))}void 0!==r.exact&&"number"!=typeof r.exact?(cc.mandatory=cc.mandatory||{},cc.mandatory[oldname_("",key)]=r.exact):["min","max"].forEach((function(mix){void 0!==r[mix]&&(cc.mandatory=cc.mandatory||{},cc.mandatory[oldname_(mix,key)]=r[mix])}))}})),c.advanced&&(cc.optional=(cc.optional||[]).concat(c.advanced)),cc},shimConstraints_=function(constraints,func){if(browserDetails.version>=61)return func(constraints);if((constraints=JSON.parse(JSON.stringify(constraints)))&&"object"===_typeof(constraints.audio)){var remap=function(obj,a,b){a in obj&&!(b in obj)&&(obj[b]=obj[a],delete obj[a])};remap((constraints=JSON.parse(JSON.stringify(constraints))).audio,"autoGainControl","googAutoGainControl"),remap(constraints.audio,"noiseSuppression","googNoiseSuppression"),constraints.audio=constraintsToChrome_(constraints.audio)}if(constraints&&"object"===_typeof(constraints.video)){var face=constraints.video.facingMode;face=face&&("object"===(void 0===face?"undefined":_typeof(face))?face:{ideal:face});var getSupportedFacingModeLies=browserDetails.version<66;if(face&&("user"===face.exact||"environment"===face.exact||"user"===face.ideal||"environment"===face.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode||getSupportedFacingModeLies)){delete constraints.video.facingMode;var matches=void 0;if("environment"===face.exact||"environment"===face.ideal?matches=["back","rear"]:"user"!==face.exact&&"user"!==face.ideal||(matches=["front"]),matches)return navigator.mediaDevices.enumerateDevices().then((function(devices){var dev=(devices=devices.filter((function(d){return"videoinput"===d.kind}))).find((function(d){return matches.some((function(match){return d.label.toLowerCase().includes(match)}))}));return!dev&&devices.length&&matches.includes("back")&&(dev=devices[devices.length-1]),dev&&(constraints.video.deviceId=face.exact?{exact:dev.deviceId}:{ideal:dev.deviceId}),constraints.video=constraintsToChrome_(constraints.video),logging("chrome: "+JSON.stringify(constraints)),func(constraints)}))}constraints.video=constraintsToChrome_(constraints.video)}return logging("chrome: "+JSON.stringify(constraints)),func(constraints)},shimError_=function(e){return browserDetails.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(navigator.getUserMedia=function(constraints,onSuccess,onError){shimConstraints_(constraints,(function(c){navigator.webkitGetUserMedia(c,onSuccess,(function(e){onError&&onError(shimError_(e))}))}))}.bind(navigator),navigator.mediaDevices.getUserMedia){var origGetUserMedia=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(cs){return shimConstraints_(cs,(function(c){return origGetUserMedia(c).then((function(stream){if(c.audio&&!stream.getAudioTracks().length||c.video&&!stream.getVideoTracks().length)throw stream.getTracks().forEach((function(track){track.stop()})),new DOMException("","NotFoundError");return stream}),(function(e){return Promise.reject(shimError_(e))}))}))}}};var logging=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(require("../utils.js")).log},{"../utils.js":11}],6:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.shimRTCIceCandidate=function(window){if(!window.RTCIceCandidate||window.RTCIceCandidate&&"foundation"in window.RTCIceCandidate.prototype)return;var NativeRTCIceCandidate=window.RTCIceCandidate;window.RTCIceCandidate=function(args){if("object"===(void 0===args?"undefined":_typeof(args))&&args.candidate&&0===args.candidate.indexOf("a=")&&((args=JSON.parse(JSON.stringify(args))).candidate=args.candidate.substr(2)),args.candidate&&args.candidate.length){var nativeCandidate=new NativeRTCIceCandidate(args),parsedCandidate=_sdp2.default.parseCandidate(args.candidate),augmentedCandidate=Object.assign(nativeCandidate,parsedCandidate);return augmentedCandidate.toJSON=function(){return{candidate:augmentedCandidate.candidate,sdpMid:augmentedCandidate.sdpMid,sdpMLineIndex:augmentedCandidate.sdpMLineIndex,usernameFragment:augmentedCandidate.usernameFragment}},augmentedCandidate}return new NativeRTCIceCandidate(args)},window.RTCIceCandidate.prototype=NativeRTCIceCandidate.prototype,utils.wrapPeerConnectionEvent(window,"icecandidate",(function(e){return e.candidate&&Object.defineProperty(e,"candidate",{value:new window.RTCIceCandidate(e.candidate),writable:"false"}),e}))},exports.shimMaxMessageSize=function(window,browserDetails){if(!window.RTCPeerConnection)return;"sctp"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var sctpInDescription=function(description){if(!description||!description.sdp)return!1;var sections=_sdp2.default.splitSections(description.sdp);return sections.shift(),sections.some((function(mediaSection){var mLine=_sdp2.default.parseMLine(mediaSection);return mLine&&"application"===mLine.kind&&-1!==mLine.protocol.indexOf("SCTP")}))},getRemoteFirefoxVersion=function(description){var match=description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===match||match.length<2)return-1;var version=parseInt(match[1],10);return version!=version?-1:version},getCanSendMaxMessageSize=function(remoteIsFirefox){var canSendMaxMessageSize=65536;return"firefox"===browserDetails.browser&&(canSendMaxMessageSize=browserDetails.version<57?-1===remoteIsFirefox?16384:2147483637:browserDetails.version<60?57===browserDetails.version?65535:65536:2147483637),canSendMaxMessageSize},getMaxMessageSize=function(description,remoteIsFirefox){var maxMessageSize=65536;"firefox"===browserDetails.browser&&57===browserDetails.version&&(maxMessageSize=65535);var match=_sdp2.default.matchPrefix(description.sdp,"a=max-message-size:");return match.length>0?maxMessageSize=parseInt(match[0].substr(19),10):"firefox"===browserDetails.browser&&-1!==remoteIsFirefox&&(maxMessageSize=2147483637),maxMessageSize},origSetRemoteDescription=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===browserDetails.browser&&browserDetails.version>=76){var _getConfiguration=this.getConfiguration(),sdpSemantics=_getConfiguration.sdpSemantics;"plan-b"===sdpSemantics&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(sctpInDescription(arguments[0])){var isFirefox=getRemoteFirefoxVersion(arguments[0]),canSendMMS=getCanSendMaxMessageSize(isFirefox),remoteMMS=getMaxMessageSize(arguments[0],isFirefox),maxMessageSize=void 0;maxMessageSize=0===canSendMMS&&0===remoteMMS?Number.POSITIVE_INFINITY:0===canSendMMS||0===remoteMMS?Math.max(canSendMMS,remoteMMS):Math.min(canSendMMS,remoteMMS);var sctp={};Object.defineProperty(sctp,"maxMessageSize",{get:function(){return maxMessageSize}}),this._sctp=sctp}return origSetRemoteDescription.apply(this,arguments)}},exports.shimSendThrowTypeError=function(window){if(!window.RTCPeerConnection||!("createDataChannel"in window.RTCPeerConnection.prototype))return;function wrapDcSend(dc,pc){var origDataChannelSend=dc.send;dc.send=function(){var data=arguments[0],length=data.length||data.size||data.byteLength;if("open"===dc.readyState&&pc.sctp&&length>pc.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+pc.sctp.maxMessageSize+" bytes)");return origDataChannelSend.apply(dc,arguments)}}var origCreateDataChannel=window.RTCPeerConnection.prototype.createDataChannel;window.RTCPeerConnection.prototype.createDataChannel=function(){var dataChannel=origCreateDataChannel.apply(this,arguments);return wrapDcSend(dataChannel,this),dataChannel},utils.wrapPeerConnectionEvent(window,"datachannel",(function(e){return wrapDcSend(e.channel,e.target),e}))},exports.shimConnectionState=function(window){if(!window.RTCPeerConnection||"connectionState"in window.RTCPeerConnection.prototype)return;var proto=window.RTCPeerConnection.prototype;Object.defineProperty(proto,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(proto,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(cb){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),cb&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=cb)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((function(method){var origMethod=proto[method];proto[method]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var pc=e.target;if(pc._lastConnectionState!==pc.connectionState){pc._lastConnectionState=pc.connectionState;var newEvent=new Event("connectionstatechange",e);pc.dispatchEvent(newEvent)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),origMethod.apply(this,arguments)}}))},exports.removeExtmapAllowMixed=function(window,browserDetails){if(!window.RTCPeerConnection)return;if("chrome"===browserDetails.browser&&browserDetails.version>=71)return;if("safari"===browserDetails.browser&&browserDetails.version>=605)return;var nativeSRD=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function(desc){if(desc&&desc.sdp&&-1!==desc.sdp.indexOf("\na=extmap-allow-mixed")){var sdp=desc.sdp.split("\n").filter((function(line){return"a=extmap-allow-mixed"!==line.trim()})).join("\n");window.RTCSessionDescription&&desc instanceof window.RTCSessionDescription?arguments[0]=new window.RTCSessionDescription({type:desc.type,sdp:sdp}):desc.sdp=sdp}return nativeSRD.apply(this,arguments)}},exports.shimAddIceCandidateNullOrEmpty=function(window,browserDetails){if(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype)return;var nativeAddIceCandidate=window.RTCPeerConnection.prototype.addIceCandidate;if(!nativeAddIceCandidate||0===nativeAddIceCandidate.length)return;window.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===browserDetails.browser&&browserDetails.version<78||"firefox"===browserDetails.browser&&browserDetails.version<68||"safari"===browserDetails.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():nativeAddIceCandidate.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}};var obj,_sdp=require("sdp"),_sdp2=(obj=_sdp)&&obj.__esModule?obj:{default:obj},utils=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(require("./utils"))},{"./utils":11,sdp:12}],7:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.shimGetDisplayMedia=exports.shimGetUserMedia=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_getusermedia=require("./getusermedia");Object.defineProperty(exports,"shimGetUserMedia",{enumerable:!0,get:function(){return _getusermedia.shimGetUserMedia}});var _getdisplaymedia=require("./getdisplaymedia");Object.defineProperty(exports,"shimGetDisplayMedia",{enumerable:!0,get:function(){return _getdisplaymedia.shimGetDisplayMedia}}),exports.shimOnTrack=function(window){"object"===(void 0===window?"undefined":_typeof(window))&&window.RTCTrackEvent&&"receiver"in window.RTCTrackEvent.prototype&&!("transceiver"in window.RTCTrackEvent.prototype)&&Object.defineProperty(window.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},exports.shimPeerConnection=function(window,browserDetails){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection&&!window.mozRTCPeerConnection)return;!window.RTCPeerConnection&&window.mozRTCPeerConnection&&(window.RTCPeerConnection=window.mozRTCPeerConnection);browserDetails.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(method){var nativeMethod=window.RTCPeerConnection.prototype[method],methodObj=function(obj,key,value){key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value;return obj}({},method,(function(){return arguments[0]=new("addIceCandidate"===method?window.RTCIceCandidate:window.RTCSessionDescription)(arguments[0]),nativeMethod.apply(this,arguments)}));window.RTCPeerConnection.prototype[method]=methodObj[method]}));var modernStatsTypes={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},nativeGetStats=window.RTCPeerConnection.prototype.getStats;window.RTCPeerConnection.prototype.getStats=function(){var _arguments=Array.prototype.slice.call(arguments),selector=_arguments[0],onSucc=_arguments[1],onErr=_arguments[2];return nativeGetStats.apply(this,[selector||null]).then((function(stats){if(browserDetails.version<53&&!onSucc)try{stats.forEach((function(stat){stat.type=modernStatsTypes[stat.type]||stat.type}))}catch(e){if("TypeError"!==e.name)throw e;stats.forEach((function(stat,i){stats.set(i,Object.assign({},stat,{type:modernStatsTypes[stat.type]||stat.type}))}))}return stats})).then(onSucc,onErr)}},exports.shimSenderGetStats=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection||!window.RTCRtpSender)return;if(window.RTCRtpSender&&"getStats"in window.RTCRtpSender.prototype)return;var origGetSenders=window.RTCPeerConnection.prototype.getSenders;origGetSenders&&(window.RTCPeerConnection.prototype.getSenders=function(){var _this=this,senders=origGetSenders.apply(this,[]);return senders.forEach((function(sender){return sender._pc=_this})),senders});var origAddTrack=window.RTCPeerConnection.prototype.addTrack;origAddTrack&&(window.RTCPeerConnection.prototype.addTrack=function(){var sender=origAddTrack.apply(this,arguments);return sender._pc=this,sender});window.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}},exports.shimReceiverGetStats=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection||!window.RTCRtpSender)return;if(window.RTCRtpSender&&"getStats"in window.RTCRtpReceiver.prototype)return;var origGetReceivers=window.RTCPeerConnection.prototype.getReceivers;origGetReceivers&&(window.RTCPeerConnection.prototype.getReceivers=function(){var _this2=this,receivers=origGetReceivers.apply(this,[]);return receivers.forEach((function(receiver){return receiver._pc=_this2})),receivers});utils.wrapPeerConnectionEvent(window,"track",(function(e){return e.receiver._pc=e.srcElement,e})),window.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}},exports.shimRemoveStream=function(window){if(!window.RTCPeerConnection||"removeStream"in window.RTCPeerConnection.prototype)return;window.RTCPeerConnection.prototype.removeStream=function(stream){var _this3=this;utils.deprecated("removeStream","removeTrack"),this.getSenders().forEach((function(sender){sender.track&&stream.getTracks().includes(sender.track)&&_this3.removeTrack(sender)}))}},exports.shimRTCDataChannel=function(window){window.DataChannel&&!window.RTCDataChannel&&(window.RTCDataChannel=window.DataChannel)},exports.shimAddTransceiver=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection)return;var origAddTransceiver=window.RTCPeerConnection.prototype.addTransceiver;origAddTransceiver&&(window.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var initParameters=arguments[1],shouldPerformCheck=initParameters&&"sendEncodings"in initParameters;shouldPerformCheck&&initParameters.sendEncodings.forEach((function(encodingParam){if("rid"in encodingParam){if(!/^[a-z0-9]{0,16}$/i.test(encodingParam.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in encodingParam&&!(parseFloat(encodingParam.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in encodingParam&&!(parseFloat(encodingParam.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));var transceiver=origAddTransceiver.apply(this,arguments);if(shouldPerformCheck){var sender=transceiver.sender,params=sender.getParameters();(!("encodings"in params)||1===params.encodings.length&&0===Object.keys(params.encodings[0]).length)&&(params.encodings=initParameters.sendEncodings,sender.sendEncodings=initParameters.sendEncodings,this.setParametersPromises.push(sender.setParameters(params).then((function(){delete sender.sendEncodings})).catch((function(){delete sender.sendEncodings}))))}return transceiver})},exports.shimGetParameters=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCRtpSender)return;var origGetParameters=window.RTCRtpSender.prototype.getParameters;origGetParameters&&(window.RTCRtpSender.prototype.getParameters=function(){var params=origGetParameters.apply(this,arguments);return"encodings"in params||(params.encodings=[].concat(this.sendEncodings||[{}])),params})},exports.shimCreateOffer=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection)return;var origCreateOffer=window.RTCPeerConnection.prototype.createOffer;window.RTCPeerConnection.prototype.createOffer=function(){var _this4=this,_arguments2=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return origCreateOffer.apply(_this4,_arguments2)})).finally((function(){_this4.setParametersPromises=[]})):origCreateOffer.apply(this,arguments)}},exports.shimCreateAnswer=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection)return;var origCreateAnswer=window.RTCPeerConnection.prototype.createAnswer;window.RTCPeerConnection.prototype.createAnswer=function(){var _this5=this,_arguments3=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return origCreateAnswer.apply(_this5,_arguments3)})).finally((function(){_this5.setParametersPromises=[]})):origCreateAnswer.apply(this,arguments)}};var utils=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(require("../utils"))},{"../utils":11,"./getdisplaymedia":8,"./getusermedia":9}],8:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.shimGetDisplayMedia=function(window,preferredMediaSource){if(window.navigator.mediaDevices&&"getDisplayMedia"in window.navigator.mediaDevices)return;if(!window.navigator.mediaDevices)return;window.navigator.mediaDevices.getDisplayMedia=function(constraints){if(!constraints||!constraints.video){var err=new DOMException("getDisplayMedia without video constraints is undefined");return err.name="NotFoundError",err.code=8,Promise.reject(err)}return!0===constraints.video?constraints.video={mediaSource:preferredMediaSource}:constraints.video.mediaSource=preferredMediaSource,window.navigator.mediaDevices.getUserMedia(constraints)}}},{}],9:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.shimGetUserMedia=function(window,browserDetails){var navigator=window&&window.navigator,MediaStreamTrack=window&&window.MediaStreamTrack;if(navigator.getUserMedia=function(constraints,onSuccess,onError){utils.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),navigator.mediaDevices.getUserMedia(constraints).then(onSuccess,onError)},!(browserDetails.version>55&&"autoGainControl"in navigator.mediaDevices.getSupportedConstraints())){var remap=function(obj,a,b){a in obj&&!(b in obj)&&(obj[b]=obj[a],delete obj[a])},nativeGetUserMedia=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);if(navigator.mediaDevices.getUserMedia=function(c){return"object"===(void 0===c?"undefined":_typeof(c))&&"object"===_typeof(c.audio)&&(c=JSON.parse(JSON.stringify(c)),remap(c.audio,"autoGainControl","mozAutoGainControl"),remap(c.audio,"noiseSuppression","mozNoiseSuppression")),nativeGetUserMedia(c)},MediaStreamTrack&&MediaStreamTrack.prototype.getSettings){var nativeGetSettings=MediaStreamTrack.prototype.getSettings;MediaStreamTrack.prototype.getSettings=function(){var obj=nativeGetSettings.apply(this,arguments);return remap(obj,"mozAutoGainControl","autoGainControl"),remap(obj,"mozNoiseSuppression","noiseSuppression"),obj}}if(MediaStreamTrack&&MediaStreamTrack.prototype.applyConstraints){var nativeApplyConstraints=MediaStreamTrack.prototype.applyConstraints;MediaStreamTrack.prototype.applyConstraints=function(c){return"audio"===this.kind&&"object"===(void 0===c?"undefined":_typeof(c))&&(c=JSON.parse(JSON.stringify(c)),remap(c,"autoGainControl","mozAutoGainControl"),remap(c,"noiseSuppression","mozNoiseSuppression")),nativeApplyConstraints.apply(this,[c])}}}};var utils=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(require("../utils"))},{"../utils":11}],10:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.shimLocalStreamsAPI=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection)return;"getLocalStreams"in window.RTCPeerConnection.prototype||(window.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams});if(!("addStream"in window.RTCPeerConnection.prototype)){var _addTrack=window.RTCPeerConnection.prototype.addTrack;window.RTCPeerConnection.prototype.addStream=function(stream){var _this=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(stream)||this._localStreams.push(stream),stream.getAudioTracks().forEach((function(track){return _addTrack.call(_this,track,stream)})),stream.getVideoTracks().forEach((function(track){return _addTrack.call(_this,track,stream)}))},window.RTCPeerConnection.prototype.addTrack=function(track){for(var _this2=this,_len=arguments.length,streams=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)streams[_key-1]=arguments[_key];return streams&&streams.forEach((function(stream){_this2._localStreams?_this2._localStreams.includes(stream)||_this2._localStreams.push(stream):_this2._localStreams=[stream]})),_addTrack.apply(this,arguments)}}"removeStream"in window.RTCPeerConnection.prototype||(window.RTCPeerConnection.prototype.removeStream=function(stream){var _this3=this;this._localStreams||(this._localStreams=[]);var index=this._localStreams.indexOf(stream);if(-1!==index){this._localStreams.splice(index,1);var tracks=stream.getTracks();this.getSenders().forEach((function(sender){tracks.includes(sender.track)&&_this3.removeTrack(sender)}))}})},exports.shimRemoteStreamsAPI=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection)return;"getRemoteStreams"in window.RTCPeerConnection.prototype||(window.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]});if(!("onaddstream"in window.RTCPeerConnection.prototype)){Object.defineProperty(window.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(f){var _this4=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=f),this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(stream){if(_this4._remoteStreams||(_this4._remoteStreams=[]),!_this4._remoteStreams.includes(stream)){_this4._remoteStreams.push(stream);var event=new Event("addstream");event.stream=stream,_this4.dispatchEvent(event)}}))})}});var origSetRemoteDescription=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function(){var pc=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(stream){if(pc._remoteStreams||(pc._remoteStreams=[]),!(pc._remoteStreams.indexOf(stream)>=0)){pc._remoteStreams.push(stream);var event=new Event("addstream");event.stream=stream,pc.dispatchEvent(event)}}))}),origSetRemoteDescription.apply(pc,arguments)}}},exports.shimCallbacksAPI=function(window){if("object"!==(void 0===window?"undefined":_typeof(window))||!window.RTCPeerConnection)return;var prototype=window.RTCPeerConnection.prototype,origCreateOffer=prototype.createOffer,origCreateAnswer=prototype.createAnswer,setLocalDescription=prototype.setLocalDescription,setRemoteDescription=prototype.setRemoteDescription,addIceCandidate=prototype.addIceCandidate;prototype.createOffer=function(successCallback,failureCallback){var options=arguments.length>=2?arguments[2]:arguments[0],promise=origCreateOffer.apply(this,[options]);return failureCallback?(promise.then(successCallback,failureCallback),Promise.resolve()):promise},prototype.createAnswer=function(successCallback,failureCallback){var options=arguments.length>=2?arguments[2]:arguments[0],promise=origCreateAnswer.apply(this,[options]);return failureCallback?(promise.then(successCallback,failureCallback),Promise.resolve()):promise};var withCallback=function(description,successCallback,failureCallback){var promise=setLocalDescription.apply(this,[description]);return failureCallback?(promise.then(successCallback,failureCallback),Promise.resolve()):promise};prototype.setLocalDescription=withCallback,withCallback=function(description,successCallback,failureCallback){var promise=setRemoteDescription.apply(this,[description]);return failureCallback?(promise.then(successCallback,failureCallback),Promise.resolve()):promise},prototype.setRemoteDescription=withCallback,withCallback=function(candidate,successCallback,failureCallback){var promise=addIceCandidate.apply(this,[candidate]);return failureCallback?(promise.then(successCallback,failureCallback),Promise.resolve()):promise},prototype.addIceCandidate=withCallback},exports.shimGetUserMedia=function(window){var navigator=window&&window.navigator;if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){var mediaDevices=navigator.mediaDevices,_getUserMedia=mediaDevices.getUserMedia.bind(mediaDevices);navigator.mediaDevices.getUserMedia=function(constraints){return _getUserMedia(shimConstraints(constraints))}}!navigator.getUserMedia&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&(navigator.getUserMedia=function(constraints,cb,errcb){navigator.mediaDevices.getUserMedia(constraints).then(cb,errcb)}.bind(navigator))},exports.shimConstraints=shimConstraints,exports.shimRTCIceServerUrls=function(window){if(!window.RTCPeerConnection)return;var OrigPeerConnection=window.RTCPeerConnection;window.RTCPeerConnection=function(pcConfig,pcConstraints){if(pcConfig&&pcConfig.iceServers){for(var newIceServers=[],i=0;i=pos&&parseInt(match[pos],10)}function isObject(val){return"[object Object]"===Object.prototype.toString.call(val)}function walkStats(stats,base,resultSet){base&&!resultSet.has(base.id)&&(resultSet.set(base.id,base),Object.keys(base).forEach((function(name){name.endsWith("Id")?walkStats(stats,stats.get(base[name]),resultSet):name.endsWith("Ids")&&base[name].forEach((function(id){walkStats(stats,stats.get(id),resultSet)}))})))}},{}],12:[function(require,module,exports){var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},SDPUtils={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};SDPUtils.localCName=SDPUtils.generateIdentifier(),SDPUtils.splitLines=function(blob){return blob.trim().split("\n").map((function(line){return line.trim()}))},SDPUtils.splitSections=function(blob){return blob.split("\nm=").map((function(part,index){return(index>0?"m="+part:part).trim()+"\r\n"}))},SDPUtils.getDescription=function(blob){var sections=SDPUtils.splitSections(blob);return sections&§ions[0]},SDPUtils.getMediaSections=function(blob){var sections=SDPUtils.splitSections(blob);return sections.shift(),sections},SDPUtils.matchPrefix=function(blob,prefix){return SDPUtils.splitLines(blob).filter((function(line){return 0===line.indexOf(prefix)}))},SDPUtils.parseCandidate=function(line){for(var parts=void 0,candidate={foundation:(parts=0===line.indexOf("a=candidate:")?line.substring(12).split(" "):line.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[parts[1]],protocol:parts[2].toLowerCase(),priority:parseInt(parts[3],10),ip:parts[4],address:parts[4],port:parseInt(parts[5],10),type:parts[7]},i=8;i0?parts[0].split("/")[1]:"sendrecv",uri:parts[1]}},SDPUtils.writeExtmap=function(headerExtension){return"a=extmap:"+(headerExtension.id||headerExtension.preferredId)+(headerExtension.direction&&"sendrecv"!==headerExtension.direction?"/"+headerExtension.direction:"")+" "+headerExtension.uri+"\r\n"},SDPUtils.parseFmtp=function(line){for(var parsed={},kv=void 0,parts=line.substr(line.indexOf(" ")+1).split(";"),j=0;j-1?(parts.attribute=line.substr(sp+1,colon-sp-1),parts.value=line.substr(colon+1)):parts.attribute=line.substr(sp+1),parts},SDPUtils.parseSsrcGroup=function(line){var parts=line.substr(13).split(" ");return{semantics:parts.shift(),ssrcs:parts.map((function(ssrc){return parseInt(ssrc,10)}))}},SDPUtils.getMid=function(mediaSection){var mid=SDPUtils.matchPrefix(mediaSection,"a=mid:")[0];if(mid)return mid.substr(6)},SDPUtils.parseFingerprint=function(line){var parts=line.substr(14).split(" ");return{algorithm:parts[0].toLowerCase(),value:parts[1]}},SDPUtils.getDtlsParameters=function(mediaSection,sessionpart){return{role:"auto",fingerprints:SDPUtils.matchPrefix(mediaSection+sessionpart,"a=fingerprint:").map(SDPUtils.parseFingerprint)}},SDPUtils.writeDtlsParameters=function(params,setupType){var sdp="a=setup:"+setupType+"\r\n";return params.fingerprints.forEach((function(fp){sdp+="a=fingerprint:"+fp.algorithm+" "+fp.value+"\r\n"})),sdp},SDPUtils.parseCryptoLine=function(line){var parts=line.substr(9).split(" ");return{tag:parseInt(parts[0],10),cryptoSuite:parts[1],keyParams:parts[2],sessionParams:parts.slice(3)}},SDPUtils.writeCryptoLine=function(parameters){return"a=crypto:"+parameters.tag+" "+parameters.cryptoSuite+" "+("object"===_typeof(parameters.keyParams)?SDPUtils.writeCryptoKeyParams(parameters.keyParams):parameters.keyParams)+(parameters.sessionParams?" "+parameters.sessionParams.join(" "):"")+"\r\n"},SDPUtils.parseCryptoKeyParams=function(keyParams){if(0!==keyParams.indexOf("inline:"))return null;var parts=keyParams.substr(7).split("|");return{keyMethod:"inline",keySalt:parts[0],lifeTime:parts[1],mkiValue:parts[2]?parts[2].split(":")[0]:void 0,mkiLength:parts[2]?parts[2].split(":")[1]:void 0}},SDPUtils.writeCryptoKeyParams=function(keyParams){return keyParams.keyMethod+":"+keyParams.keySalt+(keyParams.lifeTime?"|"+keyParams.lifeTime:"")+(keyParams.mkiValue&&keyParams.mkiLength?"|"+keyParams.mkiValue+":"+keyParams.mkiLength:"")},SDPUtils.getCryptoParameters=function(mediaSection,sessionpart){return SDPUtils.matchPrefix(mediaSection+sessionpart,"a=crypto:").map(SDPUtils.parseCryptoLine)},SDPUtils.getIceParameters=function(mediaSection,sessionpart){var ufrag=SDPUtils.matchPrefix(mediaSection+sessionpart,"a=ice-ufrag:")[0],pwd=SDPUtils.matchPrefix(mediaSection+sessionpart,"a=ice-pwd:")[0];return ufrag&&pwd?{usernameFragment:ufrag.substr(12),password:pwd.substr(10)}:null},SDPUtils.writeIceParameters=function(params){var sdp="a=ice-ufrag:"+params.usernameFragment+"\r\na=ice-pwd:"+params.password+"\r\n";return params.iceLite&&(sdp+="a=ice-lite\r\n"),sdp},SDPUtils.parseRtpParameters=function(mediaSection){for(var description={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},mline=SDPUtils.splitLines(mediaSection)[0].split(" "),i=3;i0?"9":"0",sdp+=" UDP/TLS/RTP/SAVPF ",sdp+=caps.codecs.map((function(codec){return void 0!==codec.preferredPayloadType?codec.preferredPayloadType:codec.payloadType})).join(" ")+"\r\n",sdp+="c=IN IP4 0.0.0.0\r\n",sdp+="a=rtcp:9 IN IP4 0.0.0.0\r\n",caps.codecs.forEach((function(codec){sdp+=SDPUtils.writeRtpMap(codec),sdp+=SDPUtils.writeFmtp(codec),sdp+=SDPUtils.writeRtcpFb(codec)}));var maxptime=0;return caps.codecs.forEach((function(codec){codec.maxptime>maxptime&&(maxptime=codec.maxptime)})),maxptime>0&&(sdp+="a=maxptime:"+maxptime+"\r\n"),caps.headerExtensions&&caps.headerExtensions.forEach((function(extension){sdp+=SDPUtils.writeExtmap(extension)})),sdp},SDPUtils.parseRtpEncodingParameters=function(mediaSection){var encodingParameters=[],description=SDPUtils.parseRtpParameters(mediaSection),hasRed=-1!==description.fecMechanisms.indexOf("RED"),hasUlpfec=-1!==description.fecMechanisms.indexOf("ULPFEC"),ssrcs=SDPUtils.matchPrefix(mediaSection,"a=ssrc:").map((function(line){return SDPUtils.parseSsrcMedia(line)})).filter((function(parts){return"cname"===parts.attribute})),primarySsrc=ssrcs.length>0&&ssrcs[0].ssrc,secondarySsrc=void 0,flows=SDPUtils.matchPrefix(mediaSection,"a=ssrc-group:FID").map((function(line){return line.substr(17).split(" ").map((function(part){return parseInt(part,10)}))}));flows.length>0&&flows[0].length>1&&flows[0][0]===primarySsrc&&(secondarySsrc=flows[0][1]),description.codecs.forEach((function(codec){if("RTX"===codec.name.toUpperCase()&&codec.parameters.apt){var encParam={ssrc:primarySsrc,codecPayloadType:parseInt(codec.parameters.apt,10)};primarySsrc&&secondarySsrc&&(encParam.rtx={ssrc:secondarySsrc}),encodingParameters.push(encParam),hasRed&&((encParam=JSON.parse(JSON.stringify(encParam))).fec={ssrc:primarySsrc,mechanism:hasUlpfec?"red+ulpfec":"red"},encodingParameters.push(encParam))}})),0===encodingParameters.length&&primarySsrc&&encodingParameters.push({ssrc:primarySsrc});var bandwidth=SDPUtils.matchPrefix(mediaSection,"b=");return bandwidth.length&&(bandwidth=0===bandwidth[0].indexOf("b=TIAS:")?parseInt(bandwidth[0].substr(7),10):0===bandwidth[0].indexOf("b=AS:")?1e3*parseInt(bandwidth[0].substr(5),10)*.95-16e3:void 0,encodingParameters.forEach((function(params){params.maxBitrate=bandwidth}))),encodingParameters},SDPUtils.parseRtcpParameters=function(mediaSection){var rtcpParameters={},remoteSsrc=SDPUtils.matchPrefix(mediaSection,"a=ssrc:").map((function(line){return SDPUtils.parseSsrcMedia(line)})).filter((function(obj){return"cname"===obj.attribute}))[0];remoteSsrc&&(rtcpParameters.cname=remoteSsrc.value,rtcpParameters.ssrc=remoteSsrc.ssrc);var rsize=SDPUtils.matchPrefix(mediaSection,"a=rtcp-rsize");rtcpParameters.reducedSize=rsize.length>0,rtcpParameters.compound=0===rsize.length;var mux=SDPUtils.matchPrefix(mediaSection,"a=rtcp-mux");return rtcpParameters.mux=mux.length>0,rtcpParameters},SDPUtils.writeRtcpParameters=function(rtcpParameters){var sdp="";return rtcpParameters.reducedSize&&(sdp+="a=rtcp-rsize\r\n"),rtcpParameters.mux&&(sdp+="a=rtcp-mux\r\n"),void 0!==rtcpParameters.ssrc&&rtcpParameters.cname&&(sdp+="a=ssrc:"+rtcpParameters.ssrc+" cname:"+rtcpParameters.cname+"\r\n"),sdp},SDPUtils.parseMsid=function(mediaSection){var parts=void 0,spec=SDPUtils.matchPrefix(mediaSection,"a=msid:");if(1===spec.length)return{stream:(parts=spec[0].substr(7).split(" "))[0],track:parts[1]};var planB=SDPUtils.matchPrefix(mediaSection,"a=ssrc:").map((function(line){return SDPUtils.parseSsrcMedia(line)})).filter((function(msidParts){return"msid"===msidParts.attribute}));return planB.length>0?{stream:(parts=planB[0].value.split(" "))[0],track:parts[1]}:void 0},SDPUtils.parseSctpDescription=function(mediaSection){var mline=SDPUtils.parseMLine(mediaSection),maxSizeLine=SDPUtils.matchPrefix(mediaSection,"a=max-message-size:"),maxMessageSize=void 0;maxSizeLine.length>0&&(maxMessageSize=parseInt(maxSizeLine[0].substr(19),10)),isNaN(maxMessageSize)&&(maxMessageSize=65536);var sctpPort=SDPUtils.matchPrefix(mediaSection,"a=sctp-port:");if(sctpPort.length>0)return{port:parseInt(sctpPort[0].substr(12),10),protocol:mline.fmt,maxMessageSize:maxMessageSize};var sctpMapLines=SDPUtils.matchPrefix(mediaSection,"a=sctpmap:");if(sctpMapLines.length>0){var parts=sctpMapLines[0].substr(10).split(" ");return{port:parseInt(parts[0],10),protocol:parts[1],maxMessageSize:maxMessageSize}}},SDPUtils.writeSctpDescription=function(media,sctp){var output=[];return output="DTLS/SCTP"!==media.protocol?["m="+media.kind+" 9 "+media.protocol+" "+sctp.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+sctp.port+"\r\n"]:["m="+media.kind+" 9 "+media.protocol+" "+sctp.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+sctp.port+" "+sctp.protocol+" 65535\r\n"],void 0!==sctp.maxMessageSize&&output.push("a=max-message-size:"+sctp.maxMessageSize+"\r\n"),output.join("")},SDPUtils.generateSessionId=function(){return Math.random().toString().substr(2,21)},SDPUtils.writeSessionBoilerplate=function(sessId,sessVer,sessUser){var version=void 0!==sessVer?sessVer:2;return"v=0\r\no="+(sessUser||"thisisadapterortc")+" "+(sessId||SDPUtils.generateSessionId())+" "+version+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},SDPUtils.getDirection=function(mediaSection,sessionpart){for(var lines=SDPUtils.splitLines(mediaSection),i=0;i * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_modal_cancel=_interopRequireDefault(_modal_cancel),_templates=_interopRequireDefault(_templates),_ajax=_interopRequireDefault(_ajax);const SELECTORS_ADD_BLOCK='[data-key="addblock"]';let listenerEventsRegistered=!1;const registerListenerEvents=(pageType,pageLayout,addBlockUrl,subPage)=>{document.addEventListener("click",(e=>{const addBlock=e.target.closest(SELECTORS_ADD_BLOCK);if(addBlock){e.preventDefault();let addBlockModal=null,addBlockModalUrl=null!=addBlockUrl?addBlockUrl:addBlock.dataset.url;buildAddBlockModal().then((modal=>{addBlockModal=modal;const modalBody=renderBlocks(addBlockModalUrl,pageType,pageLayout,subPage);return modal.setBody(modalBody),modal.show(),modalBody})).catch((()=>{addBlockModal.destroy()}))}}))},buildAddBlockModal=()=>_modal_cancel.default.create({title:(0,_str.getString)("addblock")}),renderBlocks=async(addBlockUrl,pageType,pageLayout,subPage)=>{const blocks=await getAddableBlocks(pageType,pageLayout,subPage);return _templates.default.render("core/add_block_body",{blocks:blocks,url:addBlockUrl})},getAddableBlocks=async(pageType,pageLayout,subPage)=>{const request={methodname:"core_block_fetch_addable_blocks",args:{pagecontextid:M.cfg.contextid,pagetype:pageType,pagelayout:pageLayout,subpage:subPage}};return _ajax.default.call([request])[0]};_exports.init=function(pageType,pageLayout){let addBlockUrl=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,subPage=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";listenerEventsRegistered||(registerListenerEvents(pageType,pageLayout,addBlockUrl,subPage),listenerEventsRegistered=!0)}})); /** * Standard Ajax wrapper for Moodle. It calls the central Ajax script, * which can call any existing webservice using the current session. * In addition, it can batch multiple requests and return multiple responses. * * @module core/ajax * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 2.9 */ define("core/ajax",["jquery","core/config","core/log","core/url"],(function($,config,Log,URL){var unloading=!1,requestSuccess=function(responses){var request,response,nosessionupdate,exception=null,i=0;if(responses.error)for(;i2e3?(settings.type="POST",settings.data=ajaxRequestData):url=urlUseGet}return async?$.ajax(url,settings).done(requestSuccess).fail(requestFail):(settings.success=requestSuccess,settings.error=requestFail,$.ajax(url,settings)),promises}}})); define("core/aria",["exports","./local/aria/aria-hidden"],(function(_exports,_ariaHidden){Object.defineProperty(_exports,"__esModule",{value:!0}),Object.defineProperty(_exports,"hide",{enumerable:!0,get:function(){return _ariaHidden.hide}}),Object.defineProperty(_exports,"hideSiblings",{enumerable:!0,get:function(){return _ariaHidden.hideSiblings}}),Object.defineProperty(_exports,"unhide",{enumerable:!0,get:function(){return _ariaHidden.unhide}}),Object.defineProperty(_exports,"unhideSiblings",{enumerable:!0,get:function(){return _ariaHidden.unhideSiblings}})})); /** * Enhance a textarea with auto growing rows to fit the content. * * @module core/auto_rows * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.2 */ define("core/auto_rows",["jquery"],(function($){var SELECTORS_ELEMENT="[data-auto-rows]",EVENTS={ROW_CHANGE:"autorows:rowchange"},changeListener=function(e){var element=$(e.target),minRows=element.data("min-rows"),currentRows=element.attr("rows");void 0===minRows&&element.data("min-rows",currentRows),element.attr("rows",1);var rows=function(element){var currentRows=element.attr("rows"),minRows=element.data("min-rows"),maxRows=element.attr("data-max-rows"),height=element.height(),padding=element.innerHeight()-height,rows=(element[0].scrollHeight-padding)/(height/currentRows);return element.css("height",""),rows=maxRows?maxRows:rows}(element);element.attr("rows",rows),rows!=currentRows&&element.trigger(EVENTS.ROW_CHANGE)};return{init:function(root){$(root).data("auto-rows")?$(root).on("input propertychange",changeListener.bind(this)):$(root).on("input propertychange",SELECTORS_ELEMENT,changeListener.bind(this))},events:EVENTS}})); /* * JavaScript to provide automatic scrolling, e.g. during a drag operation. * * Note: this module is defined statically. It is a singleton. You * can only have one use of it active at any time. However, since this * is usually used in relation to drag-drop, and since you only ever * drag one thing at a time, this is not a problem in practice. * * @module core/autoscroll * @copyright 2016 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.6 */ define("core/autoscroll",["jquery"],(function($){var autoscroll={SCROLL_THRESHOLD:30,SCROLL_FREQUENCY:1e3/60,SCROLL_SPEED:.5,scrollingId:null,scrollAmount:0,callback:null,start:function(callback){$(window).on("mousemove",autoscroll.mouseMove),$(window).on("touchmove",autoscroll.touchMove),autoscroll.callback=callback},stop:function(){$(window).off("mousemove",autoscroll.mouseMove),$(window).off("touchmove",autoscroll.touchMove),null!==autoscroll.scrollingId&&autoscroll.stopScrolling()},touchMove:function(e){for(var i=0;i$(window).height()-autoscroll.SCROLL_THRESHOLD?autoscroll.scrollAmount=Math.min(clientY-($(window).height()-autoscroll.SCROLL_THRESHOLD),autoscroll.SCROLL_THRESHOLD):autoscroll.scrollAmount=0,autoscroll.scrollAmount&&null===autoscroll.scrollingId?autoscroll.startScrolling():autoscroll.scrollAmount||null===autoscroll.scrollingId||autoscroll.stopScrolling()},startScrolling:function(){var maxScroll=$(document).height()-$(window).height();autoscroll.scrollingId=window.setInterval((function(){var y=$(window).scrollTop(),offset=Math.round(autoscroll.scrollAmount*autoscroll.SCROLL_SPEED);if(y+offset<0&&(offset=-y),y+offset>maxScroll&&(offset=maxScroll-y),0!==offset){$(window).scrollTop(y+offset);var realOffset=$(window).scrollTop()-y;0!==realOffset&&autoscroll.callback&&autoscroll.callback(realOffset)}}),autoscroll.SCROLL_FREQUENCY)},stopScrolling:function(){window.clearInterval(autoscroll.scrollingId),autoscroll.scrollingId=null}};return{start:autoscroll.start,stop:autoscroll.stop}})); /** * A timer that will execute a callback with decreasing frequency. Useful for * doing polling on the server without overwhelming it with requests. * * @module core/backoff_timer * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/backoff_timer",(function(){var BackoffTimer=function(callback,backoffFunction){this.callback=callback,this.backOffFunction=backoffFunction};return BackoffTimer.prototype.callback=null,BackoffTimer.prototype.backOffFunction=null,BackoffTimer.prototype.time=null,BackoffTimer.prototype.timeout=null,BackoffTimer.prototype.generateNextTime=function(){var newTime=this.backOffFunction(this.time);return this.time=newTime,newTime},BackoffTimer.prototype.reset=function(){return this.time=null,this.stop(),this},BackoffTimer.prototype.stop=function(){return this.timeout&&(window.clearTimeout(this.timeout),this.timeout=null),this},BackoffTimer.prototype.start=function(){if(!this.timeout){var time=this.generateNextTime();this.timeout=window.setTimeout(function(){this.callback(),this.stop(),this.start()}.bind(this),time)}return this},BackoffTimer.prototype.restart=function(){return this.reset().start()},BackoffTimer.getIncrementalCallback=function(minamount,incrementamount,maxamount,timeoutamount){return function(time){return time?time+incrementamount>maxamount?timeoutamount:time+incrementamount:minamount}},BackoffTimer})); define("core/bulkactions/bulk_action",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default= /** * Base class for defining a bulk action. * * @module core/bulkactions/bulk_action * @copyright 2023 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class{constructor(){var obj,key,value;value=[],(key="selectedItems")in(obj=this)?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}registerListenerEvents(containerElement){containerElement.addEventListener("click",(e=>{e.target.closest(this.getBulkActionTriggerSelector())&&(e.preventDefault(),this.triggerBulkAction())}))}setSelectedItems(selectedItems){this.selectedItems=selectedItems}getBulkActionTriggerSelector(){throw new Error("getBulkActionTriggerSelector() must be implemented in ".concat(this.constructor.name))}triggerBulkAction(){throw new Error("triggerBulkAction() must be implemented in ".concat(this.constructor.name))}renderBulkActionTrigger(){let index=arguments.length>1?arguments[1]:void 0;throw new Error("renderBulkActionTrigger(".concat(arguments.length>0&&void 0!==arguments[0]&&arguments[0],", ").concat(index,") must be implemented in ").concat(this.constructor.name))}},_exports.default})); define("core/bulkactions/bulk_actions",["exports","core/templates","core/str","core/sticky-footer"],(function(_exports,_templates,_str,_stickyFooter){var obj;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj} /** * Base class for defining a bulk actions area within a page. * * @module core/bulkactions/bulk_actions * @copyright 2023 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_templates=(obj=_templates)&&obj.__esModule?obj:{default:obj};const Selectors_stickyFooterContainer="#sticky-footer",Selectors_selectedItemsCountContainer='[data-type="bulkactions"] [data-for="bulkcount"]',Selectors_cancelBulkActionModeElement='[data-type="bulkactions"] [data-action="bulkcancel"]',Selectors_bulkModeContainer='[data-type="bulkactions"]',Selectors_bulkActionsContainer='[data-type="bulkactions"] [data-for="bulktools"]';return _exports.default=class{constructor(){let maxButtons=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(_defineProperty(this,"initialStickyFooterContent",null),_defineProperty(this,"selectedItems",[]),_defineProperty(this,"isBulkActionsModeEnabled",!1),_defineProperty(this,"maxButtons",5),!this.getStickyFooterContainer())throw new Error("Sticky footer not found.");this.initialStickyFooterContent=this.getStickyFooterContainer().innerHTML,maxButtons&&(this.maxButtons=maxButtons),this.registerItemSelectChangeEvent((async()=>{this.selectedItems=this.getSelectedItems(),this.selectedItems.length>0?this.isBulkActionsModeEnabled?await this.updateBulkItemSelection():await this.enableBulkActionsMode():this.disableBulkActionsMode()}))}getBulkActions(){throw new Error("getBulkActions() must be implemented in ".concat(this.constructor.name))}getSelectedItems(){throw new Error("getSelectedItems() must be implemented in ".concat(this.constructor.name))}registerItemSelectChangeEvent(eventHandler){throw new Error("registerItemSelectChangeEvent(".concat(eventHandler,") must be implemented in ").concat(this.constructor.name))}deselectItem(selectedItem){throw new Error("deselectItem(".concat(selectedItem,") must be implemented in ").concat(this.constructor.name))}getStickyFooterContainer(){return document.querySelector(Selectors_stickyFooterContainer)}async enableBulkActionsMode(){(0,_stickyFooter.enableStickyFooter)(),this.getStickyFooterContainer().innerHTML=await this.renderBulkActions();const bulkModeContainer=this.getStickyFooterContainer().querySelector(Selectors_bulkModeContainer),bulkActionsContainer=bulkModeContainer.querySelector(Selectors_bulkActionsContainer);this.getBulkActions().forEach((bulkAction=>{bulkAction.registerListenerEvents(bulkActionsContainer),bulkAction.setSelectedItems(this.selectedItems)})),bulkModeContainer.addEventListener("click",(e=>{e.target.closest(Selectors_cancelBulkActionModeElement)&&(this.selectedItems.forEach((item=>{this.deselectItem(item)})),this.disableBulkActionsMode())})),this.isBulkActionsModeEnabled=!0}disableBulkActionsMode(){this.initialStickyFooterContent.length>0?this.getStickyFooterContainer().innerHTML=this.initialStickyFooterContent:(0,_stickyFooter.disableStickyFooter)(),this.isBulkActionsModeEnabled=!1}async renderBulkActions(){const data={bulkselectioncount:this.selectedItems.length,actions:[],moreactions:[],hasmoreactions:!1},bulkActions=this.getBulkActions(),showMoreButton=bulkActions.length>this.maxButtons;return(await Promise.all(bulkActions.map(((bulkAction,index)=>bulkAction.renderBulkActionTrigger(showMoreButton&&index>=this.maxButtons-1,index))))).forEach(((actionTrigger,index)=>{showMoreButton&&index>=this.maxButtons-1?data.moreactions.push({actiontrigger:actionTrigger}):data.actions.push({actiontrigger:actionTrigger})})),data.hasmoreactions=data.moreactions.length>0,_templates.default.render("core/bulkactions/bulk_actions",data)}async updateBulkItemSelection(){const bulkSelection=await(0,_str.get_string)("bulkselection","core",this.selectedItems.length);document.querySelector(Selectors_selectedItemsCountContainer).innerHTML=bulkSelection}},_exports.default})); /** * Chart axis. * * @module core/chart_axis * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/chart_axis",[],(function(){function Axis(){}return Axis.prototype.POS_DEFAULT=null,Axis.prototype.POS_BOTTOM="bottom",Axis.prototype.POS_LEFT="left",Axis.prototype.POS_RIGHT="right",Axis.prototype.POS_TOP="top",Axis.prototype._label=null,Axis.prototype._labels=null,Axis.prototype._max=null,Axis.prototype._min=null,Axis.prototype._position=null,Axis.prototype._stepSize=null,Axis.prototype.create=function(obj){var s=new Axis;return s.setPosition(obj.position),s.setLabel(obj.label),s.setStepSize(obj.stepSize),s.setMax(obj.max),s.setMin(obj.min),s.setLabels(obj.labels),s},Axis.prototype.getLabel=function(){return this._label},Axis.prototype.getLabels=function(){return this._labels},Axis.prototype.getMax=function(){return this._max},Axis.prototype.getMin=function(){return this._min},Axis.prototype.getPosition=function(){return this._position},Axis.prototype.getStepSize=function(){return this._stepSize},Axis.prototype.setLabel=function(label){this._label=label||null},Axis.prototype.setLabels=function(labels){this._labels=labels||null,null===this._labels||null!==this._stepSize||null!==this._min&&0!==this._min||null!==this._max||(this.setStepSize(1),this.setMin(0),this.setMax(labels.length-1))},Axis.prototype.setMax=function(max){this._max=void 0!==max?max:null},Axis.prototype.setMin=function(min){this._min=void 0!==min?min:null},Axis.prototype.setPosition=function(position){if(position!=this.POS_DEFAULT&&position!=this.POS_BOTTOM&&position!=this.POS_LEFT&&position!=this.POS_RIGHT&&position!=this.POS_TOP)throw new Error("Invalid axis position.");this._position=position},Axis.prototype.setStepSize=function(stepSize){if(null==stepSize)stepSize=null;else{if(isNaN(Number(stepSize)))throw new Error("Value for stepSize is not a number.");stepSize=Number(stepSize)}this._stepSize=stepSize},Axis})); /** * Chart bar. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_bar */ define("core/chart_bar",["core/chart_base"],(function(Base){function Bar(){Base.prototype.constructor.apply(this,arguments)}return Bar.prototype=Object.create(Base.prototype),Bar.prototype._horizontal=!1,Bar.prototype._stacked=!1,Bar.prototype.TYPE="bar",Bar.prototype.create=function(Klass,data){var chart=Base.prototype.create.apply(this,arguments);return chart.setHorizontal(data.horizontal),chart.setStacked(data.stacked),chart},Bar.prototype._setDefaults=function(){Base.prototype._setDefaults.apply(this,arguments);var axis=this.getYAxis(0,!0);axis.setMin(0)},Bar.prototype.getHorizontal=function(){return this._horizontal},Bar.prototype.getStacked=function(){return this._stacked},Bar.prototype.setHorizontal=function(horizontal){var axis=this.getXAxis(0,!0);null===axis.getMin()&&axis.setMin(0),this._horizontal=Boolean(horizontal)},Bar.prototype.setStacked=function(stacked){this._stacked=Boolean(stacked)},Bar})); /** * Chart base. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_base */ define("core/chart_base",["core/chart_series","core/chart_axis"],(function(Series,Axis){function Base(){this._series=[],this._labels=[],this._xaxes=[],this._yaxes=[],this._setDefaults()}return Base.prototype._series=null,Base.prototype._labels=null,Base.prototype._legendOptions=null,Base.prototype._title=null,Base.prototype._xaxes=null,Base.prototype._yaxes=null,Base.prototype.COLORSET=["#f3c300","#875692","#f38400","#a1caf1","#be0032","#c2b280","#7f180d","#008856","#e68fac","#0067a5"],Base.prototype._configColorSet=null,Base.prototype.TYPE=null,Base.prototype.addSeries=function(series){if(this._validateSeries(series),this._series.push(series),null===series.getColor()){var configColorSet=this.getConfigColorSet()||Base.prototype.COLORSET;series.setColor(configColorSet[this._series.length%configColorSet.length])}},Base.prototype.create=function(Klass,data){var Chart=new Klass;return Chart.setConfigColorSet(data.config_colorset),Chart.setLabels(data.labels),Chart.setTitle(data.title),data.legend_options&&Chart.setLegendOptions(data.legend_options),data.series.forEach((function(seriesData){Chart.addSeries(Series.prototype.create(seriesData))})),data.axes.x.forEach((function(axisData,i){Chart.setXAxis(Axis.prototype.create(axisData),i)})),data.axes.y.forEach((function(axisData,i){Chart.setYAxis(Axis.prototype.create(axisData),i)})),Chart},Base.prototype.__getAxis=function(xy,index,createIfNotExists){var axis,axes="x"===xy?this._xaxes:this._yaxes,setAxis=("x"===xy?this.setXAxis:this.setYAxis).bind(this);if(createIfNotExists=void 0!==createIfNotExists&&createIfNotExists,void 0===(axis=axes[index=void 0===index?0:index])){if(!createIfNotExists)throw new Error("Unknown axis.");setAxis(axis=new Axis,index)}return axis},Base.prototype.getConfigColorSet=function(){return this._configColorSet},Base.prototype.getLabels=function(){return this._labels},Base.prototype.getLegendOptions=function(){return this._legendOptions},Base.prototype.getSeries=function(){return this._series},Base.prototype.getTitle=function(){return this._title},Base.prototype.getType=function(){if(!this.TYPE)throw new Error("The TYPE property has not been set.");return this.TYPE},Base.prototype.getXAxes=function(){return this._xaxes},Base.prototype.getXAxis=function(index,createIfNotExists){return this.__getAxis("x",index,createIfNotExists)},Base.prototype.getYAxes=function(){return this._yaxes},Base.prototype.getYAxis=function(index,createIfNotExists){return this.__getAxis("y",index,createIfNotExists)},Base.prototype.setConfigColorSet=function(colorset){this._configColorSet=colorset},Base.prototype._setDefaults=function(){},Base.prototype.setLabels=function(labels){if(labels.length&&this._series.length&&this._series[0].length!=labels.length)throw new Error("Series must match label values.");this._labels=labels},Base.prototype.setLegendOptions=function(legendOptions){if("object"!=typeof legendOptions)throw new Error("Setting legend with non-object value:"+legendOptions);this._legendOptions=legendOptions},Base.prototype.setTitle=function(title){this._title=title},Base.prototype.setXAxis=function(axis,index){index=void 0===index?0:index,this._validateAxis("x",axis,index),this._xaxes[index]=axis},Base.prototype.setYAxis=function(axis,index){index=void 0===index?0:index,this._validateAxis("y",axis,index),this._yaxes[index]=axis},Base.prototype._validateAxis=function(xy,axis,index){if((index=void 0===index?0:index)>0&&void 0===("x"==xy?this._xaxes:this._yaxes)[index-1])throw new Error("Missing "+xy+" axis at index lower than "+index)},Base.prototype._validateSeries=function(series){if(this._series.length&&this._series[0].getCount()!=series.getCount())throw new Error("Series do not have an equal number of values.");if(this._labels.length&&this._labels.length!=series.getCount())throw new Error("Series must match label values.")},Base})); /** * Chart builder. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/chart_builder",["jquery"],(function($){return{make:function(data){var deferred=$.Deferred();return require(["core/chart_"+data.type],(function(Klass){var instance=Klass.prototype.create(Klass,data);deferred.resolve(instance)})),deferred.promise()}}})); /** * Chart line. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_line */ define("core/chart_line",["core/chart_base"],(function(Base){function Line(){Base.prototype.constructor.apply(this,arguments)}return Line.prototype=Object.create(Base.prototype),Line.prototype.TYPE="line",Line.prototype._smooth=!1,Line.prototype.create=function(Klass,data){var chart=Base.prototype.create.apply(this,arguments);return chart.setSmooth(data.smooth),chart},Line.prototype.getSmooth=function(){return this._smooth},Line.prototype.setSmooth=function(smooth){this._smooth=Boolean(smooth)},Line})); /** * Chart output. * * Proxy to the default output module. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/chart_output",["core/chart_output_chartjs"],(function(Output){return Output})); /** * Chart output base. * * This takes a chart object and draws it. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_output_base */ define("core/chart_output_base",["jquery"],(function($){function Base(node,chart){this._node=$(node),this._chart=chart}return Base.prototype.update=function(){throw new Error("Not supported.")},Base})); /** * Chart output for chart.js. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_output_chartjs */ define("core/chart_output_chartjs",["jquery","core/chartjs","core/chart_axis","core/chart_bar","core/chart_output_base","core/chart_line","core/chart_pie","core/chart_series"],(function($,Chartjs,Axis,Bar,Base,Line,Pie,Series){var makeAxisId=function(xy,index){return"axis-"+xy+"-"+index};function Output(){Base.prototype.constructor.apply(this,arguments),this._canvas=this._node,"CANVAS"!=this._canvas.prop("tagName")&&(this._canvas=$(""),this._node.append(this._canvas)),this._build()}return Output.prototype=Object.create(Base.prototype),Output.prototype._config=null,Output.prototype._chartjs=null,Output.prototype._canvas=null,Output.prototype._build=function(){this._config=this._makeConfig(),this._chartjs=new Chartjs(this._canvas[0],this._config)},Output.prototype._cleanData=function(data){return data instanceof Array?data.map((function(value){return $("").html(value).text()})):$("").html(data).text()},Output.prototype._getChartType=function(){var type=this._chart.getType();return this._chart.getType()===Bar.prototype.TYPE&&!0===this._chart.getHorizontal()?type="horizontalBar":this._chart.getType()===Pie.prototype.TYPE&&!0===this._chart.getDoughnut()&&(type="doughnut"),type},Output.prototype._makeAxisConfig=function(axis,xy,index){var scaleData={id:makeAxisId(xy,index)};return axis.getPosition()!==Axis.prototype.POS_DEFAULT&&(scaleData.position=axis.getPosition()),null!==axis.getLabel()&&(scaleData.title={display:!0,text:this._cleanData(axis.getLabel())}),null!==axis.getStepSize()&&(scaleData.ticks=scaleData.ticks||{},scaleData.ticks.stepSize=axis.getStepSize()),null!==axis.getMax()&&(scaleData.ticks=scaleData.ticks||{},scaleData.ticks.max=axis.getMax()),null!==axis.getMin()&&(scaleData.ticks=scaleData.ticks||{},scaleData.ticks.min=axis.getMin()),scaleData},Output.prototype._makeConfig=function(){var charType=this._getChartType(),labels=this._cleanData(this._chart.getLabels()),config={type:charType,data:{labels:labels.map((label=>label.length>25?"".concat(label.substring(0,25),"..."):label)),datasets:this._makeDatasetsConfig()},options:{locale:document.documentElement.getAttribute("lang"),responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:null!==this._chart.getTitle(),text:this._cleanData(this._chart.getTitle())}}}};"horizontalBar"===charType&&(config.type="bar",config.options.indexAxis="y");var legendOptions=this._chart.getLegendOptions();return legendOptions&&(config.options.plugins.legend=legendOptions),this._chart.getXAxes().forEach(function(axis,i){var axisLabels=axis.getLabels();config.options.scales=config.options.scales||{},config.options.scales.x=this._makeAxisConfig(axis,"x",i),null!==axisLabels&&(config.options.scales.x.ticks.callback=function(value,index){return axisLabels[index]||""}),config.options.scales.x.stacked=this._isStacked()}.bind(this)),this._chart.getYAxes().forEach(function(axis,i){var axisLabels=axis.getLabels();config.options.scales=config.options.scales||{},config.options.scales.y=this._makeAxisConfig(axis,"y",i),null!==axisLabels&&(config.options.scales.y.ticks.callback=function(value){return axisLabels[parseInt(value,10)]||""}),config.options.scales.y.stacked=this._isStacked()}.bind(this)),config.options.plugins.tooltip={callbacks:{title:ctx=>labels[ctx[0].dataIndex].match(/.{1,80}/g),label:this._makeTooltip.bind(this)}},config},Output.prototype._makeDatasetsConfig=function(){return this._chart.getSeries().map(function(series){var colors=series.hasColoredValues()?series.getColors():series.getColor(),dataset={label:this._cleanData(series.getLabel()),data:series.getValues(),type:series.getType(),fill:series.getFill(),backgroundColor:colors,borderColor:this._chart.getType()==Pie.prototype.TYPE?"#fff":colors,tension:this._isSmooth(series)?.3:0};return null!==series.getXAxis()&&(dataset.xAxisID=makeAxisId("x",series.getXAxis())),null!==series.getYAxis()&&(dataset.yAxisID=makeAxisId("y",series.getYAxis())),dataset}.bind(this))},Output.prototype._makeTooltip=function(tooltipItem){const formatter=new Intl.NumberFormat(this._config.options.locale);var serieLabel=this._chart.getSeries()[tooltipItem.datasetIndex].getLabel(),chartData=tooltipItem.dataset.data,tooltipData=formatter.format(chartData[tooltipItem.dataIndex]),tooltip=[];if(this._chart.getType()===Pie.prototype.TYPE){var chartLabels=this._cleanData(this._chart.getLabels());tooltip.push(chartLabels[tooltipItem.dataIndex]+" - "+this._cleanData(serieLabel)+": "+tooltipData)}else tooltip.push(this._cleanData(serieLabel)+": "+tooltipData);return tooltip},Output.prototype._isSmooth=function(series){var smooth=!1;return this._chart.getType()===Line.prototype.TYPE?null===(smooth=series.getSmooth())&&(smooth=this._chart.getSmooth()):series.getType()===Series.prototype.TYPE_LINE&&(smooth=series.getSmooth()),smooth},Output.prototype._isStacked=function(){var stacked=!1;return this._chart.getType()===Bar.prototype.TYPE&&(stacked=this._chart.getStacked()),stacked},Output.prototype.update=function(){$.extend(!0,this._config,this._makeConfig()),this._chartjs.update()},Output})); /** * Chart output for HTML table. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_output_htmltable */ define("core/chart_output_htmltable",["jquery","core/chart_output_base"],(function($,Base){function Output(){Base.prototype.constructor.apply(this,arguments),this._build()}return Output.prototype=Object.create(Base.prototype),Output.prototype._build=function(){this._node.empty(),this._node.append(this._makeTable())},Output.prototype._makeTable=function(){var node,value,tbl=$(""),c=this._chart,labels=c.getLabels(),hasLabel=labels.length>0,series=c.getSeries(),rowCount=series[0].getCount();tbl.addClass("chart-output-htmltable generaltable"),null!==c.getTitle()&&tbl.append($(""),hasLabel&&node.append($(" * * */ const copyNodeContentToClipboard=(copyButton,copyTarget)=>(copyTarget.select(),document.execCommand("copy")?(displaySuccessToast(copyButton),!0):(displayFailureToast(),!1)),displaySuccessToast=copyButton=>getSuccessText(copyButton).then((successMessage=>(0,_toast.add)(successMessage,{}))),displayFailureToast=()=>getFailureText().then((message=>(0,_toast.add)(message,{type:"warning"}))),getFailureText=()=>(0,_str.getString)("unabletocopytoclipboard","core"),getSuccessText=copyButton=>copyButton.dataset.clipboardSuccessMessage?Promise.resolve(copyButton.dataset.clipboardSuccessMessage):(0,_str.getString)("textcopiedtoclipboard","core"),getTextFromContainer=container=>container.value?container.value:container.innerText?container.innerText:null;let loaded=!1;loaded||((0,_prefetch.prefetchStrings)("core",["textcopiedtoclipboard","unabletocopytoclipboard"]),document.addEventListener("click",(e=>{const copyButton=e.target.closest('[data-action="copytoclipboard"]');if(!copyButton)return;if(!copyButton.dataset.clipboardTarget)return;const copyTarget=document.querySelector(copyButton.dataset.clipboardTarget);if(!copyTarget)return;e.preventDefault();const textToCopy=getTextFromContainer(copyTarget);if(textToCopy)if(navigator.clipboard)navigator.clipboard.writeText(textToCopy).then((()=>displaySuccessToast(copyButton))).catch();else if(copyTarget instanceof HTMLInputElement||copyTarget instanceof HTMLTextAreaElement)copyTarget.focus(),copyNodeContentToClipboard(copyButton,copyTarget)&©Button.focus();else{const copyRegion=document.createElement("textarea");copyRegion.value=textToCopy,copyRegion.classList.add("visually-hidden"),document.body.appendChild(copyRegion),copyNodeContentToClipboard(copyButton,copyRegion),copyRegion.remove(),copyButton.focus()}else displayFailureToast()})),loaded=!0)})); /** * This module provides a wrapper to encapsulate a lot of the common combinations of * user interaction we use in Moodle. * * @module core/custom_interaction_events * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.2 */ define("core/custom_interaction_events",["jquery","core/key_codes"],(function($,keyCodes){var events={activate:"cie:activate",keyboardActivate:"cie:keyboardactivate",escape:"cie:escape",down:"cie:down",up:"cie:up",home:"cie:home",end:"cie:end",next:"cie:next",previous:"cie:previous",asterix:"cie:asterix",scrollLock:"cie:scrollLock",scrollTop:"cie:scrollTop",scrollBottom:"cie:scrollBottom",ctrlPageUp:"cie:ctrlPageUp",ctrlPageDown:"cie:ctrlPageDown",enter:"cie:enter",accessibleChange:"cie:accessibleChange"},triggeredEvents={},isModifierPressed=function(e){return e.shiftKey||e.metaKey||e.altKey||e.ctrlKey},triggerEvent=function(eventName,e){var eventTypeKey="";return e.hasOwnProperty("originalEvent")?(eventTypeKey="triggeredCustom_"+eventName,e.originalEvent.hasOwnProperty(eventTypeKey)?void 0:(e.originalEvent[eventTypeKey]=!0,void $(e.target).trigger(eventName,[{originalEvent:e}]))):(eventTypeKey=""+eventName+e.type+e.timeStamp,void(triggeredEvents.hasOwnProperty(eventTypeKey)||(triggeredEvents[eventTypeKey]=!0,$(e.target).trigger(eventName,[{originalEvent:e}]))))},addKeyboardEvent=function(element,event,keyCode){element.off("keydown."+event).on("keydown."+event,(function(e){isModifierPressed(e)||e.keyCode==keyCode&&triggerEvent(event,e)}))},addActivateListener=function(element){element.off("click.cie.activate").on("click.cie.activate",(function(e){triggerEvent(events.activate,e)})),element.off("keydown.cie.activate").on("keydown.cie.activate",(function(e){isModifierPressed(e)||e.keyCode!=keyCodes.enter&&e.keyCode!=keyCodes.space||triggerEvent(events.activate,e)}))},addKeyboardActivateListener=function(element){element.off("keydown.cie.keyboardactivate").on("keydown.cie.keyboardactivate",(function(e){isModifierPressed(e)||e.keyCode!=keyCodes.enter&&e.keyCode!=keyCodes.space||triggerEvent(events.keyboardActivate,e)}))},addEscapeListener=function(element){addKeyboardEvent(element,events.escape,keyCodes.escape)},addDownListener=function(element){addKeyboardEvent(element,events.down,keyCodes.arrowDown)},addUpListener=function(element){addKeyboardEvent(element,events.up,keyCodes.arrowUp)},addHomeListener=function(element){addKeyboardEvent(element,events.home,keyCodes.home)},addEndListener=function(element){addKeyboardEvent(element,events.end,keyCodes.end)},addNextListener=function(element){var keyCode="rtl"==$("html").attr("dir")?keyCodes.arrowLeft:keyCodes.arrowRight;addKeyboardEvent(element,events.next,keyCode)},addPreviousListener=function(element){var keyCode="rtl"==$("html").attr("dir")?keyCodes.arrowRight:keyCodes.arrowLeft;addKeyboardEvent(element,events.previous,keyCode)},addAsterixListener=function(element){addKeyboardEvent(element,events.asterix,keyCodes.asterix)},addScrollTopListener=function(element){element.off("scroll.cie.scrollTop").on("scroll.cie.scrollTop",(function(e){0===element.scrollTop()&&triggerEvent(events.scrollTop,e)}))},addScrollBottomListener=function(element){element.off("scroll.cie.scrollBottom").on("scroll.cie.scrollBottom",(function(e){element.scrollTop()+element.innerHeight()>=element[0].scrollHeight&&triggerEvent(events.scrollBottom,e)}))},addScrollLockListener=function(element){element.off("DOMMouseScroll.cie.DOMMouseScrollLock mousewheel.cie.mousewheelLock").on("DOMMouseScroll.cie.DOMMouseScrollLock mousewheel.cie.mousewheelLock",(function(e){var scrollTop=element.scrollTop(),scrollHeight=element[0].scrollHeight,height=element.height(),delta="DOMMouseScroll"==e.type?-40*e.originalEvent.detail:e.originalEvent.wheelDelta,up=delta>0;return!up&&-delta>scrollHeight-height-scrollTop?(element.scrollTop(scrollHeight),e.stopPropagation(),e.preventDefault(),e.returnValue=!1,triggerEvent(events.scrollLock,e),!1):!(up&&delta>scrollTop)||(element.scrollTop(0),e.stopPropagation(),e.preventDefault(),e.returnValue=!1,triggerEvent(events.scrollLock,e),!1)}))},addCtrlPageUpListener=function(element){element.off("keydown.cie.ctrlpageup").on("keydown.cie.ctrlpageup",(function(e){e.ctrlKey&&e.keyCode==keyCodes.pageUp&&triggerEvent(events.ctrlPageUp,e)}))},addCtrlPageDownListener=function(element){element.off("keydown.cie.ctrlpagedown").on("keydown.cie.ctrlpagedown",(function(e){e.ctrlKey&&e.keyCode==keyCodes.pageDown&&triggerEvent(events.ctrlPageDown,e)}))},addEnterListener=function(element){addKeyboardEvent(element,events.enter,keyCodes.enter)},addAccessibleChangeListener=function(element){var onMac=-1!==navigator.userAgent.indexOf("Macintosh"),touchEnabled="ontouchstart"in window||"msMaxTouchPoints"in navigator&&navigator.msMaxTouchPoints>0;if(onMac||touchEnabled)element.on("change",(function(e){triggerEvent(events.accessibleChange,e)}));else{var checkAndTriggerAccessibleChange=function(e){"initValue"in e.target.dataset&&e.target.value!==e.target.dataset.initValue&&(e.target.dataset.initValue=e.target.value,triggerEvent(events.accessibleChange,e))},nativeElement=element.get()[0];nativeElement.addEventListener("focus",(function(e){var target;(target=e.target).dataset.initValue=target.value}),!0),nativeElement.addEventListener("blur",(function(e){checkAndTriggerAccessibleChange(e)}),!0),element.on("keydown",(function(e){var target;e.which===keyCodes.enter?checkAndTriggerAccessibleChange(e):e.which===keyCodes.escape?("initValue"in(target=e.target).dataset&&(target.value=target.dataset.initValue),e.target.dataset.ignoreChange=!0):e.target.dataset.ignoreChange=!0})),element.on("change",(function(e){e.target.dataset.ignoreChange||checkAndTriggerAccessibleChange(e)})),element.on("keyup",(function(e){delete e.target.dataset.ignoreChange})),element.on("click",(function(e){checkAndTriggerAccessibleChange(e)}))}};return{define:function(element,include){var handlers;(element=$(element),include=include||[],element.length&&include.length)&&$.each(((handlers={})[events.activate]=addActivateListener,handlers[events.keyboardActivate]=addKeyboardActivateListener,handlers[events.escape]=addEscapeListener,handlers[events.down]=addDownListener,handlers[events.up]=addUpListener,handlers[events.home]=addHomeListener,handlers[events.end]=addEndListener,handlers[events.next]=addNextListener,handlers[events.previous]=addPreviousListener,handlers[events.asterix]=addAsterixListener,handlers[events.scrollLock]=addScrollLockListener,handlers[events.scrollTop]=addScrollTopListener,handlers[events.scrollBottom]=addScrollBottomListener,handlers[events.ctrlPageUp]=addCtrlPageUpListener,handlers[events.ctrlPageDown]=addCtrlPageDownListener,handlers[events.enter]=addEnterListener,handlers[events.accessibleChange]=addAccessibleChangeListener,handlers),(function(eventType,handler){(function(eventType,include){return!(!(include=include||[]).length||-1===include.indexOf(eventType))})(eventType,include)&&handler(element)}))},events:events}})); define("core/datafilter",["exports","core/datafilter/filtertypes/courseid","core/datafilter/filtertype","core/str","core/notification","core/pending","core/datafilter/selectors","core/templates","core/custom_interaction_events","jquery"],(function(_exports,_courseid,_filtertype,_str,_notification,_pending,_selectors,_templates,_custom_interaction_events,_jquery){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_courseid=_interopRequireDefault(_courseid),_filtertype=_interopRequireDefault(_filtertype),_notification=_interopRequireDefault(_notification),_pending=_interopRequireDefault(_pending),_selectors=_interopRequireDefault(_selectors),_templates=_interopRequireDefault(_templates),_custom_interaction_events=_interopRequireDefault(_custom_interaction_events),_jquery=_interopRequireDefault(_jquery);var _systemImportTransformerGlobalIdentifier="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}return _exports.default=class{constructor(filterSet,applyCallback){this.filterSet=filterSet,this.applyCallback=applyCallback,this.activeFilters={courseid:new _courseid.default("courseid",filterSet)}}init(){this.filterSet.querySelector(_selectors.default.filterset.region).addEventListener("click",(e=>{e.target.closest(_selectors.default.filterset.actions.addRow)&&(e.preventDefault(),this.addFilterRow()),e.target.closest(_selectors.default.filterset.actions.applyFilters)&&(e.preventDefault(),this.updateTableFromFilter()),e.target.closest(_selectors.default.filterset.actions.resetFilters)&&(e.preventDefault(),this.removeAllFilters())})),this.filterSet.querySelector(_selectors.default.filterset.regions.filterlist).addEventListener("click",(e=>{e.target.closest(_selectors.default.filter.actions.remove)&&(e.preventDefault(),this.removeOrReplaceFilterRow(e.target.closest(_selectors.default.filter.region),!0))}));let filterRegion=(0,_jquery.default)(this.getFilterRegion());_custom_interaction_events.default.define(filterRegion,[_custom_interaction_events.default.events.accessibleChange]),filterRegion.on(_custom_interaction_events.default.events.accessibleChange,(e=>{const typeField=e.target.closest(_selectors.default.filter.fields.type);if(typeField&&typeField.value){const filter=e.target.closest(_selectors.default.filter.region);this.addFilter(filter,typeField.value)}})),this.filterSet.querySelector(_selectors.default.filterset.fields.join).addEventListener("change",(e=>{this.filterSet.dataset.filterverb=e.target.value}))}getFilterRegion(){return this.filterSet.querySelector(_selectors.default.filterset.regions.filterlist)}addFilterRow(){var _filterdata$rownum;let filterdata=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const pendingPromise=new _pending.default("core/datafilter:addFilterRow"),rownum=null!==(_filterdata$rownum=filterdata.rownum)&&void 0!==_filterdata$rownum?_filterdata$rownum:1+this.getFilterRegion().querySelectorAll(_selectors.default.filter.region).length;return _templates.default.renderForPromise("core/datafilter/filter_row",{rownumber:rownum}).then((_ref=>{let{html:html,js:js}=_ref;return _templates.default.appendNodeContents(this.getFilterRegion(),html,js)})).then((filterRow=>{const typeList=this.filterSet.querySelector(_selectors.default.data.typeList);return filterRow.forEach((contentNode=>{const contentTypeList=contentNode.querySelector(_selectors.default.filter.fields.type);contentTypeList&&(contentTypeList.innerHTML=typeList.innerHTML)})),filterRow})).then((filterRow=>(this.updateFiltersOptions(),filterRow))).then((result=>(pendingPromise.resolve(),filterdata.filtertype&&result.forEach((filter=>{this.addFilter(filter,filterdata.filtertype,filterdata.values,filterdata.jointype,filterdata.filteroptions)})),result))).catch(_notification.default.exception)}getFilterDataSource(filterType){return this.filterSet.querySelector(_selectors.default.filterset.regions.datasource).querySelector(_selectors.default.data.fields.byName(filterType))}async addFilter(filterRow,filterType,initialFilterValues,filterJoin,filterOptions){filterRow.dataset.filterType=filterType;const filterDataNode=this.getFilterDataSource(filterType);let Filter=_filtertype.default;if(filterDataNode.dataset.filterTypeClass)try{Filter=await("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require([filterDataNode.dataset.filterTypeClass],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require(filterDataNode.dataset.filterTypeClass)):Promise.resolve(_systemImportTransformerGlobalIdentifier[filterDataNode.dataset.filterTypeClass]))}catch(error){_notification.default.exception(error)}this.activeFilters[filterType]=new Filter(filterType,this.filterSet,initialFilterValues,filterOptions);const typeField=filterRow.querySelector(_selectors.default.filter.fields.type);typeField.value=filterType,typeField.disabled="disabled",this.updateJoinList(JSON.parse(filterDataNode.dataset.joinList),filterRow);const joinField=filterRow.querySelector(_selectors.default.filter.fields.join);return isNaN(filterJoin)||(joinField.value=filterJoin),this.updateFiltersOptions(),this.activeFilters[filterType]}getFilterObject(name){return this.activeFilters[name]}removeOrReplaceFilterRow(filterRow,refreshContent){1===this.getFilterRegion().querySelectorAll(_selectors.default.filter.region).length?this.replaceFilterRow(filterRow,refreshContent):this.removeFilterRow(filterRow,refreshContent)}async removeFilterRow(filterRow){let refreshContent=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(filterRow.querySelector(_selectors.default.data.required))return;const hasFilterValue=!!filterRow.querySelector(_selectors.default.filter.fields.type).value;this.removeFilterObject(filterRow.dataset.filterType),filterRow.remove(),this.updateFiltersOptions(),hasFilterValue&&refreshContent&&this.updateTableFromFilter();const filterLegends=await this.getAvailableFilterLegends();this.getFilterRegion().querySelectorAll(_selectors.default.filter.region).forEach(((filterRow,index)=>{filterRow.querySelector("legend").innerText=filterLegends[index]}))}replaceFilterRow(filterRow){let refreshContent=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],rowNum=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(!filterRow.querySelector(_selectors.default.data.required))return this.removeFilterObject(filterRow.dataset.filterType),_templates.default.renderForPromise("core/datafilter/filter_row",{rownumber:rowNum}).then((_ref2=>{let{html:html,js:js}=_ref2;return _templates.default.replaceNode(filterRow,html,js)})).then((filterRow=>{const typeList=this.filterSet.querySelector(_selectors.default.data.typeList);return filterRow.forEach((contentNode=>{const contentTypeList=contentNode.querySelector(_selectors.default.filter.fields.type);contentTypeList&&(contentTypeList.innerHTML=typeList.innerHTML)})),filterRow})).then((filterRow=>(this.updateFiltersOptions(),filterRow))).then((filterRow=>refreshContent?this.updateTableFromFilter():filterRow)).catch(_notification.default.exception)}removeFilterObject(filterName){if(filterName){const filter=this.getFilterObject(filterName);filter&&(filter.tearDown(),delete this.activeFilters[filterName])}}removeAllFilters(){return this.getFilterRegion().querySelectorAll(_selectors.default.filter.region).forEach((filterRow=>this.removeOrReplaceFilterRow(filterRow,!1))),this.updateTableFromFilter()}removeEmptyFilters(){this.getFilterRegion().querySelectorAll(_selectors.default.filter.region).forEach((filterRow=>{filterRow.querySelector(_selectors.default.filter.fields.type).value||this.removeOrReplaceFilterRow(filterRow,!1)}))}updateFiltersOptions(){const filters=this.getFilterRegion().querySelectorAll(_selectors.default.filter.region);filters.forEach((filterRow=>{filterRow.querySelectorAll(_selectors.default.filter.fields.type+" option").forEach((option=>{option.value===filterRow.dataset.filterType?(option.classList.remove("hidden"),option.disabled=!1):this.activeFilters[option.value]?(option.classList.add("hidden"),option.disabled=!0):(option.classList.remove("hidden"),option.disabled=!1)}))}));const addRowButton=this.filterSet.querySelector(_selectors.default.filterset.actions.addRow);this.filterSet.querySelectorAll(_selectors.default.data.fields.all).length<=filters.length?addRowButton.setAttribute("disabled","disabled"):addRowButton.removeAttribute("disabled"),1===filters.length?(this.filterSet.querySelector(_selectors.default.filterset.regions.filtermatch).classList.add("hidden"),this.filterSet.querySelector(_selectors.default.filterset.fields.join).value=2,this.filterSet.dataset.filterverb=2):this.filterSet.querySelector(_selectors.default.filterset.regions.filtermatch).classList.remove("hidden")}updateTableFromFilter(){let validate=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const pendingPromise=new _pending.default("core/datafilter:updateTableFromFilter"),filters={};let valid=!0;Object.values(this.activeFilters).forEach((filter=>{validate&&(valid=valid&&filter.validate()),filters[filter.filterValue.name]=filter.filterValue})),validate&&(valid=valid&&document.querySelector(_selectors.default.filter.region).closest("form").reportValidity()),this.applyCallback&&valid?this.applyCallback(filters,pendingPromise):pendingPromise.resolve()}async getAvailableFilterLegends(){const maxFilters=document.querySelector(_selectors.default.data.typeListSelect).length-1;let requests=[];[...Array(maxFilters)].forEach(((_,rowIndex)=>{requests.push({key:"filterrowlegend",component:"core",param:rowIndex+1})}));return await(0,_str.getStrings)(requests).then((fetchedStrings=>fetchedStrings)).catch(_notification.default.exception)}updateJoinList(filterJoinList,filterRow){const regularJoinList=[0,1,2];if(0!==filterJoinList.length){const joinField=filterRow.querySelector(_selectors.default.filter.fields.join);regularJoinList.forEach((join=>{filterJoinList.includes(join)||(joinField.options[join].classList.add("hidden"),joinField.options[join].disabled=!0)})),joinField.options.forEach(((element,index)=>{element.disabled&&(joinField.options[index]=null)})),1===joinField.options.length&&(joinField.hidden=!0)}}},_exports.default})); define("core/datafilter/filtertype",["exports","core/form-autocomplete","core/datafilter/selectors","core/str","core/notification"],(function(_exports,_formAutocomplete,_selectors,_str,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Base Filter class for a filter type in the filter UI. * * @module core/datafilter/filtertype * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_formAutocomplete=_interopRequireDefault(_formAutocomplete),_selectors=_interopRequireDefault(_selectors),_notification=_interopRequireDefault(_notification);return _exports.default=class{constructor(filterType,rootNode,initialValues){this.filterType=filterType,this.rootNode=rootNode,this.addValueSelector(initialValues).then((()=>{const filterRoot=this.filterRoot;return filterRoot&&filterRoot.querySelector(_selectors.default.data.required)&&filterRoot.querySelector(_selectors.default.filter.actions.remove).remove(),filterRoot})).catch(_notification.default.exception)}tearDown(){}get placeholder(){return(0,_str.getString)("placeholdertypeorselect","core")}get showSuggestions(){return!0}async addValueSelector(){let initialValues=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const filterValueNode=this.getFilterValueNode(),sourceDataNode=this.getSourceDataForFilter();if(!sourceDataNode)throw new Error("No source data for filter.");filterValueNode.innerHTML=sourceDataNode.outerHTML;const dataSource=filterValueNode.querySelector("select");dataSource.id="filter-value-"+dataSource.getAttribute("data-field-name");const filterValueLabel=document.createElement("label");return filterValueLabel.setAttribute("for",dataSource.id),filterValueLabel.classList.add("visually-hidden"),filterValueLabel.innerText=dataSource.getAttribute("data-field-title"),filterValueNode.appendChild(filterValueLabel),initialValues.forEach((filterValue=>{let selectedOption=dataSource.querySelector('option[value="'.concat(filterValue,'"]'));selectedOption?selectedOption.selected=!0:this.showSuggestions||(selectedOption=document.createElement("option"),selectedOption.value=filterValue,selectedOption.innerHTML=filterValue,selectedOption.selected=!0,dataSource.append(selectedOption))})),_formAutocomplete.default.enhance(dataSource,"1"==dataSource.dataset.allowCustom,null,await this.placeholder,!1,this.showSuggestions,null,!dataSource.multiple,{items:"core/datafilter/autocomplete_selection_items",layout:"core/datafilter/autocomplete_layout",selection:"core/datafilter/autocomplete_selection"})}get filterRoot(){return this.rootNode.querySelector(_selectors.default.filter.byName(this.filterType))}getSourceDataForFilter(){return this.rootNode.querySelector(_selectors.default.filterset.regions.datasource).querySelector(_selectors.default.data.fields.byName(this.filterType))}getFilterValueNode(){return this.filterRoot.querySelector(_selectors.default.filter.regions.values)}get name(){return this.filterType}get jointype(){return parseInt(this.filterRoot.querySelector(_selectors.default.filter.fields.join).value,10)}get rawValues(){const filterValueSelect=this.getFilterValueNode().querySelector("select");return Object.values((select=filterValueSelect,select.querySelectorAll(":checked"))).map((option=>option.value));var select}get values(){return this.rawValues.map((option=>parseInt(option,10)))}get filterOptions(){return[]}get filterValue(){return{name:this.name,jointype:this.jointype,values:this.values,filteroptions:this.filterOptions}}validate(){return!0}},_exports.default})); define("core/datafilter/filtertypes/binary",["exports","core/datafilter/filtertype","core/datafilter/selectors","core/templates","core/str"],(function(_exports,_filtertype,_selectors,_templates,_str){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_filtertype=_interopRequireDefault(_filtertype),_selectors=_interopRequireDefault(_selectors),_templates=_interopRequireDefault(_templates);class _default extends _filtertype.default{constructor(){super(...arguments),_defineProperty(this,"optionOne",void 0),_defineProperty(this,"optionTwo",void 0)}async addValueSelector(initialValues){[this.optionOne,this.optionTwo]=await this.getTextValues();const initialValue=initialValues?initialValues[0]:0;return this.displayBinarySelection(initialValue)}getTextValues(){return(0,_str.get_strings)([{key:"no"},{key:"yes"}])}async displayBinarySelection(){let initialValue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const specificFilterSet=this.rootNode.querySelector(_selectors.default.filter.byName(this.filterType)),sourceDataNode=this.getSourceDataForFilter(),context={filtertype:this.filterType,title:sourceDataNode.getAttribute("data-field-title"),required:sourceDataNode.dataset.required,options:[{text:this.optionOne,value:0,selected:0===initialValue},{text:this.optionTwo,value:1,selected:1===initialValue}]};return _templates.default.render("core/datafilter/filtertypes/binary_selector",context).then(((binaryUi,js)=>_templates.default.replaceNodeContents(specificFilterSet.querySelector(_selectors.default.filter.regions.values),binaryUi,js)))}get values(){return[parseInt(this.filterRoot.querySelector('[data-filterfield="'.concat(this.name,'"]')).value)]}}return _exports.default=_default,_exports.default})); define("core/datafilter/filtertypes/country",["exports","core/datafilter/filtertype"],(function(_exports,_filtertype){var obj; /** * Country filter * * @module core/datafilter/filtertypes/country * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_filtertype=(obj=_filtertype)&&obj.__esModule?obj:{default:obj};class _default extends _filtertype.default{get values(){return this.rawValues}}return _exports.default=_default,_exports.default})); define("core/datafilter/filtertypes/courseid",["exports","core/datafilter/filtertype"],(function(_exports,_filtertype){var obj; /** * Course ID filter. * * @module core/datafilter/filtertypes/courseid * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_filtertype=(obj=_filtertype)&&obj.__esModule?obj:{default:obj};class _default extends _filtertype.default{constructor(filterType,filterSet){super(filterType,filterSet)}async addValueSelector(){}get filterValue(){return{name:this.name,jointype:1,values:[parseInt(this.rootNode.dataset.tableCourseId,10)]}}}return _exports.default=_default,_exports.default})); define("core/datafilter/filtertypes/datetime",["exports","core/datafilter/filtertype","core/datafilter/selectors","core/templates","core/notification","core/str"],(function(_exports,_filtertype,_selectors,_templates,_notification,_str){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_filtertype=_interopRequireDefault(_filtertype),_selectors=_interopRequireDefault(_selectors),_templates=_interopRequireDefault(_templates),_notification=_interopRequireDefault(_notification);const MODES_before="before",MODES_after="after",MODES_between="between";class _default extends _filtertype.default{constructor(filterType,rootNode,initialValues){let filterOptions=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{mode:MODES_before};super(filterType,rootNode,initialValues),_defineProperty(this,"SELECTORS",{afterwrapper:".".concat(this.filterType,"-afterwrapper"),beforewrapper:".".concat(this.filterType,"-beforewrapper"),betweenwrapper:".".concat(this.filterType,"-betweenwrapper"),mode:"[data-filterfield=".concat(this.filterType,"-mode]")}),_defineProperty(this,"mode",null),this.addModeSelector(filterOptions.mode)}async getContext(initialValues){var _initialValues$,_initialValues$2;const sourceDataNode=this.getSourceDataForFilter(),defaultBefore=sourceDataNode.getElementsByTagName("option")[0].value,defaultAfter=sourceDataNode.getElementsByTagName("option")[1].value,title=sourceDataNode.getAttribute("data-field-title"),labels=await(0,_str.get_strings)([{key:"datetimefilterafter",component:"core",param:{title:title}},{key:"datetimefilterbefore",component:"core",param:{title:title}}]);return{filtertype:this.filterType,afterlabel:labels[0],beforelabel:labels[1],required:sourceDataNode.dataset.required,aftervalue:null!==(_initialValues$=initialValues[0])&&void 0!==_initialValues$?_initialValues$:defaultAfter,beforevalue:null!==(_initialValues$2=initialValues[1])&&void 0!==_initialValues$2?_initialValues$2:defaultBefore}}async addValueSelector(){let initialValues=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const specificFilterSet=this.rootNode.querySelector(_selectors.default.filter.byName(this.filterType)),context=await this.getContext(initialValues),datetimeUi=await _templates.default.renderForPromise("core/datafilter/filtertypes/datetime_selector",context);return _templates.default.replaceNodeContents(specificFilterSet.querySelector(_selectors.default.filter.regions.values),datetimeUi.html,datetimeUi.js)}async addModeSelector(mode){const modeStrings=await(0,_str.get_strings)([{key:"selectdates"},{key:"filterdatebefore",component:"reportbuilder"},{key:"filterdateafter",component:"reportbuilder"},{key:"between"}]),context={label:modeStrings[0],filtertype:this.filterType,modeoptions:[{value:MODES_before,label:modeStrings[1],selected:mode===MODES_before?"selected":""},{value:MODES_after,label:modeStrings[2],selected:mode===MODES_after?"selected":""},{value:MODES_between,label:modeStrings[3],selected:mode===MODES_between?"selected":""}]},modeUi=await _templates.default.renderForPromise("core/datafilter/filtertypes/datetime_mode",context);this.getFilterValueNode().insertAdjacentHTML("beforebegin",modeUi.html);const modeSelect=this.filterRoot.querySelector(this.SELECTORS.mode);modeSelect.addEventListener("change",this.updateFieldVisibility.bind(this)),modeSelect.dispatchEvent(new Event("change"))}updateFieldVisibility(event){const filterValueNode=this.getFilterValueNode(),afterWrapper=filterValueNode.querySelector(this.SELECTORS.afterwrapper),beforeWrapper=filterValueNode.querySelector(this.SELECTORS.beforewrapper),betweenWrapper=filterValueNode.querySelector(this.SELECTORS.betweenwrapper),value=event.target.value;value===MODES_between?betweenWrapper.classList.remove("d-none"):betweenWrapper.classList.add("d-none"),value===MODES_after||value===MODES_between?afterWrapper.classList.remove("d-none"):afterWrapper.classList.add("d-none"),value===MODES_before||value===MODES_between?beforeWrapper.classList.remove("d-none"):beforeWrapper.classList.add("d-none")}get values(){return[this.filterRoot.querySelector('[data-filterfield="'.concat(this.name,'1"]')).value,this.filterRoot.querySelector('[data-filterfield="'.concat(this.name,'2"]')).value]}get filterOptions(){return[{name:"mode",value:this.filterRoot.querySelector(this.SELECTORS.mode).value}]}get filterValue(){return{name:this.name,jointype:this.jointype,values:this.values,filteroptions:this.filterOptions}}validate(){const mode=document.querySelector(this.SELECTORS.mode).value,before=document.querySelector(this.SELECTORS.beforewrapper+" input"),after=document.querySelector(this.SELECTORS.afterwrapper+" input");return after.setCustomValidity(""),!(mode===MODES_between&&after.value>=before.value)||((0,_str.get_strings)([{key:"invaliddatetimebetween",component:"error",param:{before:before.value,after:after.value}}]).then((strings=>(after.setCustomValidity(strings[0]),after.reportValidity(),strings))).catch(_notification.default.exception),!1)}}return _exports.default=_default,_exports.default})); define("core/datafilter/filtertypes/keyword",["exports","core/datafilter/filtertype","core/str"],(function(_exports,_filtertype,_str){var obj; /** * Keyword filter. * * @module core/datafilter/filtertypes/keyword * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_filtertype=(obj=_filtertype)&&obj.__esModule?obj:{default:obj};class _default extends _filtertype.default{get values(){return this.rawValues}get placeholder(){return(0,_str.getString)("placeholdertype","core_user")}get showSuggestions(){return!1}}return _exports.default=_default,_exports.default})); define("core/datafilter/selectors",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0; /** * Module containing the selectors for user filters. * * @module core/datafilter/selectors * @copyright 2020 Michael Hawkins * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const getFilterRegion=region=>'[data-filterregion="'.concat(region,'"]'),getFilterAction=action=>'[data-filteraction="'.concat(action,'"]'),getFilterField=field=>'[data-filterfield="'.concat(field,'"]');var _default={filter:{region:getFilterRegion("filter"),actions:{remove:getFilterAction("remove")},fields:{join:getFilterField("join"),type:getFilterField("type")},regions:{values:getFilterRegion("value")},byName:name=>"".concat(getFilterRegion("filter"),'[data-filter-type="').concat(name,'"]')},filterset:{region:getFilterRegion("actions"),actions:{addRow:getFilterAction("add"),applyFilters:getFilterAction("apply"),resetFilters:getFilterAction("reset")},regions:{filtermatch:getFilterRegion("filtermatch"),filterlist:getFilterRegion("filters"),datasource:getFilterRegion("filtertypedata"),emptyFilterRow:"".concat(getFilterRegion("filter"),'[data-filter-type=""]')},fields:{join:"".concat(getFilterRegion("filtermatch")," ").concat(getFilterField("join"))}},data:{fields:{byName:name=>'[data-field-name="'.concat(name,'"]'),all:"".concat(getFilterRegion("filtertypedata")," [data-field-name]")},typeList:getFilterRegion("filtertypelist"),typeListSelect:"select".concat(getFilterRegion("filtertypelist")),required:"".concat(getFilterRegion("value"),' > [data-required="1"]')}};return _exports.default=_default,_exports.default})); /* * JavaScript to handle drag operations, including automatic scrolling. * * Note: this module is defined statically. It is a singleton. You * can only have one use of it active at any time. However, you * can only drag one thing at a time, this is not a problem in practice. * * @module core/dragdrop * @copyright 2016 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.6 */ define("core/dragdrop",["jquery","core/autoscroll"],(function($,autoScroll){var dragdrop={eventCaptureOptions:{passive:!1,capture:!0},dragProxy:null,onMove:null,onDrop:null,initialPosition:null,initialX:null,initialY:null,touching:null,prepare:function(event){if(event.preventDefault(),"touchstart"===event.type?null===dragdrop.touching&&event.changedTouches.length>0:1===event.which){var details=dragdrop.getEventXY(event);return details.start=!0,details}return{start:!1}},start:function(event,dragProxy,onMove,onDrop){var xy=dragdrop.getEventXY(event);switch(dragdrop.initialX=xy.x,dragdrop.initialY=xy.y,dragdrop.initialPosition=dragProxy.offset(),dragdrop.dragProxy=dragProxy,dragdrop.onMove=onMove,dragdrop.onDrop=onDrop,event.type){case"mousedown":dragdrop.addEventSpecial("mousemove",dragdrop.mouseMove),dragdrop.addEventSpecial("mouseup",dragdrop.mouseUp);break;case"touchstart":dragdrop.addEventSpecial("touchend",dragdrop.touchEnd),dragdrop.addEventSpecial("touchcancel",dragdrop.touchEnd),dragdrop.addEventSpecial("touchmove",dragdrop.touchMove),dragdrop.touching=event.changedTouches[0].identifier;break;default:throw new Error("Unexpected event type: "+event.type)}autoScroll.start(dragdrop.scroll)},addEventSpecial:function(event,handler){try{window.addEventListener(event,handler,dragdrop.eventCaptureOptions)}catch(ex){dragdrop.eventCaptureOptions=!0,window.addEventListener(event,handler,dragdrop.eventCaptureOptions)}},getEventXY:function(event){switch(event.type){case"touchstart":return{x:event.changedTouches[0].pageX,y:event.changedTouches[0].pageY};case"mousedown":return{x:event.pageX,y:event.pageY};default:throw new Error("Unexpected event type: "+event.type)}},touchMove:function(e){e.preventDefault();for(var i=0;i * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=_interopRequireDefault(_jquery),PubSub=_interopRequireWildcard(PubSub),Aria=_interopRequireWildcard(Aria),_drawer_events=_interopRequireDefault(_drawer_events);const show=root=>{root=(0,_jquery.default)(root),Aria.unhide(root.get()),root.removeClass("hidden"),root.focus(),PubSub.publish(_drawer_events.default.DRAWER_SHOWN,root)},hide=root=>{(root=(0,_jquery.default)(root)).addClass("hidden"),Aria.hide(root.get()),PubSub.publish(_drawer_events.default.DRAWER_HIDDEN,root)},isVisible=root=>!root.hasClass("hidden"),toggle=root=>{isVisible(root)?hide(root):show(root)};var _default={hide:hide,show:show,isVisible:isVisible,toggle:toggle,registerToggles:(root,toggleElements)=>{let openTrigger=null;toggleElements.attr("aria-expanded",isVisible(root)),toggleElements.on("click",(e=>{e.preventDefault();const wasVisible=isVisible(root);toggle(root),toggleElements.attr("aria-expanded",!wasVisible),wasVisible?openTrigger&&(openTrigger.focus(),openTrigger=null):openTrigger=toggleElements.filter(((index,element)=>element==e.target||element.contains(e.target)))}))},getDrawerRoot:contentRoot=>(contentRoot=(0,_jquery.default)(contentRoot)).closest('[data-region="right-hand-drawer"]')};return _exports.default=_default,_exports.default})); define("core/drawer_events",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={DRAWER_SHOWN:"drawer-shown",DRAWER_HIDDEN:"drawer-hidden"},_exports.default})); define("core/dropzone",["exports","core/str","core/log","core/prefetch","core/templates"],(function(_exports,_str,_log,_prefetch,_templates){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_log=_interopRequireDefault(_log),_templates=_interopRequireDefault(_templates);var _default=class{constructor(dropZoneElement,fileTypes,callback){_defineProperty(this,"dropZoneElement",void 0),_defineProperty(this,"fileTypes",void 0),_defineProperty(this,"callback",void 0),_defineProperty(this,"dropZoneLabel",""),(0,_prefetch.prefetchString)("core","addfilesdrop"),this.dropZoneElement=dropZoneElement,this.fileTypes=fileTypes,this.callback=callback}init(){return this.dropZoneElement.addEventListener("dragover",(e=>{const dropZone=this.getDropZoneFromEvent(e);dropZone&&(e.preventDefault(),dropZone.classList.add("dragover"))})),this.dropZoneElement.addEventListener("dragleave",(e=>{const dropZone=this.getDropZoneFromEvent(e);dropZone&&(e.preventDefault(),dropZone.classList.remove("dragover"))})),this.dropZoneElement.addEventListener("drop",(e=>{const dropZone=this.getDropZoneFromEvent(e);dropZone&&(e.preventDefault(),dropZone.classList.remove("dragover"),this.callback(e.dataTransfer.files))})),this.dropZoneElement.addEventListener("click",(e=>{(e.target.closest(".dropzone-visually-hidden-focusable")||this.getDropZoneContainerFromEvent(e))&&this.getFileElementFromEvent(e).click()})),this.dropZoneElement.addEventListener("change",(e=>{const fileInput=this.getFileElementFromEvent(e);fileInput&&(e.preventDefault(),this.callback(fileInput.files))})),this.renderDropZone(this.dropZoneElement,this.fileTypes),_log.default.info("Dropzone has been initialized!"),this}getDropZoneFromEvent(e){return e.target.closest(".dropzone")}getDropZoneContainerFromEvent(e){return e.target.closest(".dropzone-container")}getFileElementFromEvent(e){return e.target.closest(".dropzone-container").querySelector(".drop-zone-fileinput")}setLabel(label){this.dropZoneLabel=label}getLabel(){return this.dropZoneLabel}async renderDropZone(dropZoneElement,fileTypes){this.getLabel()||this.setLabel(await(0,_str.getString)("addfilesdrop","core"));const dropZoneLabel=this.getLabel();dropZoneElement.innerHTML=await _templates.default.render("core/dropzone",{label:dropZoneLabel,filetypes:fileTypes})}};return _exports.default=_default,_exports.default})); define("core/dynamic_tabs",["exports","jquery","core/templates","core/loadingicon","core/notification","core/page_title","core/pending","core/str","core/local/repository/dynamic_tabs","core_form/changechecker"],(function(_exports,_jquery,_templates,_loadingicon,_notification,_page_title,_pending,_str,_dynamic_tabs,_changechecker){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Dynamic Tabs UI element with AJAX loading of tabs content * * @module core/dynamic_tabs * @copyright 2021 David Matamoros based on code from Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_jquery=_interopRequireDefault(_jquery),_templates=_interopRequireDefault(_templates),_notification=_interopRequireDefault(_notification),_pending=_interopRequireDefault(_pending);const SELECTORS={dynamicTabs:".dynamictabs",activeTab:".dynamictabs .nav-link.active",allActiveTabs:'.dynamictabs .nav-link[data-bs-toggle="tab"]:not(.disabled)',tabContent:".dynamictabs .tab-pane [data-tab-content]",tabToggle:'a[data-bs-toggle="tab"]',tabPane:".dynamictabs .tab-pane",forTabName:tabName=>'.dynamictabs [data-tab-content="'.concat(tabName,'"]'),forTabId:tabName=>'.dynamictabs [data-bs-toggle="tab"][href="#'.concat(tabName,'"]')};let watchedFormDirtyNotification=!1;_exports.init=()=>{if(document.querySelectorAll(SELECTORS.tabToggle).forEach((tabToggle=>{tabToggle.addEventListener("show.bs.tab",(event=>{if((0,_changechecker.isAnyWatchedFormDirty)())return event.preventDefault(),event.stopPropagation(),void(watchedFormDirtyNotification||(watchedFormDirtyNotification=!0,_notification.default.saveCancelPromise((0,_str.getString)("changesmade"),(0,_str.getString)("changesmadereallygoaway"),(0,_str.getString)("confirm"),{triggerElement:tabToggle}).then((()=>{(0,_changechecker.resetAllFormDirtyStates)(),tabToggle.dispatchEvent(new Event("click",{bubbles:!0}))})).catch((()=>{})).finally((()=>{watchedFormDirtyNotification=!1}))));const previousTabName=getActiveTabName();if(previousTabName){document.querySelector(SELECTORS.forTabName(previousTabName)).textContent=""}})),tabToggle.addEventListener("shown.bs.tab",(()=>{const tabPane=document.getElementById(tabToggle.getAttribute("href").replace(/^#/,""));tabPane&&loadTab(tabPane.id)}))})),!openTabFromHash()){const tabs=document.querySelector(SELECTORS.allActiveTabs);if(tabs)openTab(tabs.getAttribute("aria-controls"));else{const tabPane=document.querySelector(SELECTORS.tabPane);tabPane&&(tabPane.classList.add("active","show"),loadTab(tabPane.getAttribute("id")))}}};const getActiveTabName=()=>{const element=document.querySelector(SELECTORS.activeTab);return(null==element?void 0:element.getAttribute("aria-controls"))||null},loadTab=tabName=>{var _ref,_tabName;tabName=null!==(_ref=null!==(_tabName=tabName)&&void 0!==_tabName?_tabName:getActiveTabName())&&void 0!==_ref?_ref:(()=>{const element=document.querySelector(SELECTORS.tabContent);return(null==element?void 0:element.dataset.tabContent)||null})();const tab=document.querySelector(SELECTORS.forTabName(tabName));if(!tab)return;const pendingPromise=new _pending.default("core/dynamic_tabs:loadTab:"+tabName),tabLabelledBy=document.getElementById(tab.getAttribute("aria-labelledby"));(0,_page_title.prependPageTitle)(tabLabelledBy.innerText),(0,_loadingicon.addIconToContainer)(tab).then((()=>{let tabArgs={...tab.dataset};return delete tabArgs.tabClass,delete tabArgs.tabContent,(0,_dynamic_tabs.getContent)(tab.dataset.tabClass,JSON.stringify(tabArgs))})).then((response=>Promise.all([_jquery.default.parseHTML(response.javascript,null,!0).map((node=>node.innerHTML)).join("\n"),_templates.default.renderForPromise(response.template,JSON.parse(response.content))]))).then((_ref2=>{let[responseJs,{html:html,js:js}]=_ref2;return _templates.default.replaceNodeContents(tab,html,js+responseJs)})).then((()=>pendingPromise.resolve())).catch(_notification.default.exception)},openTab=tabName=>{const tab=(tabName=>document.querySelector(SELECTORS.forTabId(tabName)))(tabName);return!!tab&&(loadTab(tabName),tab.classList.add("active"),(tabName=>document.getElementById(tabName))(tabName).classList.add("active","show"),!0)},openTabFromHash=()=>{const hash=document.location.hash;return!!hash.match(/^#\w+$/g)&&openTab(hash.replace(/^#/g,""))}})); define("core/edit_switch",["exports","core/ajax","core/event_dispatcher","core/notification"],(function(_exports,_ajax,_event_dispatcher,_notification){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=_exports.eventTypes=void 0; /** * Controls the edit switch. * * @module core/edit_switch * @copyright 2021 Bas Brands * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const eventTypes={editModeSet:"core/edit_switch/editModeSet"};_exports.eventTypes=eventTypes;const notifyEditModeSet=(container,editMode)=>(0,_event_dispatcher.dispatchEvent)(eventTypes.editModeSet,{editMode:editMode},container,{cancelable:!0});_exports.init=editingSwitchId=>{const editSwitch=document.getElementById(editingSwitchId);editSwitch.addEventListener("change",(()=>{var context,setmode;(context=editSwitch.dataset.context,setmode=editSwitch.checked,(0,_ajax.call)([{methodname:"core_change_editmode",args:{context:context,setmode:setmode}}])[0]).then((result=>{result.success?(editSwitch=>{editSwitch.checked?editSwitch.setAttribute("aria-checked",!0):editSwitch.setAttribute("aria-checked",!1),notifyEditModeSet(editSwitch,editSwitch.checked).defaultPrevented||(editSwitch.setAttribute("disabled",!0),window.location=editSwitch.dataset.pageurl)})(editSwitch):editSwitch.checked=!1})).catch(_notification.exception)}))}})); define("core/emoji/auto_complete",["exports","core/emoji/data","core/templates","core/utils","core/localstorage","core/key_codes"],(function(_exports,EmojiData,_templates,_utils,_localstorage,_key_codes){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,EmojiData=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj} /** * Emoji auto complete. * * @module core/emoji/auto_complete * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */(EmojiData),_localstorage=_interopRequireDefault(_localstorage),_key_codes=_interopRequireDefault(_key_codes);const SELECTORS_EMOJI_BUTTON='[data-region="emoji-button"]',SELECTORS_ACTIVE_EMOJI_BUTTON='[data-region="emoji-button"].active',getRecentEmojis=()=>{const storedData=_localstorage.default.get("moodle-recent-emojis");return storedData?JSON.parse(storedData):[]},addRecentEmoji=(unified,shortName)=>{const newEmoji={unified:unified,shortnames:[shortName]},recentEmojis=getRecentEmojis();let newRecentEmojis=[newEmoji,...recentEmojis.filter((emoji=>emoji.unified!=newEmoji.unified))];newRecentEmojis=newRecentEmojis.slice(0,27),_localstorage.default.set("moodle-recent-emojis",JSON.stringify(newRecentEmojis))},getEmojiTextFromShortName=shortName=>{const unified=EmojiData.byShortName[shortName];if(unified){const charCodes=unified.split("-").map((code=>"0x".concat(code)));return String.fromCodePoint.apply(null,charCodes)}return null},getShortNameFromText=text=>text.replace(/:/g,""),getActiveEmojiSuggestion=root=>root.querySelector(SELECTORS_ACTIVE_EMOJI_BUTTON),selectEmojiElement=(element,selectCallback)=>{const shortName=element.getAttribute("data-short-name"),unified=element.getAttribute("data-unified");addRecentEmoji(unified,shortName),selectCallback(element.innerHTML.trim())};return _exports.default=(root,textArea,hasSuggestionCallback,selectCallback)=>{let hasSuggestions=!1,previousSearchText="";textArea.addEventListener("keyup",(0,_utils.debounce)((()=>{const searchText=((text,position)=>{const startMatches=text.slice(0,position).match(/(\S*)$/),endMatches=text.slice(position).match(/^(\S*)/);let startText="",endText="";return startMatches&&(startText=startMatches[startMatches.length-1]),endMatches&&(endText=endMatches[endMatches.length-1]),"".concat(startText).concat(endText)})(textArea.value,textArea.selectionStart);if(searchText!==previousSearchText){if(previousSearchText=searchText,(text=>/^:[^:\s]+:$/.test(text))(searchText)){const shortName=getShortNameFromText(searchText),emojiText=getEmojiTextFromShortName(shortName);hasSuggestions=!1,emojiText&&(addRecentEmoji(EmojiData.byShortName[shortName],shortName),selectCallback(emojiText))}else if((text=>/^:[^:\s]*$/.test(text))(searchText)){const suggestions=(searchTerm=getShortNameFromText(searchText),limit=50,""===searchTerm?getRecentEmojis().map((data=>data.shortnames[0])).slice(0,limit):(searchTerm=searchTerm.toLowerCase(),Object.keys(EmojiData.byShortName).filter((shortName=>shortName.includes(searchTerm))).slice(0,limit)));suggestions.length?((async(root,shortNames)=>{const renderContext={emojis:shortNames.map(((shortName,index)=>({active:0===index,emojitext:getEmojiTextFromShortName(shortName),displayshortname:":".concat(shortName,":"),shortname:shortName,unified:EmojiData.byShortName[shortName]})))},html=await(0,_templates.render)("core/emoji/auto_complete",renderContext);root.innerHTML=html})(root,suggestions),hasSuggestions=!0):hasSuggestions=!1}else hasSuggestions=!1;var searchTerm,limit;hasSuggestionCallback(hasSuggestions)}}),200)),textArea.addEventListener("keydown",(e=>{if(hasSuggestions){if(!(e.shiftKey||e.metaKey||e.altKey||e.ctrlKey))switch(e.which){case _key_codes.default.escape:hasSuggestions=!1,hasSuggestionCallback(!1);break;case _key_codes.default.arrowLeft:(root=>{const activeEmojiSuggestion=getActiveEmojiSuggestion(root),previousSuggestion=activeEmojiSuggestion.previousElementSibling;previousSuggestion&&(activeEmojiSuggestion.classList.remove("active"),previousSuggestion.classList.add("active"),previousSuggestion.scrollIntoView({behaviour:"smooth",inline:"center"}))})(root),e.preventDefault();break;case _key_codes.default.arrowRight:(root=>{const activeEmojiSuggestion=getActiveEmojiSuggestion(root),nextSuggestion=activeEmojiSuggestion.nextElementSibling;nextSuggestion&&(activeEmojiSuggestion.classList.remove("active"),nextSuggestion.classList.add("active"),nextSuggestion.scrollIntoView({behaviour:"smooth",inline:"center"}))})(root),e.preventDefault();break;case _key_codes.default.enter:selectEmojiElement(getActiveEmojiSuggestion(root),selectCallback),e.preventDefault(),e.stopPropagation()}}})),root.addEventListener("click",(e=>{const target=e.target;target.matches(SELECTORS_EMOJI_BUTTON)&&selectEmojiElement(target,selectCallback)}))},_exports.default})); define("core/emoji/data",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.byShortName=_exports.byCategory=void 0;_exports.byCategory=[{name:"Smileys & Emotion",emojis:[{unified:"1F600",shortnames:["grinning"]},{unified:"1F603",shortnames:["smiley"]},{unified:"1F604",shortnames:["smile"]},{unified:"1F601",shortnames:["grin"]},{unified:"1F606",shortnames:["laughing"]},{unified:"1F605",shortnames:["sweat_smile"]},{unified:"1F923",shortnames:["rolling_on_the_floor_laughing"]},{unified:"1F602",shortnames:["joy"]},{unified:"1F642",shortnames:["slightly_smiling_face"]},{unified:"1F643",shortnames:["upside_down_face"]},{unified:"1FAE0",shortnames:["melting_face"]},{unified:"1F609",shortnames:["wink"]},{unified:"1F60A",shortnames:["blush"]},{unified:"1F607",shortnames:["innocent"]},{unified:"1F970",shortnames:["smiling_face_with_3_hearts"]},{unified:"1F60D",shortnames:["heart_eyes"]},{unified:"1F929",shortnames:["star-struck"]},{unified:"1F618",shortnames:["kissing_heart"]},{unified:"1F617",shortnames:["kissing"]},{unified:"263A-FE0F",shortnames:["relaxed"]},{unified:"1F61A",shortnames:["kissing_closed_eyes"]},{unified:"1F619",shortnames:["kissing_smiling_eyes"]},{unified:"1F972",shortnames:["smiling_face_with_tear"]},{unified:"1F60B",shortnames:["yum"]},{unified:"1F61B",shortnames:["stuck_out_tongue"]},{unified:"1F61C",shortnames:["stuck_out_tongue_winking_eye"]},{unified:"1F92A",shortnames:["zany_face"]},{unified:"1F61D",shortnames:["stuck_out_tongue_closed_eyes"]},{unified:"1F911",shortnames:["money_mouth_face"]},{unified:"1F917",shortnames:["hugging_face"]},{unified:"1F92D",shortnames:["face_with_hand_over_mouth"]},{unified:"1FAE2",shortnames:["face_with_open_eyes_and_hand_over_mouth"]},{unified:"1FAE3",shortnames:["face_with_peeking_eye"]},{unified:"1F92B",shortnames:["shushing_face"]},{unified:"1F914",shortnames:["thinking_face"]},{unified:"1FAE1",shortnames:["saluting_face"]},{unified:"1F910",shortnames:["zipper_mouth_face"]},{unified:"1F928",shortnames:["face_with_raised_eyebrow"]},{unified:"1F610",shortnames:["neutral_face"]},{unified:"1F611",shortnames:["expressionless"]},{unified:"1F636",shortnames:["no_mouth"]},{unified:"1FAE5",shortnames:["dotted_line_face"]},{unified:"1F636-200D-1F32B-FE0F",shortnames:["face_in_clouds"]},{unified:"1F60F",shortnames:["smirk"]},{unified:"1F612",shortnames:["unamused"]},{unified:"1F644",shortnames:["face_with_rolling_eyes"]},{unified:"1F62C",shortnames:["grimacing"]},{unified:"1F62E-200D-1F4A8",shortnames:["face_exhaling"]},{unified:"1F925",shortnames:["lying_face"]},{unified:"1FAE8",shortnames:["shaking_face"]},{unified:"1F642-200D-2194-FE0F",shortnames:["head_shaking_horizontally"]},{unified:"1F642-200D-2195-FE0F",shortnames:["head_shaking_vertically"]},{unified:"1F60C",shortnames:["relieved"]},{unified:"1F614",shortnames:["pensive"]},{unified:"1F62A",shortnames:["sleepy"]},{unified:"1F924",shortnames:["drooling_face"]},{unified:"1F634",shortnames:["sleeping"]},{unified:"1F637",shortnames:["mask"]},{unified:"1F912",shortnames:["face_with_thermometer"]},{unified:"1F915",shortnames:["face_with_head_bandage"]},{unified:"1F922",shortnames:["nauseated_face"]},{unified:"1F92E",shortnames:["face_vomiting"]},{unified:"1F927",shortnames:["sneezing_face"]},{unified:"1F975",shortnames:["hot_face"]},{unified:"1F976",shortnames:["cold_face"]},{unified:"1F974",shortnames:["woozy_face"]},{unified:"1F635",shortnames:["dizzy_face"]},{unified:"1F635-200D-1F4AB",shortnames:["face_with_spiral_eyes"]},{unified:"1F92F",shortnames:["exploding_head"]},{unified:"1F920",shortnames:["face_with_cowboy_hat"]},{unified:"1F973",shortnames:["partying_face"]},{unified:"1F978",shortnames:["disguised_face"]},{unified:"1F60E",shortnames:["sunglasses"]},{unified:"1F913",shortnames:["nerd_face"]},{unified:"1F9D0",shortnames:["face_with_monocle"]},{unified:"1F615",shortnames:["confused"]},{unified:"1FAE4",shortnames:["face_with_diagonal_mouth"]},{unified:"1F61F",shortnames:["worried"]},{unified:"1F641",shortnames:["slightly_frowning_face"]},{unified:"2639-FE0F",shortnames:["white_frowning_face"]},{unified:"1F62E",shortnames:["open_mouth"]},{unified:"1F62F",shortnames:["hushed"]},{unified:"1F632",shortnames:["astonished"]},{unified:"1F633",shortnames:["flushed"]},{unified:"1F97A",shortnames:["pleading_face"]},{unified:"1F979",shortnames:["face_holding_back_tears"]},{unified:"1F626",shortnames:["frowning"]},{unified:"1F627",shortnames:["anguished"]},{unified:"1F628",shortnames:["fearful"]},{unified:"1F630",shortnames:["cold_sweat"]},{unified:"1F625",shortnames:["disappointed_relieved"]},{unified:"1F622",shortnames:["cry"]},{unified:"1F62D",shortnames:["sob"]},{unified:"1F631",shortnames:["scream"]},{unified:"1F616",shortnames:["confounded"]},{unified:"1F623",shortnames:["persevere"]},{unified:"1F61E",shortnames:["disappointed"]},{unified:"1F613",shortnames:["sweat"]},{unified:"1F629",shortnames:["weary"]},{unified:"1F62B",shortnames:["tired_face"]},{unified:"1F971",shortnames:["yawning_face"]},{unified:"1F624",shortnames:["triumph"]},{unified:"1F621",shortnames:["rage"]},{unified:"1F620",shortnames:["angry"]},{unified:"1F92C",shortnames:["face_with_symbols_on_mouth"]},{unified:"1F608",shortnames:["smiling_imp"]},{unified:"1F47F",shortnames:["imp"]},{unified:"1F480",shortnames:["skull"]},{unified:"2620-FE0F",shortnames:["skull_and_crossbones"]},{unified:"1F4A9",shortnames:["hankey"]},{unified:"1F921",shortnames:["clown_face"]},{unified:"1F479",shortnames:["japanese_ogre"]},{unified:"1F47A",shortnames:["japanese_goblin"]},{unified:"1F47B",shortnames:["ghost"]},{unified:"1F47D",shortnames:["alien"]},{unified:"1F47E",shortnames:["space_invader"]},{unified:"1F916",shortnames:["robot_face"]},{unified:"1F63A",shortnames:["smiley_cat"]},{unified:"1F638",shortnames:["smile_cat"]},{unified:"1F639",shortnames:["joy_cat"]},{unified:"1F63B",shortnames:["heart_eyes_cat"]},{unified:"1F63C",shortnames:["smirk_cat"]},{unified:"1F63D",shortnames:["kissing_cat"]},{unified:"1F640",shortnames:["scream_cat"]},{unified:"1F63F",shortnames:["crying_cat_face"]},{unified:"1F63E",shortnames:["pouting_cat"]},{unified:"1F648",shortnames:["see_no_evil"]},{unified:"1F649",shortnames:["hear_no_evil"]},{unified:"1F64A",shortnames:["speak_no_evil"]},{unified:"1F48C",shortnames:["love_letter"]},{unified:"1F498",shortnames:["cupid"]},{unified:"1F49D",shortnames:["gift_heart"]},{unified:"1F496",shortnames:["sparkling_heart"]},{unified:"1F497",shortnames:["heartpulse"]},{unified:"1F493",shortnames:["heartbeat"]},{unified:"1F49E",shortnames:["revolving_hearts"]},{unified:"1F495",shortnames:["two_hearts"]},{unified:"1F49F",shortnames:["heart_decoration"]},{unified:"2763-FE0F",shortnames:["heavy_heart_exclamation_mark_ornament"]},{unified:"1F494",shortnames:["broken_heart"]},{unified:"2764-FE0F-200D-1F525",shortnames:["heart_on_fire"]},{unified:"2764-FE0F-200D-1FA79",shortnames:["mending_heart"]},{unified:"2764-FE0F",shortnames:["heart"]},{unified:"1FA77",shortnames:["pink_heart"]},{unified:"1F9E1",shortnames:["orange_heart"]},{unified:"1F49B",shortnames:["yellow_heart"]},{unified:"1F49A",shortnames:["green_heart"]},{unified:"1F499",shortnames:["blue_heart"]},{unified:"1FA75",shortnames:["light_blue_heart"]},{unified:"1F49C",shortnames:["purple_heart"]},{unified:"1F90E",shortnames:["brown_heart"]},{unified:"1F5A4",shortnames:["black_heart"]},{unified:"1FA76",shortnames:["grey_heart"]},{unified:"1F90D",shortnames:["white_heart"]},{unified:"1F48B",shortnames:["kiss"]},{unified:"1F4AF",shortnames:["100"]},{unified:"1F4A2",shortnames:["anger"]},{unified:"1F4A5",shortnames:["boom"]},{unified:"1F4AB",shortnames:["dizzy"]},{unified:"1F4A6",shortnames:["sweat_drops"]},{unified:"1F4A8",shortnames:["dash"]},{unified:"1F573-FE0F",shortnames:["hole"]},{unified:"1F4AC",shortnames:["speech_balloon"]},{unified:"1F441-FE0F-200D-1F5E8-FE0F",shortnames:["eye-in-speech-bubble"]},{unified:"1F5E8-FE0F",shortnames:["left_speech_bubble"]},{unified:"1F5EF-FE0F",shortnames:["right_anger_bubble"]},{unified:"1F4AD",shortnames:["thought_balloon"]},{unified:"1F4A4",shortnames:["zzz"]}]},{name:"People & Body",emojis:[{unified:"1F44B",shortnames:["wave"]},{unified:"1F91A",shortnames:["raised_back_of_hand"]},{unified:"1F590-FE0F",shortnames:["raised_hand_with_fingers_splayed"]},{unified:"270B",shortnames:["hand"]},{unified:"1F596",shortnames:["spock-hand"]},{unified:"1FAF1",shortnames:["rightwards_hand"]},{unified:"1FAF2",shortnames:["leftwards_hand"]},{unified:"1FAF3",shortnames:["palm_down_hand"]},{unified:"1FAF4",shortnames:["palm_up_hand"]},{unified:"1FAF7",shortnames:["leftwards_pushing_hand"]},{unified:"1FAF8",shortnames:["rightwards_pushing_hand"]},{unified:"1F44C",shortnames:["ok_hand"]},{unified:"1F90C",shortnames:["pinched_fingers"]},{unified:"1F90F",shortnames:["pinching_hand"]},{unified:"270C-FE0F",shortnames:["v"]},{unified:"1F91E",shortnames:["crossed_fingers"]},{unified:"1FAF0",shortnames:["hand_with_index_finger_and_thumb_crossed"]},{unified:"1F91F",shortnames:["i_love_you_hand_sign"]},{unified:"1F918",shortnames:["the_horns"]},{unified:"1F919",shortnames:["call_me_hand"]},{unified:"1F448",shortnames:["point_left"]},{unified:"1F449",shortnames:["point_right"]},{unified:"1F446",shortnames:["point_up_2"]},{unified:"1F595",shortnames:["middle_finger"]},{unified:"1F447",shortnames:["point_down"]},{unified:"261D-FE0F",shortnames:["point_up"]},{unified:"1FAF5",shortnames:["index_pointing_at_the_viewer"]},{unified:"1F44D",shortnames:["+1"]},{unified:"1F44E",shortnames:["-1"]},{unified:"270A",shortnames:["fist"]},{unified:"1F44A",shortnames:["facepunch"]},{unified:"1F91B",shortnames:["left-facing_fist"]},{unified:"1F91C",shortnames:["right-facing_fist"]},{unified:"1F44F",shortnames:["clap"]},{unified:"1F64C",shortnames:["raised_hands"]},{unified:"1FAF6",shortnames:["heart_hands"]},{unified:"1F450",shortnames:["open_hands"]},{unified:"1F932",shortnames:["palms_up_together"]},{unified:"1F91D",shortnames:["handshake"]},{unified:"1F64F",shortnames:["pray"]},{unified:"270D-FE0F",shortnames:["writing_hand"]},{unified:"1F485",shortnames:["nail_care"]},{unified:"1F933",shortnames:["selfie"]},{unified:"1F4AA",shortnames:["muscle"]},{unified:"1F9BE",shortnames:["mechanical_arm"]},{unified:"1F9BF",shortnames:["mechanical_leg"]},{unified:"1F9B5",shortnames:["leg"]},{unified:"1F9B6",shortnames:["foot"]},{unified:"1F442",shortnames:["ear"]},{unified:"1F9BB",shortnames:["ear_with_hearing_aid"]},{unified:"1F443",shortnames:["nose"]},{unified:"1F9E0",shortnames:["brain"]},{unified:"1FAC0",shortnames:["anatomical_heart"]},{unified:"1FAC1",shortnames:["lungs"]},{unified:"1F9B7",shortnames:["tooth"]},{unified:"1F9B4",shortnames:["bone"]},{unified:"1F440",shortnames:["eyes"]},{unified:"1F441-FE0F",shortnames:["eye"]},{unified:"1F445",shortnames:["tongue"]},{unified:"1F444",shortnames:["lips"]},{unified:"1FAE6",shortnames:["biting_lip"]},{unified:"1F476",shortnames:["baby"]},{unified:"1F9D2",shortnames:["child"]},{unified:"1F466",shortnames:["boy"]},{unified:"1F467",shortnames:["girl"]},{unified:"1F9D1",shortnames:["adult"]},{unified:"1F468",shortnames:["man"]},{unified:"1F9D4",shortnames:["bearded_person"]},{unified:"1F9D4-200D-2642-FE0F",shortnames:["man_with_beard"]},{unified:"1F9D4-200D-2640-FE0F",shortnames:["woman_with_beard"]},{unified:"1F468-200D-1F9B0",shortnames:["red_haired_man"]},{unified:"1F468-200D-1F9B1",shortnames:["curly_haired_man"]},{unified:"1F468-200D-1F9B3",shortnames:["white_haired_man"]},{unified:"1F468-200D-1F9B2",shortnames:["bald_man"]},{unified:"1F469",shortnames:["woman"]},{unified:"1F469-200D-1F9B0",shortnames:["red_haired_woman"]},{unified:"1F9D1-200D-1F9B0",shortnames:["red_haired_person"]},{unified:"1F469-200D-1F9B1",shortnames:["curly_haired_woman"]},{unified:"1F9D1-200D-1F9B1",shortnames:["curly_haired_person"]},{unified:"1F469-200D-1F9B3",shortnames:["white_haired_woman"]},{unified:"1F9D1-200D-1F9B3",shortnames:["white_haired_person"]},{unified:"1F469-200D-1F9B2",shortnames:["bald_woman"]},{unified:"1F9D1-200D-1F9B2",shortnames:["bald_person"]},{unified:"1F471-200D-2640-FE0F",shortnames:["blond-haired-woman"]},{unified:"1F471-200D-2642-FE0F",shortnames:["blond-haired-man","person_with_blond_hair"]},{unified:"1F9D3",shortnames:["older_adult"]},{unified:"1F474",shortnames:["older_man"]},{unified:"1F475",shortnames:["older_woman"]},{unified:"1F64D-200D-2642-FE0F",shortnames:["man-frowning"]},{unified:"1F64D-200D-2640-FE0F",shortnames:["woman-frowning","person_frowning"]},{unified:"1F64E-200D-2642-FE0F",shortnames:["man-pouting"]},{unified:"1F64E-200D-2640-FE0F",shortnames:["woman-pouting","person_with_pouting_face"]},{unified:"1F645-200D-2642-FE0F",shortnames:["man-gesturing-no"]},{unified:"1F645-200D-2640-FE0F",shortnames:["woman-gesturing-no","no_good"]},{unified:"1F646-200D-2642-FE0F",shortnames:["man-gesturing-ok"]},{unified:"1F646-200D-2640-FE0F",shortnames:["woman-gesturing-ok","ok_woman"]},{unified:"1F481-200D-2642-FE0F",shortnames:["man-tipping-hand"]},{unified:"1F481-200D-2640-FE0F",shortnames:["woman-tipping-hand","information_desk_person"]},{unified:"1F64B-200D-2642-FE0F",shortnames:["man-raising-hand"]},{unified:"1F64B-200D-2640-FE0F",shortnames:["woman-raising-hand","raising_hand"]},{unified:"1F9CF",shortnames:["deaf_person"]},{unified:"1F9CF-200D-2642-FE0F",shortnames:["deaf_man"]},{unified:"1F9CF-200D-2640-FE0F",shortnames:["deaf_woman"]},{unified:"1F647",shortnames:["bow"]},{unified:"1F647-200D-2642-FE0F",shortnames:["man-bowing"]},{unified:"1F647-200D-2640-FE0F",shortnames:["woman-bowing"]},{unified:"1F926",shortnames:["face_palm"]},{unified:"1F926-200D-2642-FE0F",shortnames:["man-facepalming"]},{unified:"1F926-200D-2640-FE0F",shortnames:["woman-facepalming"]},{unified:"1F937",shortnames:["shrug"]},{unified:"1F937-200D-2642-FE0F",shortnames:["man-shrugging"]},{unified:"1F937-200D-2640-FE0F",shortnames:["woman-shrugging"]},{unified:"1F9D1-200D-2695-FE0F",shortnames:["health_worker"]},{unified:"1F468-200D-2695-FE0F",shortnames:["male-doctor"]},{unified:"1F469-200D-2695-FE0F",shortnames:["female-doctor"]},{unified:"1F9D1-200D-1F393",shortnames:["student"]},{unified:"1F468-200D-1F393",shortnames:["male-student"]},{unified:"1F469-200D-1F393",shortnames:["female-student"]},{unified:"1F9D1-200D-1F3EB",shortnames:["teacher"]},{unified:"1F468-200D-1F3EB",shortnames:["male-teacher"]},{unified:"1F469-200D-1F3EB",shortnames:["female-teacher"]},{unified:"1F9D1-200D-2696-FE0F",shortnames:["judge"]},{unified:"1F468-200D-2696-FE0F",shortnames:["male-judge"]},{unified:"1F469-200D-2696-FE0F",shortnames:["female-judge"]},{unified:"1F9D1-200D-1F33E",shortnames:["farmer"]},{unified:"1F468-200D-1F33E",shortnames:["male-farmer"]},{unified:"1F469-200D-1F33E",shortnames:["female-farmer"]},{unified:"1F9D1-200D-1F373",shortnames:["cook"]},{unified:"1F468-200D-1F373",shortnames:["male-cook"]},{unified:"1F469-200D-1F373",shortnames:["female-cook"]},{unified:"1F9D1-200D-1F527",shortnames:["mechanic"]},{unified:"1F468-200D-1F527",shortnames:["male-mechanic"]},{unified:"1F469-200D-1F527",shortnames:["female-mechanic"]},{unified:"1F9D1-200D-1F3ED",shortnames:["factory_worker"]},{unified:"1F468-200D-1F3ED",shortnames:["male-factory-worker"]},{unified:"1F469-200D-1F3ED",shortnames:["female-factory-worker"]},{unified:"1F9D1-200D-1F4BC",shortnames:["office_worker"]},{unified:"1F468-200D-1F4BC",shortnames:["male-office-worker"]},{unified:"1F469-200D-1F4BC",shortnames:["female-office-worker"]},{unified:"1F9D1-200D-1F52C",shortnames:["scientist"]},{unified:"1F468-200D-1F52C",shortnames:["male-scientist"]},{unified:"1F469-200D-1F52C",shortnames:["female-scientist"]},{unified:"1F9D1-200D-1F4BB",shortnames:["technologist"]},{unified:"1F468-200D-1F4BB",shortnames:["male-technologist"]},{unified:"1F469-200D-1F4BB",shortnames:["female-technologist"]},{unified:"1F9D1-200D-1F3A4",shortnames:["singer"]},{unified:"1F468-200D-1F3A4",shortnames:["male-singer"]},{unified:"1F469-200D-1F3A4",shortnames:["female-singer"]},{unified:"1F9D1-200D-1F3A8",shortnames:["artist"]},{unified:"1F468-200D-1F3A8",shortnames:["male-artist"]},{unified:"1F469-200D-1F3A8",shortnames:["female-artist"]},{unified:"1F9D1-200D-2708-FE0F",shortnames:["pilot"]},{unified:"1F468-200D-2708-FE0F",shortnames:["male-pilot"]},{unified:"1F469-200D-2708-FE0F",shortnames:["female-pilot"]},{unified:"1F9D1-200D-1F680",shortnames:["astronaut"]},{unified:"1F468-200D-1F680",shortnames:["male-astronaut"]},{unified:"1F469-200D-1F680",shortnames:["female-astronaut"]},{unified:"1F9D1-200D-1F692",shortnames:["firefighter"]},{unified:"1F468-200D-1F692",shortnames:["male-firefighter"]},{unified:"1F469-200D-1F692",shortnames:["female-firefighter"]},{unified:"1F46E-200D-2642-FE0F",shortnames:["male-police-officer","cop"]},{unified:"1F46E-200D-2640-FE0F",shortnames:["female-police-officer"]},{unified:"1F575-FE0F-200D-2642-FE0F",shortnames:["male-detective","sleuth_or_spy"]},{unified:"1F575-FE0F-200D-2640-FE0F",shortnames:["female-detective"]},{unified:"1F482-200D-2642-FE0F",shortnames:["male-guard","guardsman"]},{unified:"1F482-200D-2640-FE0F",shortnames:["female-guard"]},{unified:"1F977",shortnames:["ninja"]},{unified:"1F477-200D-2642-FE0F",shortnames:["male-construction-worker","construction_worker"]},{unified:"1F477-200D-2640-FE0F",shortnames:["female-construction-worker"]},{unified:"1FAC5",shortnames:["person_with_crown"]},{unified:"1F934",shortnames:["prince"]},{unified:"1F478",shortnames:["princess"]},{unified:"1F473-200D-2642-FE0F",shortnames:["man-wearing-turban","man_with_turban"]},{unified:"1F473-200D-2640-FE0F",shortnames:["woman-wearing-turban"]},{unified:"1F472",shortnames:["man_with_gua_pi_mao"]},{unified:"1F9D5",shortnames:["person_with_headscarf"]},{unified:"1F935",shortnames:["person_in_tuxedo"]},{unified:"1F935-200D-2642-FE0F",shortnames:["man_in_tuxedo"]},{unified:"1F935-200D-2640-FE0F",shortnames:["woman_in_tuxedo"]},{unified:"1F470",shortnames:["bride_with_veil"]},{unified:"1F470-200D-2642-FE0F",shortnames:["man_with_veil"]},{unified:"1F470-200D-2640-FE0F",shortnames:["woman_with_veil"]},{unified:"1F930",shortnames:["pregnant_woman"]},{unified:"1FAC3",shortnames:["pregnant_man"]},{unified:"1FAC4",shortnames:["pregnant_person"]},{unified:"1F931",shortnames:["breast-feeding"]},{unified:"1F469-200D-1F37C",shortnames:["woman_feeding_baby"]},{unified:"1F468-200D-1F37C",shortnames:["man_feeding_baby"]},{unified:"1F9D1-200D-1F37C",shortnames:["person_feeding_baby"]},{unified:"1F47C",shortnames:["angel"]},{unified:"1F385",shortnames:["santa"]},{unified:"1F936",shortnames:["mrs_claus"]},{unified:"1F9D1-200D-1F384",shortnames:["mx_claus"]},{unified:"1F9B8",shortnames:["superhero"]},{unified:"1F9B8-200D-2642-FE0F",shortnames:["male_superhero"]},{unified:"1F9B8-200D-2640-FE0F",shortnames:["female_superhero"]},{unified:"1F9B9",shortnames:["supervillain"]},{unified:"1F9B9-200D-2642-FE0F",shortnames:["male_supervillain"]},{unified:"1F9B9-200D-2640-FE0F",shortnames:["female_supervillain"]},{unified:"1F9D9-200D-2642-FE0F",shortnames:["male_mage"]},{unified:"1F9D9-200D-2640-FE0F",shortnames:["female_mage","mage"]},{unified:"1F9DA-200D-2642-FE0F",shortnames:["male_fairy"]},{unified:"1F9DA-200D-2640-FE0F",shortnames:["female_fairy","fairy"]},{unified:"1F9DB-200D-2642-FE0F",shortnames:["male_vampire"]},{unified:"1F9DB-200D-2640-FE0F",shortnames:["female_vampire","vampire"]},{unified:"1F9DC-200D-2642-FE0F",shortnames:["merman","merperson"]},{unified:"1F9DC-200D-2640-FE0F",shortnames:["mermaid"]},{unified:"1F9DD-200D-2642-FE0F",shortnames:["male_elf","elf"]},{unified:"1F9DD-200D-2640-FE0F",shortnames:["female_elf"]},{unified:"1F9DE-200D-2642-FE0F",shortnames:["male_genie","genie"]},{unified:"1F9DE-200D-2640-FE0F",shortnames:["female_genie"]},{unified:"1F9DF-200D-2642-FE0F",shortnames:["male_zombie","zombie"]},{unified:"1F9DF-200D-2640-FE0F",shortnames:["female_zombie"]},{unified:"1F9CC",shortnames:["troll"]},{unified:"1F486-200D-2642-FE0F",shortnames:["man-getting-massage"]},{unified:"1F486-200D-2640-FE0F",shortnames:["woman-getting-massage","massage"]},{unified:"1F487-200D-2642-FE0F",shortnames:["man-getting-haircut"]},{unified:"1F487-200D-2640-FE0F",shortnames:["woman-getting-haircut","haircut"]},{unified:"1F6B6-200D-2642-FE0F",shortnames:["man-walking","walking"]},{unified:"1F6B6-200D-2640-FE0F",shortnames:["woman-walking"]},{unified:"1F6B6-200D-27A1-FE0F",shortnames:["person_walking_facing_right"]},{unified:"1F6B6-200D-2640-FE0F-200D-27A1-FE0F",shortnames:["woman_walking_facing_right"]},{unified:"1F6B6-200D-2642-FE0F-200D-27A1-FE0F",shortnames:["man_walking_facing_right"]},{unified:"1F9CD",shortnames:["standing_person"]},{unified:"1F9CD-200D-2642-FE0F",shortnames:["man_standing"]},{unified:"1F9CD-200D-2640-FE0F",shortnames:["woman_standing"]},{unified:"1F9CE",shortnames:["kneeling_person"]},{unified:"1F9CE-200D-2642-FE0F",shortnames:["man_kneeling"]},{unified:"1F9CE-200D-2640-FE0F",shortnames:["woman_kneeling"]},{unified:"1F9CE-200D-27A1-FE0F",shortnames:["person_kneeling_facing_right"]},{unified:"1F9CE-200D-2640-FE0F-200D-27A1-FE0F",shortnames:["woman_kneeling_facing_right"]},{unified:"1F9CE-200D-2642-FE0F-200D-27A1-FE0F",shortnames:["man_kneeling_facing_right"]},{unified:"1F9D1-200D-1F9AF",shortnames:["person_with_probing_cane"]},{unified:"1F9D1-200D-1F9AF-200D-27A1-FE0F",shortnames:["person_with_white_cane_facing_right"]},{unified:"1F468-200D-1F9AF",shortnames:["man_with_probing_cane"]},{unified:"1F468-200D-1F9AF-200D-27A1-FE0F",shortnames:["man_with_white_cane_facing_right"]},{unified:"1F469-200D-1F9AF",shortnames:["woman_with_probing_cane"]},{unified:"1F469-200D-1F9AF-200D-27A1-FE0F",shortnames:["woman_with_white_cane_facing_right"]},{unified:"1F9D1-200D-1F9BC",shortnames:["person_in_motorized_wheelchair"]},{unified:"1F9D1-200D-1F9BC-200D-27A1-FE0F",shortnames:["person_in_motorized_wheelchair_facing_right"]},{unified:"1F468-200D-1F9BC",shortnames:["man_in_motorized_wheelchair"]},{unified:"1F468-200D-1F9BC-200D-27A1-FE0F",shortnames:["man_in_motorized_wheelchair_facing_right"]},{unified:"1F469-200D-1F9BC",shortnames:["woman_in_motorized_wheelchair"]},{unified:"1F469-200D-1F9BC-200D-27A1-FE0F",shortnames:["woman_in_motorized_wheelchair_facing_right"]},{unified:"1F9D1-200D-1F9BD",shortnames:["person_in_manual_wheelchair"]},{unified:"1F9D1-200D-1F9BD-200D-27A1-FE0F",shortnames:["person_in_manual_wheelchair_facing_right"]},{unified:"1F468-200D-1F9BD",shortnames:["man_in_manual_wheelchair"]},{unified:"1F468-200D-1F9BD-200D-27A1-FE0F",shortnames:["man_in_manual_wheelchair_facing_right"]},{unified:"1F469-200D-1F9BD",shortnames:["woman_in_manual_wheelchair"]},{unified:"1F469-200D-1F9BD-200D-27A1-FE0F",shortnames:["woman_in_manual_wheelchair_facing_right"]},{unified:"1F3C3-200D-2642-FE0F",shortnames:["man-running","runner"]},{unified:"1F3C3-200D-2640-FE0F",shortnames:["woman-running"]},{unified:"1F3C3-200D-27A1-FE0F",shortnames:["person_running_facing_right"]},{unified:"1F3C3-200D-2640-FE0F-200D-27A1-FE0F",shortnames:["woman_running_facing_right"]},{unified:"1F3C3-200D-2642-FE0F-200D-27A1-FE0F",shortnames:["man_running_facing_right"]},{unified:"1F483",shortnames:["dancer"]},{unified:"1F57A",shortnames:["man_dancing"]},{unified:"1F574-FE0F",shortnames:["man_in_business_suit_levitating"]},{unified:"1F46F-200D-2642-FE0F",shortnames:["men-with-bunny-ears-partying"]},{unified:"1F46F-200D-2640-FE0F",shortnames:["women-with-bunny-ears-partying","dancers"]},{unified:"1F9D6-200D-2642-FE0F",shortnames:["man_in_steamy_room","person_in_steamy_room"]},{unified:"1F9D6-200D-2640-FE0F",shortnames:["woman_in_steamy_room"]},{unified:"1F9D7-200D-2642-FE0F",shortnames:["man_climbing"]},{unified:"1F9D7-200D-2640-FE0F",shortnames:["woman_climbing","person_climbing"]},{unified:"1F93A",shortnames:["fencer"]},{unified:"1F3C7",shortnames:["horse_racing"]},{unified:"26F7-FE0F",shortnames:["skier"]},{unified:"1F3C2",shortnames:["snowboarder"]},{unified:"1F3CC-FE0F-200D-2642-FE0F",shortnames:["man-golfing","golfer"]},{unified:"1F3CC-FE0F-200D-2640-FE0F",shortnames:["woman-golfing"]},{unified:"1F3C4-200D-2642-FE0F",shortnames:["man-surfing","surfer"]},{unified:"1F3C4-200D-2640-FE0F",shortnames:["woman-surfing"]},{unified:"1F6A3-200D-2642-FE0F",shortnames:["man-rowing-boat","rowboat"]},{unified:"1F6A3-200D-2640-FE0F",shortnames:["woman-rowing-boat"]},{unified:"1F3CA-200D-2642-FE0F",shortnames:["man-swimming","swimmer"]},{unified:"1F3CA-200D-2640-FE0F",shortnames:["woman-swimming"]},{unified:"26F9-FE0F-200D-2642-FE0F",shortnames:["man-bouncing-ball","person_with_ball"]},{unified:"26F9-FE0F-200D-2640-FE0F",shortnames:["woman-bouncing-ball"]},{unified:"1F3CB-FE0F-200D-2642-FE0F",shortnames:["man-lifting-weights","weight_lifter"]},{unified:"1F3CB-FE0F-200D-2640-FE0F",shortnames:["woman-lifting-weights"]},{unified:"1F6B4-200D-2642-FE0F",shortnames:["man-biking","bicyclist"]},{unified:"1F6B4-200D-2640-FE0F",shortnames:["woman-biking"]},{unified:"1F6B5-200D-2642-FE0F",shortnames:["man-mountain-biking","mountain_bicyclist"]},{unified:"1F6B5-200D-2640-FE0F",shortnames:["woman-mountain-biking"]},{unified:"1F938",shortnames:["person_doing_cartwheel"]},{unified:"1F938-200D-2642-FE0F",shortnames:["man-cartwheeling"]},{unified:"1F938-200D-2640-FE0F",shortnames:["woman-cartwheeling"]},{unified:"1F93C",shortnames:["wrestlers"]},{unified:"1F93C-200D-2642-FE0F",shortnames:["man-wrestling"]},{unified:"1F93C-200D-2640-FE0F",shortnames:["woman-wrestling"]},{unified:"1F93D",shortnames:["water_polo"]},{unified:"1F93D-200D-2642-FE0F",shortnames:["man-playing-water-polo"]},{unified:"1F93D-200D-2640-FE0F",shortnames:["woman-playing-water-polo"]},{unified:"1F93E",shortnames:["handball"]},{unified:"1F93E-200D-2642-FE0F",shortnames:["man-playing-handball"]},{unified:"1F93E-200D-2640-FE0F",shortnames:["woman-playing-handball"]},{unified:"1F939",shortnames:["juggling"]},{unified:"1F939-200D-2642-FE0F",shortnames:["man-juggling"]},{unified:"1F939-200D-2640-FE0F",shortnames:["woman-juggling"]},{unified:"1F9D8-200D-2642-FE0F",shortnames:["man_in_lotus_position"]},{unified:"1F9D8-200D-2640-FE0F",shortnames:["woman_in_lotus_position","person_in_lotus_position"]},{unified:"1F6C0",shortnames:["bath"]},{unified:"1F6CC",shortnames:["sleeping_accommodation"]},{unified:"1F9D1-200D-1F91D-200D-1F9D1",shortnames:["people_holding_hands"]},{unified:"1F46D",shortnames:["two_women_holding_hands"]},{unified:"1F46B",shortnames:["man_and_woman_holding_hands"]},{unified:"1F46C",shortnames:["two_men_holding_hands"]},{unified:"1F48F",shortnames:["couplekiss"]},{unified:"1F469-200D-2764-FE0F-200D-1F48B-200D-1F468",shortnames:["woman-kiss-man"]},{unified:"1F468-200D-2764-FE0F-200D-1F48B-200D-1F468",shortnames:["man-kiss-man"]},{unified:"1F469-200D-2764-FE0F-200D-1F48B-200D-1F469",shortnames:["woman-kiss-woman"]},{unified:"1F491",shortnames:["couple_with_heart"]},{unified:"1F469-200D-2764-FE0F-200D-1F468",shortnames:["woman-heart-man"]},{unified:"1F468-200D-2764-FE0F-200D-1F468",shortnames:["man-heart-man"]},{unified:"1F469-200D-2764-FE0F-200D-1F469",shortnames:["woman-heart-woman"]},{unified:"1F468-200D-1F469-200D-1F466",shortnames:["man-woman-boy","family"]},{unified:"1F468-200D-1F469-200D-1F467",shortnames:["man-woman-girl"]},{unified:"1F468-200D-1F469-200D-1F467-200D-1F466",shortnames:["man-woman-girl-boy"]},{unified:"1F468-200D-1F469-200D-1F466-200D-1F466",shortnames:["man-woman-boy-boy"]},{unified:"1F468-200D-1F469-200D-1F467-200D-1F467",shortnames:["man-woman-girl-girl"]},{unified:"1F468-200D-1F468-200D-1F466",shortnames:["man-man-boy"]},{unified:"1F468-200D-1F468-200D-1F467",shortnames:["man-man-girl"]},{unified:"1F468-200D-1F468-200D-1F467-200D-1F466",shortnames:["man-man-girl-boy"]},{unified:"1F468-200D-1F468-200D-1F466-200D-1F466",shortnames:["man-man-boy-boy"]},{unified:"1F468-200D-1F468-200D-1F467-200D-1F467",shortnames:["man-man-girl-girl"]},{unified:"1F469-200D-1F469-200D-1F466",shortnames:["woman-woman-boy"]},{unified:"1F469-200D-1F469-200D-1F467",shortnames:["woman-woman-girl"]},{unified:"1F469-200D-1F469-200D-1F467-200D-1F466",shortnames:["woman-woman-girl-boy"]},{unified:"1F469-200D-1F469-200D-1F466-200D-1F466",shortnames:["woman-woman-boy-boy"]},{unified:"1F469-200D-1F469-200D-1F467-200D-1F467",shortnames:["woman-woman-girl-girl"]},{unified:"1F468-200D-1F466",shortnames:["man-boy"]},{unified:"1F468-200D-1F466-200D-1F466",shortnames:["man-boy-boy"]},{unified:"1F468-200D-1F467",shortnames:["man-girl"]},{unified:"1F468-200D-1F467-200D-1F466",shortnames:["man-girl-boy"]},{unified:"1F468-200D-1F467-200D-1F467",shortnames:["man-girl-girl"]},{unified:"1F469-200D-1F466",shortnames:["woman-boy"]},{unified:"1F469-200D-1F466-200D-1F466",shortnames:["woman-boy-boy"]},{unified:"1F469-200D-1F467",shortnames:["woman-girl"]},{unified:"1F469-200D-1F467-200D-1F466",shortnames:["woman-girl-boy"]},{unified:"1F469-200D-1F467-200D-1F467",shortnames:["woman-girl-girl"]},{unified:"1F5E3-FE0F",shortnames:["speaking_head_in_silhouette"]},{unified:"1F464",shortnames:["bust_in_silhouette"]},{unified:"1F465",shortnames:["busts_in_silhouette"]},{unified:"1FAC2",shortnames:["people_hugging"]},{unified:"1F9D1-200D-1F9D1-200D-1F9D2",shortnames:["family_adult_adult_child"]},{unified:"1F9D1-200D-1F9D1-200D-1F9D2-200D-1F9D2",shortnames:["family_adult_adult_child_child"]},{unified:"1F9D1-200D-1F9D2",shortnames:["family_adult_child"]},{unified:"1F9D1-200D-1F9D2-200D-1F9D2",shortnames:["family_adult_child_child"]},{unified:"1F463",shortnames:["footprints"]}]},{name:"Animals & Nature",emojis:[{unified:"1F435",shortnames:["monkey_face"]},{unified:"1F412",shortnames:["monkey"]},{unified:"1F98D",shortnames:["gorilla"]},{unified:"1F9A7",shortnames:["orangutan"]},{unified:"1F436",shortnames:["dog"]},{unified:"1F415",shortnames:["dog2"]},{unified:"1F9AE",shortnames:["guide_dog"]},{unified:"1F415-200D-1F9BA",shortnames:["service_dog"]},{unified:"1F429",shortnames:["poodle"]},{unified:"1F43A",shortnames:["wolf"]},{unified:"1F98A",shortnames:["fox_face"]},{unified:"1F99D",shortnames:["raccoon"]},{unified:"1F431",shortnames:["cat"]},{unified:"1F408",shortnames:["cat2"]},{unified:"1F408-200D-2B1B",shortnames:["black_cat"]},{unified:"1F981",shortnames:["lion_face"]},{unified:"1F42F",shortnames:["tiger"]},{unified:"1F405",shortnames:["tiger2"]},{unified:"1F406",shortnames:["leopard"]},{unified:"1F434",shortnames:["horse"]},{unified:"1FACE",shortnames:["moose"]},{unified:"1FACF",shortnames:["donkey"]},{unified:"1F40E",shortnames:["racehorse"]},{unified:"1F984",shortnames:["unicorn_face"]},{unified:"1F993",shortnames:["zebra_face"]},{unified:"1F98C",shortnames:["deer"]},{unified:"1F9AC",shortnames:["bison"]},{unified:"1F42E",shortnames:["cow"]},{unified:"1F402",shortnames:["ox"]},{unified:"1F403",shortnames:["water_buffalo"]},{unified:"1F404",shortnames:["cow2"]},{unified:"1F437",shortnames:["pig"]},{unified:"1F416",shortnames:["pig2"]},{unified:"1F417",shortnames:["boar"]},{unified:"1F43D",shortnames:["pig_nose"]},{unified:"1F40F",shortnames:["ram"]},{unified:"1F411",shortnames:["sheep"]},{unified:"1F410",shortnames:["goat"]},{unified:"1F42A",shortnames:["dromedary_camel"]},{unified:"1F42B",shortnames:["camel"]},{unified:"1F999",shortnames:["llama"]},{unified:"1F992",shortnames:["giraffe_face"]},{unified:"1F418",shortnames:["elephant"]},{unified:"1F9A3",shortnames:["mammoth"]},{unified:"1F98F",shortnames:["rhinoceros"]},{unified:"1F99B",shortnames:["hippopotamus"]},{unified:"1F42D",shortnames:["mouse"]},{unified:"1F401",shortnames:["mouse2"]},{unified:"1F400",shortnames:["rat"]},{unified:"1F439",shortnames:["hamster"]},{unified:"1F430",shortnames:["rabbit"]},{unified:"1F407",shortnames:["rabbit2"]},{unified:"1F43F-FE0F",shortnames:["chipmunk"]},{unified:"1F9AB",shortnames:["beaver"]},{unified:"1F994",shortnames:["hedgehog"]},{unified:"1F987",shortnames:["bat"]},{unified:"1F43B",shortnames:["bear"]},{unified:"1F43B-200D-2744-FE0F",shortnames:["polar_bear"]},{unified:"1F428",shortnames:["koala"]},{unified:"1F43C",shortnames:["panda_face"]},{unified:"1F9A5",shortnames:["sloth"]},{unified:"1F9A6",shortnames:["otter"]},{unified:"1F9A8",shortnames:["skunk"]},{unified:"1F998",shortnames:["kangaroo"]},{unified:"1F9A1",shortnames:["badger"]},{unified:"1F43E",shortnames:["feet"]},{unified:"1F983",shortnames:["turkey"]},{unified:"1F414",shortnames:["chicken"]},{unified:"1F413",shortnames:["rooster"]},{unified:"1F423",shortnames:["hatching_chick"]},{unified:"1F424",shortnames:["baby_chick"]},{unified:"1F425",shortnames:["hatched_chick"]},{unified:"1F426",shortnames:["bird"]},{unified:"1F427",shortnames:["penguin"]},{unified:"1F54A-FE0F",shortnames:["dove_of_peace"]},{unified:"1F985",shortnames:["eagle"]},{unified:"1F986",shortnames:["duck"]},{unified:"1F9A2",shortnames:["swan"]},{unified:"1F989",shortnames:["owl"]},{unified:"1F9A4",shortnames:["dodo"]},{unified:"1FAB6",shortnames:["feather"]},{unified:"1F9A9",shortnames:["flamingo"]},{unified:"1F99A",shortnames:["peacock"]},{unified:"1F99C",shortnames:["parrot"]},{unified:"1FABD",shortnames:["wing"]},{unified:"1F426-200D-2B1B",shortnames:["black_bird"]},{unified:"1FABF",shortnames:["goose"]},{unified:"1F426-200D-1F525",shortnames:["phoenix"]},{unified:"1F438",shortnames:["frog"]},{unified:"1F40A",shortnames:["crocodile"]},{unified:"1F422",shortnames:["turtle"]},{unified:"1F98E",shortnames:["lizard"]},{unified:"1F40D",shortnames:["snake"]},{unified:"1F432",shortnames:["dragon_face"]},{unified:"1F409",shortnames:["dragon"]},{unified:"1F995",shortnames:["sauropod"]},{unified:"1F996",shortnames:["t-rex"]},{unified:"1F433",shortnames:["whale"]},{unified:"1F40B",shortnames:["whale2"]},{unified:"1F42C",shortnames:["dolphin"]},{unified:"1F9AD",shortnames:["seal"]},{unified:"1F41F",shortnames:["fish"]},{unified:"1F420",shortnames:["tropical_fish"]},{unified:"1F421",shortnames:["blowfish"]},{unified:"1F988",shortnames:["shark"]},{unified:"1F419",shortnames:["octopus"]},{unified:"1F41A",shortnames:["shell"]},{unified:"1FAB8",shortnames:["coral"]},{unified:"1FABC",shortnames:["jellyfish"]},{unified:"1F40C",shortnames:["snail"]},{unified:"1F98B",shortnames:["butterfly"]},{unified:"1F41B",shortnames:["bug"]},{unified:"1F41C",shortnames:["ant"]},{unified:"1F41D",shortnames:["bee"]},{unified:"1FAB2",shortnames:["beetle"]},{unified:"1F41E",shortnames:["ladybug"]},{unified:"1F997",shortnames:["cricket"]},{unified:"1FAB3",shortnames:["cockroach"]},{unified:"1F577-FE0F",shortnames:["spider"]},{unified:"1F578-FE0F",shortnames:["spider_web"]},{unified:"1F982",shortnames:["scorpion"]},{unified:"1F99F",shortnames:["mosquito"]},{unified:"1FAB0",shortnames:["fly"]},{unified:"1FAB1",shortnames:["worm"]},{unified:"1F9A0",shortnames:["microbe"]},{unified:"1F490",shortnames:["bouquet"]},{unified:"1F338",shortnames:["cherry_blossom"]},{unified:"1F4AE",shortnames:["white_flower"]},{unified:"1FAB7",shortnames:["lotus"]},{unified:"1F3F5-FE0F",shortnames:["rosette"]},{unified:"1F339",shortnames:["rose"]},{unified:"1F940",shortnames:["wilted_flower"]},{unified:"1F33A",shortnames:["hibiscus"]},{unified:"1F33B",shortnames:["sunflower"]},{unified:"1F33C",shortnames:["blossom"]},{unified:"1F337",shortnames:["tulip"]},{unified:"1FABB",shortnames:["hyacinth"]},{unified:"1F331",shortnames:["seedling"]},{unified:"1FAB4",shortnames:["potted_plant"]},{unified:"1F332",shortnames:["evergreen_tree"]},{unified:"1F333",shortnames:["deciduous_tree"]},{unified:"1F334",shortnames:["palm_tree"]},{unified:"1F335",shortnames:["cactus"]},{unified:"1F33E",shortnames:["ear_of_rice"]},{unified:"1F33F",shortnames:["herb"]},{unified:"2618-FE0F",shortnames:["shamrock"]},{unified:"1F340",shortnames:["four_leaf_clover"]},{unified:"1F341",shortnames:["maple_leaf"]},{unified:"1F342",shortnames:["fallen_leaf"]},{unified:"1F343",shortnames:["leaves"]},{unified:"1FAB9",shortnames:["empty_nest"]},{unified:"1FABA",shortnames:["nest_with_eggs"]},{unified:"1F344",shortnames:["mushroom"]}]},{name:"Food & Drink",emojis:[{unified:"1F347",shortnames:["grapes"]},{unified:"1F348",shortnames:["melon"]},{unified:"1F349",shortnames:["watermelon"]},{unified:"1F34A",shortnames:["tangerine"]},{unified:"1F34B",shortnames:["lemon"]},{unified:"1F34B-200D-1F7E9",shortnames:["lime"]},{unified:"1F34C",shortnames:["banana"]},{unified:"1F34D",shortnames:["pineapple"]},{unified:"1F96D",shortnames:["mango"]},{unified:"1F34E",shortnames:["apple"]},{unified:"1F34F",shortnames:["green_apple"]},{unified:"1F350",shortnames:["pear"]},{unified:"1F351",shortnames:["peach"]},{unified:"1F352",shortnames:["cherries"]},{unified:"1F353",shortnames:["strawberry"]},{unified:"1FAD0",shortnames:["blueberries"]},{unified:"1F95D",shortnames:["kiwifruit"]},{unified:"1F345",shortnames:["tomato"]},{unified:"1FAD2",shortnames:["olive"]},{unified:"1F965",shortnames:["coconut"]},{unified:"1F951",shortnames:["avocado"]},{unified:"1F346",shortnames:["eggplant"]},{unified:"1F954",shortnames:["potato"]},{unified:"1F955",shortnames:["carrot"]},{unified:"1F33D",shortnames:["corn"]},{unified:"1F336-FE0F",shortnames:["hot_pepper"]},{unified:"1FAD1",shortnames:["bell_pepper"]},{unified:"1F952",shortnames:["cucumber"]},{unified:"1F96C",shortnames:["leafy_green"]},{unified:"1F966",shortnames:["broccoli"]},{unified:"1F9C4",shortnames:["garlic"]},{unified:"1F9C5",shortnames:["onion"]},{unified:"1F95C",shortnames:["peanuts"]},{unified:"1FAD8",shortnames:["beans"]},{unified:"1F330",shortnames:["chestnut"]},{unified:"1FADA",shortnames:["ginger_root"]},{unified:"1FADB",shortnames:["pea_pod"]},{unified:"1F344-200D-1F7EB",shortnames:["brown_mushroom"]},{unified:"1F35E",shortnames:["bread"]},{unified:"1F950",shortnames:["croissant"]},{unified:"1F956",shortnames:["baguette_bread"]},{unified:"1FAD3",shortnames:["flatbread"]},{unified:"1F968",shortnames:["pretzel"]},{unified:"1F96F",shortnames:["bagel"]},{unified:"1F95E",shortnames:["pancakes"]},{unified:"1F9C7",shortnames:["waffle"]},{unified:"1F9C0",shortnames:["cheese_wedge"]},{unified:"1F356",shortnames:["meat_on_bone"]},{unified:"1F357",shortnames:["poultry_leg"]},{unified:"1F969",shortnames:["cut_of_meat"]},{unified:"1F953",shortnames:["bacon"]},{unified:"1F354",shortnames:["hamburger"]},{unified:"1F35F",shortnames:["fries"]},{unified:"1F355",shortnames:["pizza"]},{unified:"1F32D",shortnames:["hotdog"]},{unified:"1F96A",shortnames:["sandwich"]},{unified:"1F32E",shortnames:["taco"]},{unified:"1F32F",shortnames:["burrito"]},{unified:"1FAD4",shortnames:["tamale"]},{unified:"1F959",shortnames:["stuffed_flatbread"]},{unified:"1F9C6",shortnames:["falafel"]},{unified:"1F95A",shortnames:["egg"]},{unified:"1F373",shortnames:["fried_egg"]},{unified:"1F958",shortnames:["shallow_pan_of_food"]},{unified:"1F372",shortnames:["stew"]},{unified:"1FAD5",shortnames:["fondue"]},{unified:"1F963",shortnames:["bowl_with_spoon"]},{unified:"1F957",shortnames:["green_salad"]},{unified:"1F37F",shortnames:["popcorn"]},{unified:"1F9C8",shortnames:["butter"]},{unified:"1F9C2",shortnames:["salt"]},{unified:"1F96B",shortnames:["canned_food"]},{unified:"1F371",shortnames:["bento"]},{unified:"1F358",shortnames:["rice_cracker"]},{unified:"1F359",shortnames:["rice_ball"]},{unified:"1F35A",shortnames:["rice"]},{unified:"1F35B",shortnames:["curry"]},{unified:"1F35C",shortnames:["ramen"]},{unified:"1F35D",shortnames:["spaghetti"]},{unified:"1F360",shortnames:["sweet_potato"]},{unified:"1F362",shortnames:["oden"]},{unified:"1F363",shortnames:["sushi"]},{unified:"1F364",shortnames:["fried_shrimp"]},{unified:"1F365",shortnames:["fish_cake"]},{unified:"1F96E",shortnames:["moon_cake"]},{unified:"1F361",shortnames:["dango"]},{unified:"1F95F",shortnames:["dumpling"]},{unified:"1F960",shortnames:["fortune_cookie"]},{unified:"1F961",shortnames:["takeout_box"]},{unified:"1F980",shortnames:["crab"]},{unified:"1F99E",shortnames:["lobster"]},{unified:"1F990",shortnames:["shrimp"]},{unified:"1F991",shortnames:["squid"]},{unified:"1F9AA",shortnames:["oyster"]},{unified:"1F366",shortnames:["icecream"]},{unified:"1F367",shortnames:["shaved_ice"]},{unified:"1F368",shortnames:["ice_cream"]},{unified:"1F369",shortnames:["doughnut"]},{unified:"1F36A",shortnames:["cookie"]},{unified:"1F382",shortnames:["birthday"]},{unified:"1F370",shortnames:["cake"]},{unified:"1F9C1",shortnames:["cupcake"]},{unified:"1F967",shortnames:["pie"]},{unified:"1F36B",shortnames:["chocolate_bar"]},{unified:"1F36C",shortnames:["candy"]},{unified:"1F36D",shortnames:["lollipop"]},{unified:"1F36E",shortnames:["custard"]},{unified:"1F36F",shortnames:["honey_pot"]},{unified:"1F37C",shortnames:["baby_bottle"]},{unified:"1F95B",shortnames:["glass_of_milk"]},{unified:"2615",shortnames:["coffee"]},{unified:"1FAD6",shortnames:["teapot"]},{unified:"1F375",shortnames:["tea"]},{unified:"1F376",shortnames:["sake"]},{unified:"1F37E",shortnames:["champagne"]},{unified:"1F377",shortnames:["wine_glass"]},{unified:"1F378",shortnames:["cocktail"]},{unified:"1F379",shortnames:["tropical_drink"]},{unified:"1F37A",shortnames:["beer"]},{unified:"1F37B",shortnames:["beers"]},{unified:"1F942",shortnames:["clinking_glasses"]},{unified:"1F943",shortnames:["tumbler_glass"]},{unified:"1FAD7",shortnames:["pouring_liquid"]},{unified:"1F964",shortnames:["cup_with_straw"]},{unified:"1F9CB",shortnames:["bubble_tea"]},{unified:"1F9C3",shortnames:["beverage_box"]},{unified:"1F9C9",shortnames:["mate_drink"]},{unified:"1F9CA",shortnames:["ice_cube"]},{unified:"1F962",shortnames:["chopsticks"]},{unified:"1F37D-FE0F",shortnames:["knife_fork_plate"]},{unified:"1F374",shortnames:["fork_and_knife"]},{unified:"1F944",shortnames:["spoon"]},{unified:"1F52A",shortnames:["hocho"]},{unified:"1FAD9",shortnames:["jar"]},{unified:"1F3FA",shortnames:["amphora"]}]},{name:"Travel & Places",emojis:[{unified:"1F30D",shortnames:["earth_africa"]},{unified:"1F30E",shortnames:["earth_americas"]},{unified:"1F30F",shortnames:["earth_asia"]},{unified:"1F310",shortnames:["globe_with_meridians"]},{unified:"1F5FA-FE0F",shortnames:["world_map"]},{unified:"1F5FE",shortnames:["japan"]},{unified:"1F9ED",shortnames:["compass"]},{unified:"1F3D4-FE0F",shortnames:["snow_capped_mountain"]},{unified:"26F0-FE0F",shortnames:["mountain"]},{unified:"1F30B",shortnames:["volcano"]},{unified:"1F5FB",shortnames:["mount_fuji"]},{unified:"1F3D5-FE0F",shortnames:["camping"]},{unified:"1F3D6-FE0F",shortnames:["beach_with_umbrella"]},{unified:"1F3DC-FE0F",shortnames:["desert"]},{unified:"1F3DD-FE0F",shortnames:["desert_island"]},{unified:"1F3DE-FE0F",shortnames:["national_park"]},{unified:"1F3DF-FE0F",shortnames:["stadium"]},{unified:"1F3DB-FE0F",shortnames:["classical_building"]},{unified:"1F3D7-FE0F",shortnames:["building_construction"]},{unified:"1F9F1",shortnames:["bricks"]},{unified:"1FAA8",shortnames:["rock"]},{unified:"1FAB5",shortnames:["wood"]},{unified:"1F6D6",shortnames:["hut"]},{unified:"1F3D8-FE0F",shortnames:["house_buildings"]},{unified:"1F3DA-FE0F",shortnames:["derelict_house_building"]},{unified:"1F3E0",shortnames:["house"]},{unified:"1F3E1",shortnames:["house_with_garden"]},{unified:"1F3E2",shortnames:["office"]},{unified:"1F3E3",shortnames:["post_office"]},{unified:"1F3E4",shortnames:["european_post_office"]},{unified:"1F3E5",shortnames:["hospital"]},{unified:"1F3E6",shortnames:["bank"]},{unified:"1F3E8",shortnames:["hotel"]},{unified:"1F3E9",shortnames:["love_hotel"]},{unified:"1F3EA",shortnames:["convenience_store"]},{unified:"1F3EB",shortnames:["school"]},{unified:"1F3EC",shortnames:["department_store"]},{unified:"1F3ED",shortnames:["factory"]},{unified:"1F3EF",shortnames:["japanese_castle"]},{unified:"1F3F0",shortnames:["european_castle"]},{unified:"1F492",shortnames:["wedding"]},{unified:"1F5FC",shortnames:["tokyo_tower"]},{unified:"1F5FD",shortnames:["statue_of_liberty"]},{unified:"26EA",shortnames:["church"]},{unified:"1F54C",shortnames:["mosque"]},{unified:"1F6D5",shortnames:["hindu_temple"]},{unified:"1F54D",shortnames:["synagogue"]},{unified:"26E9-FE0F",shortnames:["shinto_shrine"]},{unified:"1F54B",shortnames:["kaaba"]},{unified:"26F2",shortnames:["fountain"]},{unified:"26FA",shortnames:["tent"]},{unified:"1F301",shortnames:["foggy"]},{unified:"1F303",shortnames:["night_with_stars"]},{unified:"1F3D9-FE0F",shortnames:["cityscape"]},{unified:"1F304",shortnames:["sunrise_over_mountains"]},{unified:"1F305",shortnames:["sunrise"]},{unified:"1F306",shortnames:["city_sunset"]},{unified:"1F307",shortnames:["city_sunrise"]},{unified:"1F309",shortnames:["bridge_at_night"]},{unified:"2668-FE0F",shortnames:["hotsprings"]},{unified:"1F3A0",shortnames:["carousel_horse"]},{unified:"1F6DD",shortnames:["playground_slide"]},{unified:"1F3A1",shortnames:["ferris_wheel"]},{unified:"1F3A2",shortnames:["roller_coaster"]},{unified:"1F488",shortnames:["barber"]},{unified:"1F3AA",shortnames:["circus_tent"]},{unified:"1F682",shortnames:["steam_locomotive"]},{unified:"1F683",shortnames:["railway_car"]},{unified:"1F684",shortnames:["bullettrain_side"]},{unified:"1F685",shortnames:["bullettrain_front"]},{unified:"1F686",shortnames:["train2"]},{unified:"1F687",shortnames:["metro"]},{unified:"1F688",shortnames:["light_rail"]},{unified:"1F689",shortnames:["station"]},{unified:"1F68A",shortnames:["tram"]},{unified:"1F69D",shortnames:["monorail"]},{unified:"1F69E",shortnames:["mountain_railway"]},{unified:"1F68B",shortnames:["train"]},{unified:"1F68C",shortnames:["bus"]},{unified:"1F68D",shortnames:["oncoming_bus"]},{unified:"1F68E",shortnames:["trolleybus"]},{unified:"1F690",shortnames:["minibus"]},{unified:"1F691",shortnames:["ambulance"]},{unified:"1F692",shortnames:["fire_engine"]},{unified:"1F693",shortnames:["police_car"]},{unified:"1F694",shortnames:["oncoming_police_car"]},{unified:"1F695",shortnames:["taxi"]},{unified:"1F696",shortnames:["oncoming_taxi"]},{unified:"1F697",shortnames:["car"]},{unified:"1F698",shortnames:["oncoming_automobile"]},{unified:"1F699",shortnames:["blue_car"]},{unified:"1F6FB",shortnames:["pickup_truck"]},{unified:"1F69A",shortnames:["truck"]},{unified:"1F69B",shortnames:["articulated_lorry"]},{unified:"1F69C",shortnames:["tractor"]},{unified:"1F3CE-FE0F",shortnames:["racing_car"]},{unified:"1F3CD-FE0F",shortnames:["racing_motorcycle"]},{unified:"1F6F5",shortnames:["motor_scooter"]},{unified:"1F9BD",shortnames:["manual_wheelchair"]},{unified:"1F9BC",shortnames:["motorized_wheelchair"]},{unified:"1F6FA",shortnames:["auto_rickshaw"]},{unified:"1F6B2",shortnames:["bike"]},{unified:"1F6F4",shortnames:["scooter"]},{unified:"1F6F9",shortnames:["skateboard"]},{unified:"1F6FC",shortnames:["roller_skate"]},{unified:"1F68F",shortnames:["busstop"]},{unified:"1F6E3-FE0F",shortnames:["motorway"]},{unified:"1F6E4-FE0F",shortnames:["railway_track"]},{unified:"1F6E2-FE0F",shortnames:["oil_drum"]},{unified:"26FD",shortnames:["fuelpump"]},{unified:"1F6DE",shortnames:["wheel"]},{unified:"1F6A8",shortnames:["rotating_light"]},{unified:"1F6A5",shortnames:["traffic_light"]},{unified:"1F6A6",shortnames:["vertical_traffic_light"]},{unified:"1F6D1",shortnames:["octagonal_sign"]},{unified:"1F6A7",shortnames:["construction"]},{unified:"2693",shortnames:["anchor"]},{unified:"1F6DF",shortnames:["ring_buoy"]},{unified:"26F5",shortnames:["boat"]},{unified:"1F6F6",shortnames:["canoe"]},{unified:"1F6A4",shortnames:["speedboat"]},{unified:"1F6F3-FE0F",shortnames:["passenger_ship"]},{unified:"26F4-FE0F",shortnames:["ferry"]},{unified:"1F6E5-FE0F",shortnames:["motor_boat"]},{unified:"1F6A2",shortnames:["ship"]},{unified:"2708-FE0F",shortnames:["airplane"]},{unified:"1F6E9-FE0F",shortnames:["small_airplane"]},{unified:"1F6EB",shortnames:["airplane_departure"]},{unified:"1F6EC",shortnames:["airplane_arriving"]},{unified:"1FA82",shortnames:["parachute"]},{unified:"1F4BA",shortnames:["seat"]},{unified:"1F681",shortnames:["helicopter"]},{unified:"1F69F",shortnames:["suspension_railway"]},{unified:"1F6A0",shortnames:["mountain_cableway"]},{unified:"1F6A1",shortnames:["aerial_tramway"]},{unified:"1F6F0-FE0F",shortnames:["satellite"]},{unified:"1F680",shortnames:["rocket"]},{unified:"1F6F8",shortnames:["flying_saucer"]},{unified:"1F6CE-FE0F",shortnames:["bellhop_bell"]},{unified:"1F9F3",shortnames:["luggage"]},{unified:"231B",shortnames:["hourglass"]},{unified:"23F3",shortnames:["hourglass_flowing_sand"]},{unified:"231A",shortnames:["watch"]},{unified:"23F0",shortnames:["alarm_clock"]},{unified:"23F1-FE0F",shortnames:["stopwatch"]},{unified:"23F2-FE0F",shortnames:["timer_clock"]},{unified:"1F570-FE0F",shortnames:["mantelpiece_clock"]},{unified:"1F55B",shortnames:["clock12"]},{unified:"1F567",shortnames:["clock1230"]},{unified:"1F550",shortnames:["clock1"]},{unified:"1F55C",shortnames:["clock130"]},{unified:"1F551",shortnames:["clock2"]},{unified:"1F55D",shortnames:["clock230"]},{unified:"1F552",shortnames:["clock3"]},{unified:"1F55E",shortnames:["clock330"]},{unified:"1F553",shortnames:["clock4"]},{unified:"1F55F",shortnames:["clock430"]},{unified:"1F554",shortnames:["clock5"]},{unified:"1F560",shortnames:["clock530"]},{unified:"1F555",shortnames:["clock6"]},{unified:"1F561",shortnames:["clock630"]},{unified:"1F556",shortnames:["clock7"]},{unified:"1F562",shortnames:["clock730"]},{unified:"1F557",shortnames:["clock8"]},{unified:"1F563",shortnames:["clock830"]},{unified:"1F558",shortnames:["clock9"]},{unified:"1F564",shortnames:["clock930"]},{unified:"1F559",shortnames:["clock10"]},{unified:"1F565",shortnames:["clock1030"]},{unified:"1F55A",shortnames:["clock11"]},{unified:"1F566",shortnames:["clock1130"]},{unified:"1F311",shortnames:["new_moon"]},{unified:"1F312",shortnames:["waxing_crescent_moon"]},{unified:"1F313",shortnames:["first_quarter_moon"]},{unified:"1F314",shortnames:["moon"]},{unified:"1F315",shortnames:["full_moon"]},{unified:"1F316",shortnames:["waning_gibbous_moon"]},{unified:"1F317",shortnames:["last_quarter_moon"]},{unified:"1F318",shortnames:["waning_crescent_moon"]},{unified:"1F319",shortnames:["crescent_moon"]},{unified:"1F31A",shortnames:["new_moon_with_face"]},{unified:"1F31B",shortnames:["first_quarter_moon_with_face"]},{unified:"1F31C",shortnames:["last_quarter_moon_with_face"]},{unified:"1F321-FE0F",shortnames:["thermometer"]},{unified:"2600-FE0F",shortnames:["sunny"]},{unified:"1F31D",shortnames:["full_moon_with_face"]},{unified:"1F31E",shortnames:["sun_with_face"]},{unified:"1FA90",shortnames:["ringed_planet"]},{unified:"2B50",shortnames:["star"]},{unified:"1F31F",shortnames:["star2"]},{unified:"1F320",shortnames:["stars"]},{unified:"1F30C",shortnames:["milky_way"]},{unified:"2601-FE0F",shortnames:["cloud"]},{unified:"26C5",shortnames:["partly_sunny"]},{unified:"26C8-FE0F",shortnames:["thunder_cloud_and_rain"]},{unified:"1F324-FE0F",shortnames:["mostly_sunny"]},{unified:"1F325-FE0F",shortnames:["barely_sunny"]},{unified:"1F326-FE0F",shortnames:["partly_sunny_rain"]},{unified:"1F327-FE0F",shortnames:["rain_cloud"]},{unified:"1F328-FE0F",shortnames:["snow_cloud"]},{unified:"1F329-FE0F",shortnames:["lightning"]},{unified:"1F32A-FE0F",shortnames:["tornado"]},{unified:"1F32B-FE0F",shortnames:["fog"]},{unified:"1F32C-FE0F",shortnames:["wind_blowing_face"]},{unified:"1F300",shortnames:["cyclone"]},{unified:"1F308",shortnames:["rainbow"]},{unified:"1F302",shortnames:["closed_umbrella"]},{unified:"2602-FE0F",shortnames:["umbrella"]},{unified:"2614",shortnames:["umbrella_with_rain_drops"]},{unified:"26F1-FE0F",shortnames:["umbrella_on_ground"]},{unified:"26A1",shortnames:["zap"]},{unified:"2744-FE0F",shortnames:["snowflake"]},{unified:"2603-FE0F",shortnames:["snowman"]},{unified:"26C4",shortnames:["snowman_without_snow"]},{unified:"2604-FE0F",shortnames:["comet"]},{unified:"1F525",shortnames:["fire"]},{unified:"1F4A7",shortnames:["droplet"]},{unified:"1F30A",shortnames:["ocean"]}]},{name:"Activities",emojis:[{unified:"1F383",shortnames:["jack_o_lantern"]},{unified:"1F384",shortnames:["christmas_tree"]},{unified:"1F386",shortnames:["fireworks"]},{unified:"1F387",shortnames:["sparkler"]},{unified:"1F9E8",shortnames:["firecracker"]},{unified:"2728",shortnames:["sparkles"]},{unified:"1F388",shortnames:["balloon"]},{unified:"1F389",shortnames:["tada"]},{unified:"1F38A",shortnames:["confetti_ball"]},{unified:"1F38B",shortnames:["tanabata_tree"]},{unified:"1F38D",shortnames:["bamboo"]},{unified:"1F38E",shortnames:["dolls"]},{unified:"1F38F",shortnames:["flags"]},{unified:"1F390",shortnames:["wind_chime"]},{unified:"1F391",shortnames:["rice_scene"]},{unified:"1F9E7",shortnames:["red_envelope"]},{unified:"1F380",shortnames:["ribbon"]},{unified:"1F381",shortnames:["gift"]},{unified:"1F397-FE0F",shortnames:["reminder_ribbon"]},{unified:"1F39F-FE0F",shortnames:["admission_tickets"]},{unified:"1F3AB",shortnames:["ticket"]},{unified:"1F396-FE0F",shortnames:["medal"]},{unified:"1F3C6",shortnames:["trophy"]},{unified:"1F3C5",shortnames:["sports_medal"]},{unified:"1F947",shortnames:["first_place_medal"]},{unified:"1F948",shortnames:["second_place_medal"]},{unified:"1F949",shortnames:["third_place_medal"]},{unified:"26BD",shortnames:["soccer"]},{unified:"26BE",shortnames:["baseball"]},{unified:"1F94E",shortnames:["softball"]},{unified:"1F3C0",shortnames:["basketball"]},{unified:"1F3D0",shortnames:["volleyball"]},{unified:"1F3C8",shortnames:["football"]},{unified:"1F3C9",shortnames:["rugby_football"]},{unified:"1F3BE",shortnames:["tennis"]},{unified:"1F94F",shortnames:["flying_disc"]},{unified:"1F3B3",shortnames:["bowling"]},{unified:"1F3CF",shortnames:["cricket_bat_and_ball"]},{unified:"1F3D1",shortnames:["field_hockey_stick_and_ball"]},{unified:"1F3D2",shortnames:["ice_hockey_stick_and_puck"]},{unified:"1F94D",shortnames:["lacrosse"]},{unified:"1F3D3",shortnames:["table_tennis_paddle_and_ball"]},{unified:"1F3F8",shortnames:["badminton_racquet_and_shuttlecock"]},{unified:"1F94A",shortnames:["boxing_glove"]},{unified:"1F94B",shortnames:["martial_arts_uniform"]},{unified:"1F945",shortnames:["goal_net"]},{unified:"26F3",shortnames:["golf"]},{unified:"26F8-FE0F",shortnames:["ice_skate"]},{unified:"1F3A3",shortnames:["fishing_pole_and_fish"]},{unified:"1F93F",shortnames:["diving_mask"]},{unified:"1F3BD",shortnames:["running_shirt_with_sash"]},{unified:"1F3BF",shortnames:["ski"]},{unified:"1F6F7",shortnames:["sled"]},{unified:"1F94C",shortnames:["curling_stone"]},{unified:"1F3AF",shortnames:["dart"]},{unified:"1FA80",shortnames:["yo-yo"]},{unified:"1FA81",shortnames:["kite"]},{unified:"1F52B",shortnames:["gun"]},{unified:"1F3B1",shortnames:["8ball"]},{unified:"1F52E",shortnames:["crystal_ball"]},{unified:"1FA84",shortnames:["magic_wand"]},{unified:"1F3AE",shortnames:["video_game"]},{unified:"1F579-FE0F",shortnames:["joystick"]},{unified:"1F3B0",shortnames:["slot_machine"]},{unified:"1F3B2",shortnames:["game_die"]},{unified:"1F9E9",shortnames:["jigsaw"]},{unified:"1F9F8",shortnames:["teddy_bear"]},{unified:"1FA85",shortnames:["pinata"]},{unified:"1FAA9",shortnames:["mirror_ball"]},{unified:"1FA86",shortnames:["nesting_dolls"]},{unified:"2660-FE0F",shortnames:["spades"]},{unified:"2665-FE0F",shortnames:["hearts"]},{unified:"2666-FE0F",shortnames:["diamonds"]},{unified:"2663-FE0F",shortnames:["clubs"]},{unified:"265F-FE0F",shortnames:["chess_pawn"]},{unified:"1F0CF",shortnames:["black_joker"]},{unified:"1F004",shortnames:["mahjong"]},{unified:"1F3B4",shortnames:["flower_playing_cards"]},{unified:"1F3AD",shortnames:["performing_arts"]},{unified:"1F5BC-FE0F",shortnames:["frame_with_picture"]},{unified:"1F3A8",shortnames:["art"]},{unified:"1F9F5",shortnames:["thread"]},{unified:"1FAA1",shortnames:["sewing_needle"]},{unified:"1F9F6",shortnames:["yarn"]},{unified:"1FAA2",shortnames:["knot"]}]},{name:"Objects",emojis:[{unified:"1F453",shortnames:["eyeglasses"]},{unified:"1F576-FE0F",shortnames:["dark_sunglasses"]},{unified:"1F97D",shortnames:["goggles"]},{unified:"1F97C",shortnames:["lab_coat"]},{unified:"1F9BA",shortnames:["safety_vest"]},{unified:"1F454",shortnames:["necktie"]},{unified:"1F455",shortnames:["shirt"]},{unified:"1F456",shortnames:["jeans"]},{unified:"1F9E3",shortnames:["scarf"]},{unified:"1F9E4",shortnames:["gloves"]},{unified:"1F9E5",shortnames:["coat"]},{unified:"1F9E6",shortnames:["socks"]},{unified:"1F457",shortnames:["dress"]},{unified:"1F458",shortnames:["kimono"]},{unified:"1F97B",shortnames:["sari"]},{unified:"1FA71",shortnames:["one-piece_swimsuit"]},{unified:"1FA72",shortnames:["briefs"]},{unified:"1FA73",shortnames:["shorts"]},{unified:"1F459",shortnames:["bikini"]},{unified:"1F45A",shortnames:["womans_clothes"]},{unified:"1FAAD",shortnames:["folding_hand_fan"]},{unified:"1F45B",shortnames:["purse"]},{unified:"1F45C",shortnames:["handbag"]},{unified:"1F45D",shortnames:["pouch"]},{unified:"1F6CD-FE0F",shortnames:["shopping_bags"]},{unified:"1F392",shortnames:["school_satchel"]},{unified:"1FA74",shortnames:["thong_sandal"]},{unified:"1F45E",shortnames:["mans_shoe"]},{unified:"1F45F",shortnames:["athletic_shoe"]},{unified:"1F97E",shortnames:["hiking_boot"]},{unified:"1F97F",shortnames:["womans_flat_shoe"]},{unified:"1F460",shortnames:["high_heel"]},{unified:"1F461",shortnames:["sandal"]},{unified:"1FA70",shortnames:["ballet_shoes"]},{unified:"1F462",shortnames:["boot"]},{unified:"1FAAE",shortnames:["hair_pick"]},{unified:"1F451",shortnames:["crown"]},{unified:"1F452",shortnames:["womans_hat"]},{unified:"1F3A9",shortnames:["tophat"]},{unified:"1F393",shortnames:["mortar_board"]},{unified:"1F9E2",shortnames:["billed_cap"]},{unified:"1FA96",shortnames:["military_helmet"]},{unified:"26D1-FE0F",shortnames:["helmet_with_white_cross"]},{unified:"1F4FF",shortnames:["prayer_beads"]},{unified:"1F484",shortnames:["lipstick"]},{unified:"1F48D",shortnames:["ring"]},{unified:"1F48E",shortnames:["gem"]},{unified:"1F507",shortnames:["mute"]},{unified:"1F508",shortnames:["speaker"]},{unified:"1F509",shortnames:["sound"]},{unified:"1F50A",shortnames:["loud_sound"]},{unified:"1F4E2",shortnames:["loudspeaker"]},{unified:"1F4E3",shortnames:["mega"]},{unified:"1F4EF",shortnames:["postal_horn"]},{unified:"1F514",shortnames:["bell"]},{unified:"1F515",shortnames:["no_bell"]},{unified:"1F3BC",shortnames:["musical_score"]},{unified:"1F3B5",shortnames:["musical_note"]},{unified:"1F3B6",shortnames:["notes"]},{unified:"1F399-FE0F",shortnames:["studio_microphone"]},{unified:"1F39A-FE0F",shortnames:["level_slider"]},{unified:"1F39B-FE0F",shortnames:["control_knobs"]},{unified:"1F3A4",shortnames:["microphone"]},{unified:"1F3A7",shortnames:["headphones"]},{unified:"1F4FB",shortnames:["radio"]},{unified:"1F3B7",shortnames:["saxophone"]},{unified:"1FA97",shortnames:["accordion"]},{unified:"1F3B8",shortnames:["guitar"]},{unified:"1F3B9",shortnames:["musical_keyboard"]},{unified:"1F3BA",shortnames:["trumpet"]},{unified:"1F3BB",shortnames:["violin"]},{unified:"1FA95",shortnames:["banjo"]},{unified:"1F941",shortnames:["drum_with_drumsticks"]},{unified:"1FA98",shortnames:["long_drum"]},{unified:"1FA87",shortnames:["maracas"]},{unified:"1FA88",shortnames:["flute"]},{unified:"1F4F1",shortnames:["iphone"]},{unified:"1F4F2",shortnames:["calling"]},{unified:"260E-FE0F",shortnames:["phone"]},{unified:"1F4DE",shortnames:["telephone_receiver"]},{unified:"1F4DF",shortnames:["pager"]},{unified:"1F4E0",shortnames:["fax"]},{unified:"1F50B",shortnames:["battery"]},{unified:"1FAAB",shortnames:["low_battery"]},{unified:"1F50C",shortnames:["electric_plug"]},{unified:"1F4BB",shortnames:["computer"]},{unified:"1F5A5-FE0F",shortnames:["desktop_computer"]},{unified:"1F5A8-FE0F",shortnames:["printer"]},{unified:"2328-FE0F",shortnames:["keyboard"]},{unified:"1F5B1-FE0F",shortnames:["three_button_mouse"]},{unified:"1F5B2-FE0F",shortnames:["trackball"]},{unified:"1F4BD",shortnames:["minidisc"]},{unified:"1F4BE",shortnames:["floppy_disk"]},{unified:"1F4BF",shortnames:["cd"]},{unified:"1F4C0",shortnames:["dvd"]},{unified:"1F9EE",shortnames:["abacus"]},{unified:"1F3A5",shortnames:["movie_camera"]},{unified:"1F39E-FE0F",shortnames:["film_frames"]},{unified:"1F4FD-FE0F",shortnames:["film_projector"]},{unified:"1F3AC",shortnames:["clapper"]},{unified:"1F4FA",shortnames:["tv"]},{unified:"1F4F7",shortnames:["camera"]},{unified:"1F4F8",shortnames:["camera_with_flash"]},{unified:"1F4F9",shortnames:["video_camera"]},{unified:"1F4FC",shortnames:["vhs"]},{unified:"1F50D",shortnames:["mag"]},{unified:"1F50E",shortnames:["mag_right"]},{unified:"1F56F-FE0F",shortnames:["candle"]},{unified:"1F4A1",shortnames:["bulb"]},{unified:"1F526",shortnames:["flashlight"]},{unified:"1F3EE",shortnames:["izakaya_lantern"]},{unified:"1FA94",shortnames:["diya_lamp"]},{unified:"1F4D4",shortnames:["notebook_with_decorative_cover"]},{unified:"1F4D5",shortnames:["closed_book"]},{unified:"1F4D6",shortnames:["book"]},{unified:"1F4D7",shortnames:["green_book"]},{unified:"1F4D8",shortnames:["blue_book"]},{unified:"1F4D9",shortnames:["orange_book"]},{unified:"1F4DA",shortnames:["books"]},{unified:"1F4D3",shortnames:["notebook"]},{unified:"1F4D2",shortnames:["ledger"]},{unified:"1F4C3",shortnames:["page_with_curl"]},{unified:"1F4DC",shortnames:["scroll"]},{unified:"1F4C4",shortnames:["page_facing_up"]},{unified:"1F4F0",shortnames:["newspaper"]},{unified:"1F5DE-FE0F",shortnames:["rolled_up_newspaper"]},{unified:"1F4D1",shortnames:["bookmark_tabs"]},{unified:"1F516",shortnames:["bookmark"]},{unified:"1F3F7-FE0F",shortnames:["label"]},{unified:"1F4B0",shortnames:["moneybag"]},{unified:"1FA99",shortnames:["coin"]},{unified:"1F4B4",shortnames:["yen"]},{unified:"1F4B5",shortnames:["dollar"]},{unified:"1F4B6",shortnames:["euro"]},{unified:"1F4B7",shortnames:["pound"]},{unified:"1F4B8",shortnames:["money_with_wings"]},{unified:"1F4B3",shortnames:["credit_card"]},{unified:"1F9FE",shortnames:["receipt"]},{unified:"1F4B9",shortnames:["chart"]},{unified:"2709-FE0F",shortnames:["email"]},{unified:"1F4E7",shortnames:["e-mail"]},{unified:"1F4E8",shortnames:["incoming_envelope"]},{unified:"1F4E9",shortnames:["envelope_with_arrow"]},{unified:"1F4E4",shortnames:["outbox_tray"]},{unified:"1F4E5",shortnames:["inbox_tray"]},{unified:"1F4E6",shortnames:["package"]},{unified:"1F4EB",shortnames:["mailbox"]},{unified:"1F4EA",shortnames:["mailbox_closed"]},{unified:"1F4EC",shortnames:["mailbox_with_mail"]},{unified:"1F4ED",shortnames:["mailbox_with_no_mail"]},{unified:"1F4EE",shortnames:["postbox"]},{unified:"1F5F3-FE0F",shortnames:["ballot_box_with_ballot"]},{unified:"270F-FE0F",shortnames:["pencil2"]},{unified:"2712-FE0F",shortnames:["black_nib"]},{unified:"1F58B-FE0F",shortnames:["lower_left_fountain_pen"]},{unified:"1F58A-FE0F",shortnames:["lower_left_ballpoint_pen"]},{unified:"1F58C-FE0F",shortnames:["lower_left_paintbrush"]},{unified:"1F58D-FE0F",shortnames:["lower_left_crayon"]},{unified:"1F4DD",shortnames:["memo"]},{unified:"1F4BC",shortnames:["briefcase"]},{unified:"1F4C1",shortnames:["file_folder"]},{unified:"1F4C2",shortnames:["open_file_folder"]},{unified:"1F5C2-FE0F",shortnames:["card_index_dividers"]},{unified:"1F4C5",shortnames:["date"]},{unified:"1F4C6",shortnames:["calendar"]},{unified:"1F5D2-FE0F",shortnames:["spiral_note_pad"]},{unified:"1F5D3-FE0F",shortnames:["spiral_calendar_pad"]},{unified:"1F4C7",shortnames:["card_index"]},{unified:"1F4C8",shortnames:["chart_with_upwards_trend"]},{unified:"1F4C9",shortnames:["chart_with_downwards_trend"]},{unified:"1F4CA",shortnames:["bar_chart"]},{unified:"1F4CB",shortnames:["clipboard"]},{unified:"1F4CC",shortnames:["pushpin"]},{unified:"1F4CD",shortnames:["round_pushpin"]},{unified:"1F4CE",shortnames:["paperclip"]},{unified:"1F587-FE0F",shortnames:["linked_paperclips"]},{unified:"1F4CF",shortnames:["straight_ruler"]},{unified:"1F4D0",shortnames:["triangular_ruler"]},{unified:"2702-FE0F",shortnames:["scissors"]},{unified:"1F5C3-FE0F",shortnames:["card_file_box"]},{unified:"1F5C4-FE0F",shortnames:["file_cabinet"]},{unified:"1F5D1-FE0F",shortnames:["wastebasket"]},{unified:"1F512",shortnames:["lock"]},{unified:"1F513",shortnames:["unlock"]},{unified:"1F50F",shortnames:["lock_with_ink_pen"]},{unified:"1F510",shortnames:["closed_lock_with_key"]},{unified:"1F511",shortnames:["key"]},{unified:"1F5DD-FE0F",shortnames:["old_key"]},{unified:"1F528",shortnames:["hammer"]},{unified:"1FA93",shortnames:["axe"]},{unified:"26CF-FE0F",shortnames:["pick"]},{unified:"2692-FE0F",shortnames:["hammer_and_pick"]},{unified:"1F6E0-FE0F",shortnames:["hammer_and_wrench"]},{unified:"1F5E1-FE0F",shortnames:["dagger_knife"]},{unified:"2694-FE0F",shortnames:["crossed_swords"]},{unified:"1F4A3",shortnames:["bomb"]},{unified:"1FA83",shortnames:["boomerang"]},{unified:"1F3F9",shortnames:["bow_and_arrow"]},{unified:"1F6E1-FE0F",shortnames:["shield"]},{unified:"1FA9A",shortnames:["carpentry_saw"]},{unified:"1F527",shortnames:["wrench"]},{unified:"1FA9B",shortnames:["screwdriver"]},{unified:"1F529",shortnames:["nut_and_bolt"]},{unified:"2699-FE0F",shortnames:["gear"]},{unified:"1F5DC-FE0F",shortnames:["compression"]},{unified:"2696-FE0F",shortnames:["scales"]},{unified:"1F9AF",shortnames:["probing_cane"]},{unified:"1F517",shortnames:["link"]},{unified:"26D3-FE0F-200D-1F4A5",shortnames:["broken_chain"]},{unified:"26D3-FE0F",shortnames:["chains"]},{unified:"1FA9D",shortnames:["hook"]},{unified:"1F9F0",shortnames:["toolbox"]},{unified:"1F9F2",shortnames:["magnet"]},{unified:"1FA9C",shortnames:["ladder"]},{unified:"2697-FE0F",shortnames:["alembic"]},{unified:"1F9EA",shortnames:["test_tube"]},{unified:"1F9EB",shortnames:["petri_dish"]},{unified:"1F9EC",shortnames:["dna"]},{unified:"1F52C",shortnames:["microscope"]},{unified:"1F52D",shortnames:["telescope"]},{unified:"1F4E1",shortnames:["satellite_antenna"]},{unified:"1F489",shortnames:["syringe"]},{unified:"1FA78",shortnames:["drop_of_blood"]},{unified:"1F48A",shortnames:["pill"]},{unified:"1FA79",shortnames:["adhesive_bandage"]},{unified:"1FA7C",shortnames:["crutch"]},{unified:"1FA7A",shortnames:["stethoscope"]},{unified:"1FA7B",shortnames:["x-ray"]},{unified:"1F6AA",shortnames:["door"]},{unified:"1F6D7",shortnames:["elevator"]},{unified:"1FA9E",shortnames:["mirror"]},{unified:"1FA9F",shortnames:["window"]},{unified:"1F6CF-FE0F",shortnames:["bed"]},{unified:"1F6CB-FE0F",shortnames:["couch_and_lamp"]},{unified:"1FA91",shortnames:["chair"]},{unified:"1F6BD",shortnames:["toilet"]},{unified:"1FAA0",shortnames:["plunger"]},{unified:"1F6BF",shortnames:["shower"]},{unified:"1F6C1",shortnames:["bathtub"]},{unified:"1FAA4",shortnames:["mouse_trap"]},{unified:"1FA92",shortnames:["razor"]},{unified:"1F9F4",shortnames:["lotion_bottle"]},{unified:"1F9F7",shortnames:["safety_pin"]},{unified:"1F9F9",shortnames:["broom"]},{unified:"1F9FA",shortnames:["basket"]},{unified:"1F9FB",shortnames:["roll_of_paper"]},{unified:"1FAA3",shortnames:["bucket"]},{unified:"1F9FC",shortnames:["soap"]},{unified:"1FAE7",shortnames:["bubbles"]},{unified:"1FAA5",shortnames:["toothbrush"]},{unified:"1F9FD",shortnames:["sponge"]},{unified:"1F9EF",shortnames:["fire_extinguisher"]},{unified:"1F6D2",shortnames:["shopping_trolley"]},{unified:"1F6AC",shortnames:["smoking"]},{unified:"26B0-FE0F",shortnames:["coffin"]},{unified:"1FAA6",shortnames:["headstone"]},{unified:"26B1-FE0F",shortnames:["funeral_urn"]},{unified:"1F9FF",shortnames:["nazar_amulet"]},{unified:"1FAAC",shortnames:["hamsa"]},{unified:"1F5FF",shortnames:["moyai"]},{unified:"1FAA7",shortnames:["placard"]},{unified:"1FAAA",shortnames:["identification_card"]}]},{name:"Symbols",emojis:[{unified:"1F3E7",shortnames:["atm"]},{unified:"1F6AE",shortnames:["put_litter_in_its_place"]},{unified:"1F6B0",shortnames:["potable_water"]},{unified:"267F",shortnames:["wheelchair"]},{unified:"1F6B9",shortnames:["mens"]},{unified:"1F6BA",shortnames:["womens"]},{unified:"1F6BB",shortnames:["restroom"]},{unified:"1F6BC",shortnames:["baby_symbol"]},{unified:"1F6BE",shortnames:["wc"]},{unified:"1F6C2",shortnames:["passport_control"]},{unified:"1F6C3",shortnames:["customs"]},{unified:"1F6C4",shortnames:["baggage_claim"]},{unified:"1F6C5",shortnames:["left_luggage"]},{unified:"26A0-FE0F",shortnames:["warning"]},{unified:"1F6B8",shortnames:["children_crossing"]},{unified:"26D4",shortnames:["no_entry"]},{unified:"1F6AB",shortnames:["no_entry_sign"]},{unified:"1F6B3",shortnames:["no_bicycles"]},{unified:"1F6AD",shortnames:["no_smoking"]},{unified:"1F6AF",shortnames:["do_not_litter"]},{unified:"1F6B1",shortnames:["non-potable_water"]},{unified:"1F6B7",shortnames:["no_pedestrians"]},{unified:"1F4F5",shortnames:["no_mobile_phones"]},{unified:"1F51E",shortnames:["underage"]},{unified:"2622-FE0F",shortnames:["radioactive_sign"]},{unified:"2623-FE0F",shortnames:["biohazard_sign"]},{unified:"2B06-FE0F",shortnames:["arrow_up"]},{unified:"2197-FE0F",shortnames:["arrow_upper_right"]},{unified:"27A1-FE0F",shortnames:["arrow_right"]},{unified:"2198-FE0F",shortnames:["arrow_lower_right"]},{unified:"2B07-FE0F",shortnames:["arrow_down"]},{unified:"2199-FE0F",shortnames:["arrow_lower_left"]},{unified:"2B05-FE0F",shortnames:["arrow_left"]},{unified:"2196-FE0F",shortnames:["arrow_upper_left"]},{unified:"2195-FE0F",shortnames:["arrow_up_down"]},{unified:"2194-FE0F",shortnames:["left_right_arrow"]},{unified:"21A9-FE0F",shortnames:["leftwards_arrow_with_hook"]},{unified:"21AA-FE0F",shortnames:["arrow_right_hook"]},{unified:"2934-FE0F",shortnames:["arrow_heading_up"]},{unified:"2935-FE0F",shortnames:["arrow_heading_down"]},{unified:"1F503",shortnames:["arrows_clockwise"]},{unified:"1F504",shortnames:["arrows_counterclockwise"]},{unified:"1F519",shortnames:["back"]},{unified:"1F51A",shortnames:["end"]},{unified:"1F51B",shortnames:["on"]},{unified:"1F51C",shortnames:["soon"]},{unified:"1F51D",shortnames:["top"]},{unified:"1F6D0",shortnames:["place_of_worship"]},{unified:"269B-FE0F",shortnames:["atom_symbol"]},{unified:"1F549-FE0F",shortnames:["om_symbol"]},{unified:"2721-FE0F",shortnames:["star_of_david"]},{unified:"2638-FE0F",shortnames:["wheel_of_dharma"]},{unified:"262F-FE0F",shortnames:["yin_yang"]},{unified:"271D-FE0F",shortnames:["latin_cross"]},{unified:"2626-FE0F",shortnames:["orthodox_cross"]},{unified:"262A-FE0F",shortnames:["star_and_crescent"]},{unified:"262E-FE0F",shortnames:["peace_symbol"]},{unified:"1F54E",shortnames:["menorah_with_nine_branches"]},{unified:"1F52F",shortnames:["six_pointed_star"]},{unified:"1FAAF",shortnames:["khanda"]},{unified:"2648",shortnames:["aries"]},{unified:"2649",shortnames:["taurus"]},{unified:"264A",shortnames:["gemini"]},{unified:"264B",shortnames:["cancer"]},{unified:"264C",shortnames:["leo"]},{unified:"264D",shortnames:["virgo"]},{unified:"264E",shortnames:["libra"]},{unified:"264F",shortnames:["scorpius"]},{unified:"2650",shortnames:["sagittarius"]},{unified:"2651",shortnames:["capricorn"]},{unified:"2652",shortnames:["aquarius"]},{unified:"2653",shortnames:["pisces"]},{unified:"26CE",shortnames:["ophiuchus"]},{unified:"1F500",shortnames:["twisted_rightwards_arrows"]},{unified:"1F501",shortnames:["repeat"]},{unified:"1F502",shortnames:["repeat_one"]},{unified:"25B6-FE0F",shortnames:["arrow_forward"]},{unified:"23E9",shortnames:["fast_forward"]},{unified:"23ED-FE0F",shortnames:["black_right_pointing_double_triangle_with_vertical_bar"]},{unified:"23EF-FE0F",shortnames:["black_right_pointing_triangle_with_double_vertical_bar"]},{unified:"25C0-FE0F",shortnames:["arrow_backward"]},{unified:"23EA",shortnames:["rewind"]},{unified:"23EE-FE0F",shortnames:["black_left_pointing_double_triangle_with_vertical_bar"]},{unified:"1F53C",shortnames:["arrow_up_small"]},{unified:"23EB",shortnames:["arrow_double_up"]},{unified:"1F53D",shortnames:["arrow_down_small"]},{unified:"23EC",shortnames:["arrow_double_down"]},{unified:"23F8-FE0F",shortnames:["double_vertical_bar"]},{unified:"23F9-FE0F",shortnames:["black_square_for_stop"]},{unified:"23FA-FE0F",shortnames:["black_circle_for_record"]},{unified:"23CF-FE0F",shortnames:["eject"]},{unified:"1F3A6",shortnames:["cinema"]},{unified:"1F505",shortnames:["low_brightness"]},{unified:"1F506",shortnames:["high_brightness"]},{unified:"1F4F6",shortnames:["signal_strength"]},{unified:"1F6DC",shortnames:["wireless"]},{unified:"1F4F3",shortnames:["vibration_mode"]},{unified:"1F4F4",shortnames:["mobile_phone_off"]},{unified:"2640-FE0F",shortnames:["female_sign"]},{unified:"2642-FE0F",shortnames:["male_sign"]},{unified:"26A7-FE0F",shortnames:["transgender_symbol"]},{unified:"2716-FE0F",shortnames:["heavy_multiplication_x"]},{unified:"2795",shortnames:["heavy_plus_sign"]},{unified:"2796",shortnames:["heavy_minus_sign"]},{unified:"2797",shortnames:["heavy_division_sign"]},{unified:"1F7F0",shortnames:["heavy_equals_sign"]},{unified:"267E-FE0F",shortnames:["infinity"]},{unified:"203C-FE0F",shortnames:["bangbang"]},{unified:"2049-FE0F",shortnames:["interrobang"]},{unified:"2753",shortnames:["question"]},{unified:"2754",shortnames:["grey_question"]},{unified:"2755",shortnames:["grey_exclamation"]},{unified:"2757",shortnames:["exclamation"]},{unified:"3030-FE0F",shortnames:["wavy_dash"]},{unified:"1F4B1",shortnames:["currency_exchange"]},{unified:"1F4B2",shortnames:["heavy_dollar_sign"]},{unified:"2695-FE0F",shortnames:["medical_symbol"]},{unified:"267B-FE0F",shortnames:["recycle"]},{unified:"269C-FE0F",shortnames:["fleur_de_lis"]},{unified:"1F531",shortnames:["trident"]},{unified:"1F4DB",shortnames:["name_badge"]},{unified:"1F530",shortnames:["beginner"]},{unified:"2B55",shortnames:["o"]},{unified:"2705",shortnames:["white_check_mark"]},{unified:"2611-FE0F",shortnames:["ballot_box_with_check"]},{unified:"2714-FE0F",shortnames:["heavy_check_mark"]},{unified:"274C",shortnames:["x"]},{unified:"274E",shortnames:["negative_squared_cross_mark"]},{unified:"27B0",shortnames:["curly_loop"]},{unified:"27BF",shortnames:["loop"]},{unified:"303D-FE0F",shortnames:["part_alternation_mark"]},{unified:"2733-FE0F",shortnames:["eight_spoked_asterisk"]},{unified:"2734-FE0F",shortnames:["eight_pointed_black_star"]},{unified:"2747-FE0F",shortnames:["sparkle"]},{unified:"00A9-FE0F",shortnames:["copyright"]},{unified:"00AE-FE0F",shortnames:["registered"]},{unified:"2122-FE0F",shortnames:["tm"]},{unified:"0023-FE0F-20E3",shortnames:["hash"]},{unified:"002A-FE0F-20E3",shortnames:["keycap_star"]},{unified:"0030-FE0F-20E3",shortnames:["zero"]},{unified:"0031-FE0F-20E3",shortnames:["one"]},{unified:"0032-FE0F-20E3",shortnames:["two"]},{unified:"0033-FE0F-20E3",shortnames:["three"]},{unified:"0034-FE0F-20E3",shortnames:["four"]},{unified:"0035-FE0F-20E3",shortnames:["five"]},{unified:"0036-FE0F-20E3",shortnames:["six"]},{unified:"0037-FE0F-20E3",shortnames:["seven"]},{unified:"0038-FE0F-20E3",shortnames:["eight"]},{unified:"0039-FE0F-20E3",shortnames:["nine"]},{unified:"1F51F",shortnames:["keycap_ten"]},{unified:"1F520",shortnames:["capital_abcd"]},{unified:"1F521",shortnames:["abcd"]},{unified:"1F522",shortnames:["1234"]},{unified:"1F523",shortnames:["symbols"]},{unified:"1F524",shortnames:["abc"]},{unified:"1F170-FE0F",shortnames:["a"]},{unified:"1F18E",shortnames:["ab"]},{unified:"1F171-FE0F",shortnames:["b"]},{unified:"1F191",shortnames:["cl"]},{unified:"1F192",shortnames:["cool"]},{unified:"1F193",shortnames:["free"]},{unified:"2139-FE0F",shortnames:["information_source"]},{unified:"1F194",shortnames:["id"]},{unified:"24C2-FE0F",shortnames:["m"]},{unified:"1F195",shortnames:["new"]},{unified:"1F196",shortnames:["ng"]},{unified:"1F17E-FE0F",shortnames:["o2"]},{unified:"1F197",shortnames:["ok"]},{unified:"1F17F-FE0F",shortnames:["parking"]},{unified:"1F198",shortnames:["sos"]},{unified:"1F199",shortnames:["up"]},{unified:"1F19A",shortnames:["vs"]},{unified:"1F201",shortnames:["koko"]},{unified:"1F202-FE0F",shortnames:["sa"]},{unified:"1F237-FE0F",shortnames:["u6708"]},{unified:"1F236",shortnames:["u6709"]},{unified:"1F22F",shortnames:["u6307"]},{unified:"1F250",shortnames:["ideograph_advantage"]},{unified:"1F239",shortnames:["u5272"]},{unified:"1F21A",shortnames:["u7121"]},{unified:"1F232",shortnames:["u7981"]},{unified:"1F251",shortnames:["accept"]},{unified:"1F238",shortnames:["u7533"]},{unified:"1F234",shortnames:["u5408"]},{unified:"1F233",shortnames:["u7a7a"]},{unified:"3297-FE0F",shortnames:["congratulations"]},{unified:"3299-FE0F",shortnames:["secret"]},{unified:"1F23A",shortnames:["u55b6"]},{unified:"1F235",shortnames:["u6e80"]},{unified:"1F534",shortnames:["red_circle"]},{unified:"1F7E0",shortnames:["large_orange_circle"]},{unified:"1F7E1",shortnames:["large_yellow_circle"]},{unified:"1F7E2",shortnames:["large_green_circle"]},{unified:"1F535",shortnames:["large_blue_circle"]},{unified:"1F7E3",shortnames:["large_purple_circle"]},{unified:"1F7E4",shortnames:["large_brown_circle"]},{unified:"26AB",shortnames:["black_circle"]},{unified:"26AA",shortnames:["white_circle"]},{unified:"1F7E5",shortnames:["large_red_square"]},{unified:"1F7E7",shortnames:["large_orange_square"]},{unified:"1F7E8",shortnames:["large_yellow_square"]},{unified:"1F7E9",shortnames:["large_green_square"]},{unified:"1F7E6",shortnames:["large_blue_square"]},{unified:"1F7EA",shortnames:["large_purple_square"]},{unified:"1F7EB",shortnames:["large_brown_square"]},{unified:"2B1B",shortnames:["black_large_square"]},{unified:"2B1C",shortnames:["white_large_square"]},{unified:"25FC-FE0F",shortnames:["black_medium_square"]},{unified:"25FB-FE0F",shortnames:["white_medium_square"]},{unified:"25FE",shortnames:["black_medium_small_square"]},{unified:"25FD",shortnames:["white_medium_small_square"]},{unified:"25AA-FE0F",shortnames:["black_small_square"]},{unified:"25AB-FE0F",shortnames:["white_small_square"]},{unified:"1F536",shortnames:["large_orange_diamond"]},{unified:"1F537",shortnames:["large_blue_diamond"]},{unified:"1F538",shortnames:["small_orange_diamond"]},{unified:"1F539",shortnames:["small_blue_diamond"]},{unified:"1F53A",shortnames:["small_red_triangle"]},{unified:"1F53B",shortnames:["small_red_triangle_down"]},{unified:"1F4A0",shortnames:["diamond_shape_with_a_dot_inside"]},{unified:"1F518",shortnames:["radio_button"]},{unified:"1F533",shortnames:["white_square_button"]},{unified:"1F532",shortnames:["black_square_button"]}]},{name:"Flags",emojis:[{unified:"1F3C1",shortnames:["checkered_flag"]},{unified:"1F6A9",shortnames:["triangular_flag_on_post"]},{unified:"1F38C",shortnames:["crossed_flags"]},{unified:"1F3F4",shortnames:["waving_black_flag"]},{unified:"1F3F3-FE0F",shortnames:["waving_white_flag"]},{unified:"1F3F3-FE0F-200D-1F308",shortnames:["rainbow-flag"]},{unified:"1F3F3-FE0F-200D-26A7-FE0F",shortnames:["transgender_flag"]},{unified:"1F3F4-200D-2620-FE0F",shortnames:["pirate_flag"]},{unified:"1F1E6-1F1E8",shortnames:["flag-ac"]},{unified:"1F1E6-1F1E9",shortnames:["flag-ad"]},{unified:"1F1E6-1F1EA",shortnames:["flag-ae"]},{unified:"1F1E6-1F1EB",shortnames:["flag-af"]},{unified:"1F1E6-1F1EC",shortnames:["flag-ag"]},{unified:"1F1E6-1F1EE",shortnames:["flag-ai"]},{unified:"1F1E6-1F1F1",shortnames:["flag-al"]},{unified:"1F1E6-1F1F2",shortnames:["flag-am"]},{unified:"1F1E6-1F1F4",shortnames:["flag-ao"]},{unified:"1F1E6-1F1F6",shortnames:["flag-aq"]},{unified:"1F1E6-1F1F7",shortnames:["flag-ar"]},{unified:"1F1E6-1F1F8",shortnames:["flag-as"]},{unified:"1F1E6-1F1F9",shortnames:["flag-at"]},{unified:"1F1E6-1F1FA",shortnames:["flag-au"]},{unified:"1F1E6-1F1FC",shortnames:["flag-aw"]},{unified:"1F1E6-1F1FD",shortnames:["flag-ax"]},{unified:"1F1E6-1F1FF",shortnames:["flag-az"]},{unified:"1F1E7-1F1E6",shortnames:["flag-ba"]},{unified:"1F1E7-1F1E7",shortnames:["flag-bb"]},{unified:"1F1E7-1F1E9",shortnames:["flag-bd"]},{unified:"1F1E7-1F1EA",shortnames:["flag-be"]},{unified:"1F1E7-1F1EB",shortnames:["flag-bf"]},{unified:"1F1E7-1F1EC",shortnames:["flag-bg"]},{unified:"1F1E7-1F1ED",shortnames:["flag-bh"]},{unified:"1F1E7-1F1EE",shortnames:["flag-bi"]},{unified:"1F1E7-1F1EF",shortnames:["flag-bj"]},{unified:"1F1E7-1F1F1",shortnames:["flag-bl"]},{unified:"1F1E7-1F1F2",shortnames:["flag-bm"]},{unified:"1F1E7-1F1F3",shortnames:["flag-bn"]},{unified:"1F1E7-1F1F4",shortnames:["flag-bo"]},{unified:"1F1E7-1F1F6",shortnames:["flag-bq"]},{unified:"1F1E7-1F1F7",shortnames:["flag-br"]},{unified:"1F1E7-1F1F8",shortnames:["flag-bs"]},{unified:"1F1E7-1F1F9",shortnames:["flag-bt"]},{unified:"1F1E7-1F1FB",shortnames:["flag-bv"]},{unified:"1F1E7-1F1FC",shortnames:["flag-bw"]},{unified:"1F1E7-1F1FE",shortnames:["flag-by"]},{unified:"1F1E7-1F1FF",shortnames:["flag-bz"]},{unified:"1F1E8-1F1E6",shortnames:["flag-ca"]},{unified:"1F1E8-1F1E8",shortnames:["flag-cc"]},{unified:"1F1E8-1F1E9",shortnames:["flag-cd"]},{unified:"1F1E8-1F1EB",shortnames:["flag-cf"]},{unified:"1F1E8-1F1EC",shortnames:["flag-cg"]},{unified:"1F1E8-1F1ED",shortnames:["flag-ch"]},{unified:"1F1E8-1F1EE",shortnames:["flag-ci"]},{unified:"1F1E8-1F1F0",shortnames:["flag-ck"]},{unified:"1F1E8-1F1F1",shortnames:["flag-cl"]},{unified:"1F1E8-1F1F2",shortnames:["flag-cm"]},{unified:"1F1E8-1F1F3",shortnames:["cn"]},{unified:"1F1E8-1F1F4",shortnames:["flag-co"]},{unified:"1F1E8-1F1F5",shortnames:["flag-cp"]},{unified:"1F1E8-1F1F7",shortnames:["flag-cr"]},{unified:"1F1E8-1F1FA",shortnames:["flag-cu"]},{unified:"1F1E8-1F1FB",shortnames:["flag-cv"]},{unified:"1F1E8-1F1FC",shortnames:["flag-cw"]},{unified:"1F1E8-1F1FD",shortnames:["flag-cx"]},{unified:"1F1E8-1F1FE",shortnames:["flag-cy"]},{unified:"1F1E8-1F1FF",shortnames:["flag-cz"]},{unified:"1F1E9-1F1EA",shortnames:["de"]},{unified:"1F1E9-1F1EC",shortnames:["flag-dg"]},{unified:"1F1E9-1F1EF",shortnames:["flag-dj"]},{unified:"1F1E9-1F1F0",shortnames:["flag-dk"]},{unified:"1F1E9-1F1F2",shortnames:["flag-dm"]},{unified:"1F1E9-1F1F4",shortnames:["flag-do"]},{unified:"1F1E9-1F1FF",shortnames:["flag-dz"]},{unified:"1F1EA-1F1E6",shortnames:["flag-ea"]},{unified:"1F1EA-1F1E8",shortnames:["flag-ec"]},{unified:"1F1EA-1F1EA",shortnames:["flag-ee"]},{unified:"1F1EA-1F1EC",shortnames:["flag-eg"]},{unified:"1F1EA-1F1ED",shortnames:["flag-eh"]},{unified:"1F1EA-1F1F7",shortnames:["flag-er"]},{unified:"1F1EA-1F1F8",shortnames:["es"]},{unified:"1F1EA-1F1F9",shortnames:["flag-et"]},{unified:"1F1EA-1F1FA",shortnames:["flag-eu"]},{unified:"1F1EB-1F1EE",shortnames:["flag-fi"]},{unified:"1F1EB-1F1EF",shortnames:["flag-fj"]},{unified:"1F1EB-1F1F0",shortnames:["flag-fk"]},{unified:"1F1EB-1F1F2",shortnames:["flag-fm"]},{unified:"1F1EB-1F1F4",shortnames:["flag-fo"]},{unified:"1F1EB-1F1F7",shortnames:["fr"]},{unified:"1F1EC-1F1E6",shortnames:["flag-ga"]},{unified:"1F1EC-1F1E7",shortnames:["gb"]},{unified:"1F1EC-1F1E9",shortnames:["flag-gd"]},{unified:"1F1EC-1F1EA",shortnames:["flag-ge"]},{unified:"1F1EC-1F1EB",shortnames:["flag-gf"]},{unified:"1F1EC-1F1EC",shortnames:["flag-gg"]},{unified:"1F1EC-1F1ED",shortnames:["flag-gh"]},{unified:"1F1EC-1F1EE",shortnames:["flag-gi"]},{unified:"1F1EC-1F1F1",shortnames:["flag-gl"]},{unified:"1F1EC-1F1F2",shortnames:["flag-gm"]},{unified:"1F1EC-1F1F3",shortnames:["flag-gn"]},{unified:"1F1EC-1F1F5",shortnames:["flag-gp"]},{unified:"1F1EC-1F1F6",shortnames:["flag-gq"]},{unified:"1F1EC-1F1F7",shortnames:["flag-gr"]},{unified:"1F1EC-1F1F8",shortnames:["flag-gs"]},{unified:"1F1EC-1F1F9",shortnames:["flag-gt"]},{unified:"1F1EC-1F1FA",shortnames:["flag-gu"]},{unified:"1F1EC-1F1FC",shortnames:["flag-gw"]},{unified:"1F1EC-1F1FE",shortnames:["flag-gy"]},{unified:"1F1ED-1F1F0",shortnames:["flag-hk"]},{unified:"1F1ED-1F1F2",shortnames:["flag-hm"]},{unified:"1F1ED-1F1F3",shortnames:["flag-hn"]},{unified:"1F1ED-1F1F7",shortnames:["flag-hr"]},{unified:"1F1ED-1F1F9",shortnames:["flag-ht"]},{unified:"1F1ED-1F1FA",shortnames:["flag-hu"]},{unified:"1F1EE-1F1E8",shortnames:["flag-ic"]},{unified:"1F1EE-1F1E9",shortnames:["flag-id"]},{unified:"1F1EE-1F1EA",shortnames:["flag-ie"]},{unified:"1F1EE-1F1F1",shortnames:["flag-il"]},{unified:"1F1EE-1F1F2",shortnames:["flag-im"]},{unified:"1F1EE-1F1F3",shortnames:["flag-in"]},{unified:"1F1EE-1F1F4",shortnames:["flag-io"]},{unified:"1F1EE-1F1F6",shortnames:["flag-iq"]},{unified:"1F1EE-1F1F7",shortnames:["flag-ir"]},{unified:"1F1EE-1F1F8",shortnames:["flag-is"]},{unified:"1F1EE-1F1F9",shortnames:["it"]},{unified:"1F1EF-1F1EA",shortnames:["flag-je"]},{unified:"1F1EF-1F1F2",shortnames:["flag-jm"]},{unified:"1F1EF-1F1F4",shortnames:["flag-jo"]},{unified:"1F1EF-1F1F5",shortnames:["jp"]},{unified:"1F1F0-1F1EA",shortnames:["flag-ke"]},{unified:"1F1F0-1F1EC",shortnames:["flag-kg"]},{unified:"1F1F0-1F1ED",shortnames:["flag-kh"]},{unified:"1F1F0-1F1EE",shortnames:["flag-ki"]},{unified:"1F1F0-1F1F2",shortnames:["flag-km"]},{unified:"1F1F0-1F1F3",shortnames:["flag-kn"]},{unified:"1F1F0-1F1F5",shortnames:["flag-kp"]},{unified:"1F1F0-1F1F7",shortnames:["kr"]},{unified:"1F1F0-1F1FC",shortnames:["flag-kw"]},{unified:"1F1F0-1F1FE",shortnames:["flag-ky"]},{unified:"1F1F0-1F1FF",shortnames:["flag-kz"]},{unified:"1F1F1-1F1E6",shortnames:["flag-la"]},{unified:"1F1F1-1F1E7",shortnames:["flag-lb"]},{unified:"1F1F1-1F1E8",shortnames:["flag-lc"]},{unified:"1F1F1-1F1EE",shortnames:["flag-li"]},{unified:"1F1F1-1F1F0",shortnames:["flag-lk"]},{unified:"1F1F1-1F1F7",shortnames:["flag-lr"]},{unified:"1F1F1-1F1F8",shortnames:["flag-ls"]},{unified:"1F1F1-1F1F9",shortnames:["flag-lt"]},{unified:"1F1F1-1F1FA",shortnames:["flag-lu"]},{unified:"1F1F1-1F1FB",shortnames:["flag-lv"]},{unified:"1F1F1-1F1FE",shortnames:["flag-ly"]},{unified:"1F1F2-1F1E6",shortnames:["flag-ma"]},{unified:"1F1F2-1F1E8",shortnames:["flag-mc"]},{unified:"1F1F2-1F1E9",shortnames:["flag-md"]},{unified:"1F1F2-1F1EA",shortnames:["flag-me"]},{unified:"1F1F2-1F1EB",shortnames:["flag-mf"]},{unified:"1F1F2-1F1EC",shortnames:["flag-mg"]},{unified:"1F1F2-1F1ED",shortnames:["flag-mh"]},{unified:"1F1F2-1F1F0",shortnames:["flag-mk"]},{unified:"1F1F2-1F1F1",shortnames:["flag-ml"]},{unified:"1F1F2-1F1F2",shortnames:["flag-mm"]},{unified:"1F1F2-1F1F3",shortnames:["flag-mn"]},{unified:"1F1F2-1F1F4",shortnames:["flag-mo"]},{unified:"1F1F2-1F1F5",shortnames:["flag-mp"]},{unified:"1F1F2-1F1F6",shortnames:["flag-mq"]},{unified:"1F1F2-1F1F7",shortnames:["flag-mr"]},{unified:"1F1F2-1F1F8",shortnames:["flag-ms"]},{unified:"1F1F2-1F1F9",shortnames:["flag-mt"]},{unified:"1F1F2-1F1FA",shortnames:["flag-mu"]},{unified:"1F1F2-1F1FB",shortnames:["flag-mv"]},{unified:"1F1F2-1F1FC",shortnames:["flag-mw"]},{unified:"1F1F2-1F1FD",shortnames:["flag-mx"]},{unified:"1F1F2-1F1FE",shortnames:["flag-my"]},{unified:"1F1F2-1F1FF",shortnames:["flag-mz"]},{unified:"1F1F3-1F1E6",shortnames:["flag-na"]},{unified:"1F1F3-1F1E8",shortnames:["flag-nc"]},{unified:"1F1F3-1F1EA",shortnames:["flag-ne"]},{unified:"1F1F3-1F1EB",shortnames:["flag-nf"]},{unified:"1F1F3-1F1EC",shortnames:["flag-ng"]},{unified:"1F1F3-1F1EE",shortnames:["flag-ni"]},{unified:"1F1F3-1F1F1",shortnames:["flag-nl"]},{unified:"1F1F3-1F1F4",shortnames:["flag-no"]},{unified:"1F1F3-1F1F5",shortnames:["flag-np"]},{unified:"1F1F3-1F1F7",shortnames:["flag-nr"]},{unified:"1F1F3-1F1FA",shortnames:["flag-nu"]},{unified:"1F1F3-1F1FF",shortnames:["flag-nz"]},{unified:"1F1F4-1F1F2",shortnames:["flag-om"]},{unified:"1F1F5-1F1E6",shortnames:["flag-pa"]},{unified:"1F1F5-1F1EA",shortnames:["flag-pe"]},{unified:"1F1F5-1F1EB",shortnames:["flag-pf"]},{unified:"1F1F5-1F1EC",shortnames:["flag-pg"]},{unified:"1F1F5-1F1ED",shortnames:["flag-ph"]},{unified:"1F1F5-1F1F0",shortnames:["flag-pk"]},{unified:"1F1F5-1F1F1",shortnames:["flag-pl"]},{unified:"1F1F5-1F1F2",shortnames:["flag-pm"]},{unified:"1F1F5-1F1F3",shortnames:["flag-pn"]},{unified:"1F1F5-1F1F7",shortnames:["flag-pr"]},{unified:"1F1F5-1F1F8",shortnames:["flag-ps"]},{unified:"1F1F5-1F1F9",shortnames:["flag-pt"]},{unified:"1F1F5-1F1FC",shortnames:["flag-pw"]},{unified:"1F1F5-1F1FE",shortnames:["flag-py"]},{unified:"1F1F6-1F1E6",shortnames:["flag-qa"]},{unified:"1F1F7-1F1EA",shortnames:["flag-re"]},{unified:"1F1F7-1F1F4",shortnames:["flag-ro"]},{unified:"1F1F7-1F1F8",shortnames:["flag-rs"]},{unified:"1F1F7-1F1FA",shortnames:["ru"]},{unified:"1F1F7-1F1FC",shortnames:["flag-rw"]},{unified:"1F1F8-1F1E6",shortnames:["flag-sa"]},{unified:"1F1F8-1F1E7",shortnames:["flag-sb"]},{unified:"1F1F8-1F1E8",shortnames:["flag-sc"]},{unified:"1F1F8-1F1E9",shortnames:["flag-sd"]},{unified:"1F1F8-1F1EA",shortnames:["flag-se"]},{unified:"1F1F8-1F1EC",shortnames:["flag-sg"]},{unified:"1F1F8-1F1ED",shortnames:["flag-sh"]},{unified:"1F1F8-1F1EE",shortnames:["flag-si"]},{unified:"1F1F8-1F1EF",shortnames:["flag-sj"]},{unified:"1F1F8-1F1F0",shortnames:["flag-sk"]},{unified:"1F1F8-1F1F1",shortnames:["flag-sl"]},{unified:"1F1F8-1F1F2",shortnames:["flag-sm"]},{unified:"1F1F8-1F1F3",shortnames:["flag-sn"]},{unified:"1F1F8-1F1F4",shortnames:["flag-so"]},{unified:"1F1F8-1F1F7",shortnames:["flag-sr"]},{unified:"1F1F8-1F1F8",shortnames:["flag-ss"]},{unified:"1F1F8-1F1F9",shortnames:["flag-st"]},{unified:"1F1F8-1F1FB",shortnames:["flag-sv"]},{unified:"1F1F8-1F1FD",shortnames:["flag-sx"]},{unified:"1F1F8-1F1FE",shortnames:["flag-sy"]},{unified:"1F1F8-1F1FF",shortnames:["flag-sz"]},{unified:"1F1F9-1F1E6",shortnames:["flag-ta"]},{unified:"1F1F9-1F1E8",shortnames:["flag-tc"]},{unified:"1F1F9-1F1E9",shortnames:["flag-td"]},{unified:"1F1F9-1F1EB",shortnames:["flag-tf"]},{unified:"1F1F9-1F1EC",shortnames:["flag-tg"]},{unified:"1F1F9-1F1ED",shortnames:["flag-th"]},{unified:"1F1F9-1F1EF",shortnames:["flag-tj"]},{unified:"1F1F9-1F1F0",shortnames:["flag-tk"]},{unified:"1F1F9-1F1F1",shortnames:["flag-tl"]},{unified:"1F1F9-1F1F2",shortnames:["flag-tm"]},{unified:"1F1F9-1F1F3",shortnames:["flag-tn"]},{unified:"1F1F9-1F1F4",shortnames:["flag-to"]},{unified:"1F1F9-1F1F7",shortnames:["flag-tr"]},{unified:"1F1F9-1F1F9",shortnames:["flag-tt"]},{unified:"1F1F9-1F1FB",shortnames:["flag-tv"]},{unified:"1F1F9-1F1FC",shortnames:["flag-tw"]},{unified:"1F1F9-1F1FF",shortnames:["flag-tz"]},{unified:"1F1FA-1F1E6",shortnames:["flag-ua"]},{unified:"1F1FA-1F1EC",shortnames:["flag-ug"]},{unified:"1F1FA-1F1F2",shortnames:["flag-um"]},{unified:"1F1FA-1F1F3",shortnames:["flag-un"]},{unified:"1F1FA-1F1F8",shortnames:["us"]},{unified:"1F1FA-1F1FE",shortnames:["flag-uy"]},{unified:"1F1FA-1F1FF",shortnames:["flag-uz"]},{unified:"1F1FB-1F1E6",shortnames:["flag-va"]},{unified:"1F1FB-1F1E8",shortnames:["flag-vc"]},{unified:"1F1FB-1F1EA",shortnames:["flag-ve"]},{unified:"1F1FB-1F1EC",shortnames:["flag-vg"]},{unified:"1F1FB-1F1EE",shortnames:["flag-vi"]},{unified:"1F1FB-1F1F3",shortnames:["flag-vn"]},{unified:"1F1FB-1F1FA",shortnames:["flag-vu"]},{unified:"1F1FC-1F1EB",shortnames:["flag-wf"]},{unified:"1F1FC-1F1F8",shortnames:["flag-ws"]},{unified:"1F1FD-1F1F0",shortnames:["flag-xk"]},{unified:"1F1FE-1F1EA",shortnames:["flag-ye"]},{unified:"1F1FE-1F1F9",shortnames:["flag-yt"]},{unified:"1F1FF-1F1E6",shortnames:["flag-za"]},{unified:"1F1FF-1F1F2",shortnames:["flag-zm"]},{unified:"1F1FF-1F1FC",shortnames:["flag-zw"]},{unified:"1F3F4-E0067-E0062-E0065-E006E-E0067-E007F",shortnames:["flag-england"]},{unified:"1F3F4-E0067-E0062-E0073-E0063-E0074-E007F",shortnames:["flag-scotland"]},{unified:"1F3F4-E0067-E0062-E0077-E006C-E0073-E007F",shortnames:["flag-wales"]}]}];_exports.byShortName={hash:"0023-FE0F-20E3",keycap_star:"002A-FE0F-20E3",zero:"0030-FE0F-20E3",one:"0031-FE0F-20E3",two:"0032-FE0F-20E3",three:"0033-FE0F-20E3",four:"0034-FE0F-20E3",five:"0035-FE0F-20E3",six:"0036-FE0F-20E3",seven:"0037-FE0F-20E3",eight:"0038-FE0F-20E3",nine:"0039-FE0F-20E3",copyright:"00A9-FE0F",registered:"00AE-FE0F",mahjong:"1F004",black_joker:"1F0CF",a:"1F170-FE0F",b:"1F171-FE0F",o2:"1F17E-FE0F",parking:"1F17F-FE0F",ab:"1F18E",cl:"1F191",cool:"1F192",free:"1F193",id:"1F194",new:"1F195",ng:"1F196",ok:"1F197",sos:"1F198",up:"1F199",vs:"1F19A","flag-ac":"1F1E6-1F1E8","flag-ad":"1F1E6-1F1E9","flag-ae":"1F1E6-1F1EA","flag-af":"1F1E6-1F1EB","flag-ag":"1F1E6-1F1EC","flag-ai":"1F1E6-1F1EE","flag-al":"1F1E6-1F1F1","flag-am":"1F1E6-1F1F2","flag-ao":"1F1E6-1F1F4","flag-aq":"1F1E6-1F1F6","flag-ar":"1F1E6-1F1F7","flag-as":"1F1E6-1F1F8","flag-at":"1F1E6-1F1F9","flag-au":"1F1E6-1F1FA","flag-aw":"1F1E6-1F1FC","flag-ax":"1F1E6-1F1FD","flag-az":"1F1E6-1F1FF","flag-ba":"1F1E7-1F1E6","flag-bb":"1F1E7-1F1E7","flag-bd":"1F1E7-1F1E9","flag-be":"1F1E7-1F1EA","flag-bf":"1F1E7-1F1EB","flag-bg":"1F1E7-1F1EC","flag-bh":"1F1E7-1F1ED","flag-bi":"1F1E7-1F1EE","flag-bj":"1F1E7-1F1EF","flag-bl":"1F1E7-1F1F1","flag-bm":"1F1E7-1F1F2","flag-bn":"1F1E7-1F1F3","flag-bo":"1F1E7-1F1F4","flag-bq":"1F1E7-1F1F6","flag-br":"1F1E7-1F1F7","flag-bs":"1F1E7-1F1F8","flag-bt":"1F1E7-1F1F9","flag-bv":"1F1E7-1F1FB","flag-bw":"1F1E7-1F1FC","flag-by":"1F1E7-1F1FE","flag-bz":"1F1E7-1F1FF","flag-ca":"1F1E8-1F1E6","flag-cc":"1F1E8-1F1E8","flag-cd":"1F1E8-1F1E9","flag-cf":"1F1E8-1F1EB","flag-cg":"1F1E8-1F1EC","flag-ch":"1F1E8-1F1ED","flag-ci":"1F1E8-1F1EE","flag-ck":"1F1E8-1F1F0","flag-cl":"1F1E8-1F1F1","flag-cm":"1F1E8-1F1F2",cn:"1F1E8-1F1F3","flag-co":"1F1E8-1F1F4","flag-cp":"1F1E8-1F1F5","flag-cr":"1F1E8-1F1F7","flag-cu":"1F1E8-1F1FA","flag-cv":"1F1E8-1F1FB","flag-cw":"1F1E8-1F1FC","flag-cx":"1F1E8-1F1FD","flag-cy":"1F1E8-1F1FE","flag-cz":"1F1E8-1F1FF",de:"1F1E9-1F1EA","flag-dg":"1F1E9-1F1EC","flag-dj":"1F1E9-1F1EF","flag-dk":"1F1E9-1F1F0","flag-dm":"1F1E9-1F1F2","flag-do":"1F1E9-1F1F4","flag-dz":"1F1E9-1F1FF","flag-ea":"1F1EA-1F1E6","flag-ec":"1F1EA-1F1E8","flag-ee":"1F1EA-1F1EA","flag-eg":"1F1EA-1F1EC","flag-eh":"1F1EA-1F1ED","flag-er":"1F1EA-1F1F7",es:"1F1EA-1F1F8","flag-et":"1F1EA-1F1F9","flag-eu":"1F1EA-1F1FA","flag-fi":"1F1EB-1F1EE","flag-fj":"1F1EB-1F1EF","flag-fk":"1F1EB-1F1F0","flag-fm":"1F1EB-1F1F2","flag-fo":"1F1EB-1F1F4",fr:"1F1EB-1F1F7","flag-ga":"1F1EC-1F1E6",gb:"1F1EC-1F1E7","flag-gd":"1F1EC-1F1E9","flag-ge":"1F1EC-1F1EA","flag-gf":"1F1EC-1F1EB","flag-gg":"1F1EC-1F1EC","flag-gh":"1F1EC-1F1ED","flag-gi":"1F1EC-1F1EE","flag-gl":"1F1EC-1F1F1","flag-gm":"1F1EC-1F1F2","flag-gn":"1F1EC-1F1F3","flag-gp":"1F1EC-1F1F5","flag-gq":"1F1EC-1F1F6","flag-gr":"1F1EC-1F1F7","flag-gs":"1F1EC-1F1F8","flag-gt":"1F1EC-1F1F9","flag-gu":"1F1EC-1F1FA","flag-gw":"1F1EC-1F1FC","flag-gy":"1F1EC-1F1FE","flag-hk":"1F1ED-1F1F0","flag-hm":"1F1ED-1F1F2","flag-hn":"1F1ED-1F1F3","flag-hr":"1F1ED-1F1F7","flag-ht":"1F1ED-1F1F9","flag-hu":"1F1ED-1F1FA","flag-ic":"1F1EE-1F1E8","flag-id":"1F1EE-1F1E9","flag-ie":"1F1EE-1F1EA","flag-il":"1F1EE-1F1F1","flag-im":"1F1EE-1F1F2","flag-in":"1F1EE-1F1F3","flag-io":"1F1EE-1F1F4","flag-iq":"1F1EE-1F1F6","flag-ir":"1F1EE-1F1F7","flag-is":"1F1EE-1F1F8",it:"1F1EE-1F1F9","flag-je":"1F1EF-1F1EA","flag-jm":"1F1EF-1F1F2","flag-jo":"1F1EF-1F1F4",jp:"1F1EF-1F1F5","flag-ke":"1F1F0-1F1EA","flag-kg":"1F1F0-1F1EC","flag-kh":"1F1F0-1F1ED","flag-ki":"1F1F0-1F1EE","flag-km":"1F1F0-1F1F2","flag-kn":"1F1F0-1F1F3","flag-kp":"1F1F0-1F1F5",kr:"1F1F0-1F1F7","flag-kw":"1F1F0-1F1FC","flag-ky":"1F1F0-1F1FE","flag-kz":"1F1F0-1F1FF","flag-la":"1F1F1-1F1E6","flag-lb":"1F1F1-1F1E7","flag-lc":"1F1F1-1F1E8","flag-li":"1F1F1-1F1EE","flag-lk":"1F1F1-1F1F0","flag-lr":"1F1F1-1F1F7","flag-ls":"1F1F1-1F1F8","flag-lt":"1F1F1-1F1F9","flag-lu":"1F1F1-1F1FA","flag-lv":"1F1F1-1F1FB","flag-ly":"1F1F1-1F1FE","flag-ma":"1F1F2-1F1E6","flag-mc":"1F1F2-1F1E8","flag-md":"1F1F2-1F1E9","flag-me":"1F1F2-1F1EA","flag-mf":"1F1F2-1F1EB","flag-mg":"1F1F2-1F1EC","flag-mh":"1F1F2-1F1ED","flag-mk":"1F1F2-1F1F0","flag-ml":"1F1F2-1F1F1","flag-mm":"1F1F2-1F1F2","flag-mn":"1F1F2-1F1F3","flag-mo":"1F1F2-1F1F4","flag-mp":"1F1F2-1F1F5","flag-mq":"1F1F2-1F1F6","flag-mr":"1F1F2-1F1F7","flag-ms":"1F1F2-1F1F8","flag-mt":"1F1F2-1F1F9","flag-mu":"1F1F2-1F1FA","flag-mv":"1F1F2-1F1FB","flag-mw":"1F1F2-1F1FC","flag-mx":"1F1F2-1F1FD","flag-my":"1F1F2-1F1FE","flag-mz":"1F1F2-1F1FF","flag-na":"1F1F3-1F1E6","flag-nc":"1F1F3-1F1E8","flag-ne":"1F1F3-1F1EA","flag-nf":"1F1F3-1F1EB","flag-ng":"1F1F3-1F1EC","flag-ni":"1F1F3-1F1EE","flag-nl":"1F1F3-1F1F1","flag-no":"1F1F3-1F1F4","flag-np":"1F1F3-1F1F5","flag-nr":"1F1F3-1F1F7","flag-nu":"1F1F3-1F1FA","flag-nz":"1F1F3-1F1FF","flag-om":"1F1F4-1F1F2","flag-pa":"1F1F5-1F1E6","flag-pe":"1F1F5-1F1EA","flag-pf":"1F1F5-1F1EB","flag-pg":"1F1F5-1F1EC","flag-ph":"1F1F5-1F1ED","flag-pk":"1F1F5-1F1F0","flag-pl":"1F1F5-1F1F1","flag-pm":"1F1F5-1F1F2","flag-pn":"1F1F5-1F1F3","flag-pr":"1F1F5-1F1F7","flag-ps":"1F1F5-1F1F8","flag-pt":"1F1F5-1F1F9","flag-pw":"1F1F5-1F1FC","flag-py":"1F1F5-1F1FE","flag-qa":"1F1F6-1F1E6","flag-re":"1F1F7-1F1EA","flag-ro":"1F1F7-1F1F4","flag-rs":"1F1F7-1F1F8",ru:"1F1F7-1F1FA","flag-rw":"1F1F7-1F1FC","flag-sa":"1F1F8-1F1E6","flag-sb":"1F1F8-1F1E7","flag-sc":"1F1F8-1F1E8","flag-sd":"1F1F8-1F1E9","flag-se":"1F1F8-1F1EA","flag-sg":"1F1F8-1F1EC","flag-sh":"1F1F8-1F1ED","flag-si":"1F1F8-1F1EE","flag-sj":"1F1F8-1F1EF","flag-sk":"1F1F8-1F1F0","flag-sl":"1F1F8-1F1F1","flag-sm":"1F1F8-1F1F2","flag-sn":"1F1F8-1F1F3","flag-so":"1F1F8-1F1F4","flag-sr":"1F1F8-1F1F7","flag-ss":"1F1F8-1F1F8","flag-st":"1F1F8-1F1F9","flag-sv":"1F1F8-1F1FB","flag-sx":"1F1F8-1F1FD","flag-sy":"1F1F8-1F1FE","flag-sz":"1F1F8-1F1FF","flag-ta":"1F1F9-1F1E6","flag-tc":"1F1F9-1F1E8","flag-td":"1F1F9-1F1E9","flag-tf":"1F1F9-1F1EB","flag-tg":"1F1F9-1F1EC","flag-th":"1F1F9-1F1ED","flag-tj":"1F1F9-1F1EF","flag-tk":"1F1F9-1F1F0","flag-tl":"1F1F9-1F1F1","flag-tm":"1F1F9-1F1F2","flag-tn":"1F1F9-1F1F3","flag-to":"1F1F9-1F1F4","flag-tr":"1F1F9-1F1F7","flag-tt":"1F1F9-1F1F9","flag-tv":"1F1F9-1F1FB","flag-tw":"1F1F9-1F1FC","flag-tz":"1F1F9-1F1FF","flag-ua":"1F1FA-1F1E6","flag-ug":"1F1FA-1F1EC","flag-um":"1F1FA-1F1F2","flag-un":"1F1FA-1F1F3",us:"1F1FA-1F1F8","flag-uy":"1F1FA-1F1FE","flag-uz":"1F1FA-1F1FF","flag-va":"1F1FB-1F1E6","flag-vc":"1F1FB-1F1E8","flag-ve":"1F1FB-1F1EA","flag-vg":"1F1FB-1F1EC","flag-vi":"1F1FB-1F1EE","flag-vn":"1F1FB-1F1F3","flag-vu":"1F1FB-1F1FA","flag-wf":"1F1FC-1F1EB","flag-ws":"1F1FC-1F1F8","flag-xk":"1F1FD-1F1F0","flag-ye":"1F1FE-1F1EA","flag-yt":"1F1FE-1F1F9","flag-za":"1F1FF-1F1E6","flag-zm":"1F1FF-1F1F2","flag-zw":"1F1FF-1F1FC",koko:"1F201",sa:"1F202-FE0F",u7121:"1F21A",u6307:"1F22F",u7981:"1F232",u7a7a:"1F233",u5408:"1F234",u6e80:"1F235",u6709:"1F236",u6708:"1F237-FE0F",u7533:"1F238",u5272:"1F239",u55b6:"1F23A",ideograph_advantage:"1F250",accept:"1F251",cyclone:"1F300",foggy:"1F301",closed_umbrella:"1F302",night_with_stars:"1F303",sunrise_over_mountains:"1F304",sunrise:"1F305",city_sunset:"1F306",city_sunrise:"1F307",rainbow:"1F308",bridge_at_night:"1F309",ocean:"1F30A",volcano:"1F30B",milky_way:"1F30C",earth_africa:"1F30D",earth_americas:"1F30E",earth_asia:"1F30F",globe_with_meridians:"1F310",new_moon:"1F311",waxing_crescent_moon:"1F312",first_quarter_moon:"1F313",moon:"1F314",full_moon:"1F315",waning_gibbous_moon:"1F316",last_quarter_moon:"1F317",waning_crescent_moon:"1F318",crescent_moon:"1F319",new_moon_with_face:"1F31A",first_quarter_moon_with_face:"1F31B",last_quarter_moon_with_face:"1F31C",full_moon_with_face:"1F31D",sun_with_face:"1F31E",star2:"1F31F",stars:"1F320",thermometer:"1F321-FE0F",mostly_sunny:"1F324-FE0F",barely_sunny:"1F325-FE0F",partly_sunny_rain:"1F326-FE0F",rain_cloud:"1F327-FE0F",snow_cloud:"1F328-FE0F",lightning:"1F329-FE0F",tornado:"1F32A-FE0F",fog:"1F32B-FE0F",wind_blowing_face:"1F32C-FE0F",hotdog:"1F32D",taco:"1F32E",burrito:"1F32F",chestnut:"1F330",seedling:"1F331",evergreen_tree:"1F332",deciduous_tree:"1F333",palm_tree:"1F334",cactus:"1F335",hot_pepper:"1F336-FE0F",tulip:"1F337",cherry_blossom:"1F338",rose:"1F339",hibiscus:"1F33A",sunflower:"1F33B",blossom:"1F33C",corn:"1F33D",ear_of_rice:"1F33E",herb:"1F33F",four_leaf_clover:"1F340",maple_leaf:"1F341",fallen_leaf:"1F342",leaves:"1F343",brown_mushroom:"1F344-200D-1F7EB",mushroom:"1F344",tomato:"1F345",eggplant:"1F346",grapes:"1F347",melon:"1F348",watermelon:"1F349",tangerine:"1F34A",lime:"1F34B-200D-1F7E9",lemon:"1F34B",banana:"1F34C",pineapple:"1F34D",apple:"1F34E",green_apple:"1F34F",pear:"1F350",peach:"1F351",cherries:"1F352",strawberry:"1F353",hamburger:"1F354",pizza:"1F355",meat_on_bone:"1F356",poultry_leg:"1F357",rice_cracker:"1F358",rice_ball:"1F359",rice:"1F35A",curry:"1F35B",ramen:"1F35C",spaghetti:"1F35D",bread:"1F35E",fries:"1F35F",sweet_potato:"1F360",dango:"1F361",oden:"1F362",sushi:"1F363",fried_shrimp:"1F364",fish_cake:"1F365",icecream:"1F366",shaved_ice:"1F367",ice_cream:"1F368",doughnut:"1F369",cookie:"1F36A",chocolate_bar:"1F36B",candy:"1F36C",lollipop:"1F36D",custard:"1F36E",honey_pot:"1F36F",cake:"1F370",bento:"1F371",stew:"1F372",fried_egg:"1F373",fork_and_knife:"1F374",tea:"1F375",sake:"1F376",wine_glass:"1F377",cocktail:"1F378",tropical_drink:"1F379",beer:"1F37A",beers:"1F37B",baby_bottle:"1F37C",knife_fork_plate:"1F37D-FE0F",champagne:"1F37E",popcorn:"1F37F",ribbon:"1F380",gift:"1F381",birthday:"1F382",jack_o_lantern:"1F383",christmas_tree:"1F384",santa:"1F385",fireworks:"1F386",sparkler:"1F387",balloon:"1F388",tada:"1F389",confetti_ball:"1F38A",tanabata_tree:"1F38B",crossed_flags:"1F38C",bamboo:"1F38D",dolls:"1F38E",flags:"1F38F",wind_chime:"1F390",rice_scene:"1F391",school_satchel:"1F392",mortar_board:"1F393",medal:"1F396-FE0F",reminder_ribbon:"1F397-FE0F",studio_microphone:"1F399-FE0F",level_slider:"1F39A-FE0F",control_knobs:"1F39B-FE0F",film_frames:"1F39E-FE0F",admission_tickets:"1F39F-FE0F",carousel_horse:"1F3A0",ferris_wheel:"1F3A1",roller_coaster:"1F3A2",fishing_pole_and_fish:"1F3A3",microphone:"1F3A4",movie_camera:"1F3A5",cinema:"1F3A6",headphones:"1F3A7",art:"1F3A8",tophat:"1F3A9",circus_tent:"1F3AA",ticket:"1F3AB",clapper:"1F3AC",performing_arts:"1F3AD",video_game:"1F3AE",dart:"1F3AF",slot_machine:"1F3B0","8ball":"1F3B1",game_die:"1F3B2",bowling:"1F3B3",flower_playing_cards:"1F3B4",musical_note:"1F3B5",notes:"1F3B6",saxophone:"1F3B7",guitar:"1F3B8",musical_keyboard:"1F3B9",trumpet:"1F3BA",violin:"1F3BB",musical_score:"1F3BC",running_shirt_with_sash:"1F3BD",tennis:"1F3BE",ski:"1F3BF",basketball:"1F3C0",checkered_flag:"1F3C1",snowboarder:"1F3C2","woman-running":"1F3C3-200D-2640-FE0F",woman_running_facing_right:"1F3C3-200D-2640-FE0F-200D-27A1-FE0F","man-running":"1F3C3-200D-2642-FE0F",man_running_facing_right:"1F3C3-200D-2642-FE0F-200D-27A1-FE0F",person_running_facing_right:"1F3C3-200D-27A1-FE0F",runner:"1F3C3-200D-2642-FE0F","woman-surfing":"1F3C4-200D-2640-FE0F","man-surfing":"1F3C4-200D-2642-FE0F",surfer:"1F3C4-200D-2642-FE0F",sports_medal:"1F3C5",trophy:"1F3C6",horse_racing:"1F3C7",football:"1F3C8",rugby_football:"1F3C9","woman-swimming":"1F3CA-200D-2640-FE0F","man-swimming":"1F3CA-200D-2642-FE0F",swimmer:"1F3CA-200D-2642-FE0F","woman-lifting-weights":"1F3CB-FE0F-200D-2640-FE0F","man-lifting-weights":"1F3CB-FE0F-200D-2642-FE0F",weight_lifter:"1F3CB-FE0F-200D-2642-FE0F","woman-golfing":"1F3CC-FE0F-200D-2640-FE0F","man-golfing":"1F3CC-FE0F-200D-2642-FE0F",golfer:"1F3CC-FE0F-200D-2642-FE0F",racing_motorcycle:"1F3CD-FE0F",racing_car:"1F3CE-FE0F",cricket_bat_and_ball:"1F3CF",volleyball:"1F3D0",field_hockey_stick_and_ball:"1F3D1",ice_hockey_stick_and_puck:"1F3D2",table_tennis_paddle_and_ball:"1F3D3",snow_capped_mountain:"1F3D4-FE0F",camping:"1F3D5-FE0F",beach_with_umbrella:"1F3D6-FE0F",building_construction:"1F3D7-FE0F",house_buildings:"1F3D8-FE0F",cityscape:"1F3D9-FE0F",derelict_house_building:"1F3DA-FE0F",classical_building:"1F3DB-FE0F",desert:"1F3DC-FE0F",desert_island:"1F3DD-FE0F",national_park:"1F3DE-FE0F",stadium:"1F3DF-FE0F",house:"1F3E0",house_with_garden:"1F3E1",office:"1F3E2",post_office:"1F3E3",european_post_office:"1F3E4",hospital:"1F3E5",bank:"1F3E6",atm:"1F3E7",hotel:"1F3E8",love_hotel:"1F3E9",convenience_store:"1F3EA",school:"1F3EB",department_store:"1F3EC",factory:"1F3ED",izakaya_lantern:"1F3EE",japanese_castle:"1F3EF",european_castle:"1F3F0","rainbow-flag":"1F3F3-FE0F-200D-1F308",transgender_flag:"1F3F3-FE0F-200D-26A7-FE0F",waving_white_flag:"1F3F3-FE0F",pirate_flag:"1F3F4-200D-2620-FE0F","flag-england":"1F3F4-E0067-E0062-E0065-E006E-E0067-E007F","flag-scotland":"1F3F4-E0067-E0062-E0073-E0063-E0074-E007F","flag-wales":"1F3F4-E0067-E0062-E0077-E006C-E0073-E007F",waving_black_flag:"1F3F4",rosette:"1F3F5-FE0F",label:"1F3F7-FE0F",badminton_racquet_and_shuttlecock:"1F3F8",bow_and_arrow:"1F3F9",amphora:"1F3FA","skin-tone-2":"1F3FB","skin-tone-3":"1F3FC","skin-tone-4":"1F3FD","skin-tone-5":"1F3FE","skin-tone-6":"1F3FF",rat:"1F400",mouse2:"1F401",ox:"1F402",water_buffalo:"1F403",cow2:"1F404",tiger2:"1F405",leopard:"1F406",rabbit2:"1F407",black_cat:"1F408-200D-2B1B",cat2:"1F408",dragon:"1F409",crocodile:"1F40A",whale2:"1F40B",snail:"1F40C",snake:"1F40D",racehorse:"1F40E",ram:"1F40F",goat:"1F410",sheep:"1F411",monkey:"1F412",rooster:"1F413",chicken:"1F414",service_dog:"1F415-200D-1F9BA",dog2:"1F415",pig2:"1F416",boar:"1F417",elephant:"1F418",octopus:"1F419",shell:"1F41A",bug:"1F41B",ant:"1F41C",bee:"1F41D",ladybug:"1F41E",fish:"1F41F",tropical_fish:"1F420",blowfish:"1F421",turtle:"1F422",hatching_chick:"1F423",baby_chick:"1F424",hatched_chick:"1F425",phoenix:"1F426-200D-1F525",black_bird:"1F426-200D-2B1B",bird:"1F426",penguin:"1F427",koala:"1F428",poodle:"1F429",dromedary_camel:"1F42A",camel:"1F42B",dolphin:"1F42C",mouse:"1F42D",cow:"1F42E",tiger:"1F42F",rabbit:"1F430",cat:"1F431",dragon_face:"1F432",whale:"1F433",horse:"1F434",monkey_face:"1F435",dog:"1F436",pig:"1F437",frog:"1F438",hamster:"1F439",wolf:"1F43A",polar_bear:"1F43B-200D-2744-FE0F",bear:"1F43B",panda_face:"1F43C",pig_nose:"1F43D",feet:"1F43E",chipmunk:"1F43F-FE0F",eyes:"1F440","eye-in-speech-bubble":"1F441-FE0F-200D-1F5E8-FE0F",eye:"1F441-FE0F",ear:"1F442",nose:"1F443",lips:"1F444",tongue:"1F445",point_up_2:"1F446",point_down:"1F447",point_left:"1F448",point_right:"1F449",facepunch:"1F44A",wave:"1F44B",ok_hand:"1F44C","+1":"1F44D","-1":"1F44E",clap:"1F44F",open_hands:"1F450",crown:"1F451",womans_hat:"1F452",eyeglasses:"1F453",necktie:"1F454",shirt:"1F455",jeans:"1F456",dress:"1F457",kimono:"1F458",bikini:"1F459",womans_clothes:"1F45A",purse:"1F45B",handbag:"1F45C",pouch:"1F45D",mans_shoe:"1F45E",athletic_shoe:"1F45F",high_heel:"1F460",sandal:"1F461",boot:"1F462",footprints:"1F463",bust_in_silhouette:"1F464",busts_in_silhouette:"1F465",boy:"1F466",girl:"1F467","male-farmer":"1F468-200D-1F33E","male-cook":"1F468-200D-1F373",man_feeding_baby:"1F468-200D-1F37C","male-student":"1F468-200D-1F393","male-singer":"1F468-200D-1F3A4","male-artist":"1F468-200D-1F3A8","male-teacher":"1F468-200D-1F3EB","male-factory-worker":"1F468-200D-1F3ED","man-boy-boy":"1F468-200D-1F466-200D-1F466","man-boy":"1F468-200D-1F466","man-girl-boy":"1F468-200D-1F467-200D-1F466","man-girl-girl":"1F468-200D-1F467-200D-1F467","man-girl":"1F468-200D-1F467","man-man-boy":"1F468-200D-1F468-200D-1F466","man-man-boy-boy":"1F468-200D-1F468-200D-1F466-200D-1F466","man-man-girl":"1F468-200D-1F468-200D-1F467","man-man-girl-boy":"1F468-200D-1F468-200D-1F467-200D-1F466","man-man-girl-girl":"1F468-200D-1F468-200D-1F467-200D-1F467","man-woman-boy":"1F468-200D-1F469-200D-1F466","man-woman-boy-boy":"1F468-200D-1F469-200D-1F466-200D-1F466","man-woman-girl":"1F468-200D-1F469-200D-1F467","man-woman-girl-boy":"1F468-200D-1F469-200D-1F467-200D-1F466","man-woman-girl-girl":"1F468-200D-1F469-200D-1F467-200D-1F467","male-technologist":"1F468-200D-1F4BB","male-office-worker":"1F468-200D-1F4BC","male-mechanic":"1F468-200D-1F527","male-scientist":"1F468-200D-1F52C","male-astronaut":"1F468-200D-1F680","male-firefighter":"1F468-200D-1F692",man_with_white_cane_facing_right:"1F468-200D-1F9AF-200D-27A1-FE0F",man_with_probing_cane:"1F468-200D-1F9AF",red_haired_man:"1F468-200D-1F9B0",curly_haired_man:"1F468-200D-1F9B1",bald_man:"1F468-200D-1F9B2",white_haired_man:"1F468-200D-1F9B3",man_in_motorized_wheelchair_facing_right:"1F468-200D-1F9BC-200D-27A1-FE0F",man_in_motorized_wheelchair:"1F468-200D-1F9BC",man_in_manual_wheelchair_facing_right:"1F468-200D-1F9BD-200D-27A1-FE0F",man_in_manual_wheelchair:"1F468-200D-1F9BD","male-doctor":"1F468-200D-2695-FE0F","male-judge":"1F468-200D-2696-FE0F","male-pilot":"1F468-200D-2708-FE0F","man-heart-man":"1F468-200D-2764-FE0F-200D-1F468","man-kiss-man":"1F468-200D-2764-FE0F-200D-1F48B-200D-1F468",man:"1F468","female-farmer":"1F469-200D-1F33E","female-cook":"1F469-200D-1F373",woman_feeding_baby:"1F469-200D-1F37C","female-student":"1F469-200D-1F393","female-singer":"1F469-200D-1F3A4","female-artist":"1F469-200D-1F3A8","female-teacher":"1F469-200D-1F3EB","female-factory-worker":"1F469-200D-1F3ED","woman-boy-boy":"1F469-200D-1F466-200D-1F466","woman-boy":"1F469-200D-1F466","woman-girl-boy":"1F469-200D-1F467-200D-1F466","woman-girl-girl":"1F469-200D-1F467-200D-1F467","woman-girl":"1F469-200D-1F467","woman-woman-boy":"1F469-200D-1F469-200D-1F466","woman-woman-boy-boy":"1F469-200D-1F469-200D-1F466-200D-1F466","woman-woman-girl":"1F469-200D-1F469-200D-1F467","woman-woman-girl-boy":"1F469-200D-1F469-200D-1F467-200D-1F466","woman-woman-girl-girl":"1F469-200D-1F469-200D-1F467-200D-1F467","female-technologist":"1F469-200D-1F4BB","female-office-worker":"1F469-200D-1F4BC","female-mechanic":"1F469-200D-1F527","female-scientist":"1F469-200D-1F52C","female-astronaut":"1F469-200D-1F680","female-firefighter":"1F469-200D-1F692",woman_with_white_cane_facing_right:"1F469-200D-1F9AF-200D-27A1-FE0F",woman_with_probing_cane:"1F469-200D-1F9AF",red_haired_woman:"1F469-200D-1F9B0",curly_haired_woman:"1F469-200D-1F9B1",bald_woman:"1F469-200D-1F9B2",white_haired_woman:"1F469-200D-1F9B3",woman_in_motorized_wheelchair_facing_right:"1F469-200D-1F9BC-200D-27A1-FE0F",woman_in_motorized_wheelchair:"1F469-200D-1F9BC",woman_in_manual_wheelchair_facing_right:"1F469-200D-1F9BD-200D-27A1-FE0F",woman_in_manual_wheelchair:"1F469-200D-1F9BD","female-doctor":"1F469-200D-2695-FE0F","female-judge":"1F469-200D-2696-FE0F","female-pilot":"1F469-200D-2708-FE0F","woman-heart-man":"1F469-200D-2764-FE0F-200D-1F468","woman-heart-woman":"1F469-200D-2764-FE0F-200D-1F469","woman-kiss-man":"1F469-200D-2764-FE0F-200D-1F48B-200D-1F468","woman-kiss-woman":"1F469-200D-2764-FE0F-200D-1F48B-200D-1F469",woman:"1F469",family:"1F468-200D-1F469-200D-1F466",man_and_woman_holding_hands:"1F46B",two_men_holding_hands:"1F46C",two_women_holding_hands:"1F46D","female-police-officer":"1F46E-200D-2640-FE0F","male-police-officer":"1F46E-200D-2642-FE0F",cop:"1F46E-200D-2642-FE0F","women-with-bunny-ears-partying":"1F46F-200D-2640-FE0F","men-with-bunny-ears-partying":"1F46F-200D-2642-FE0F",dancers:"1F46F-200D-2640-FE0F",woman_with_veil:"1F470-200D-2640-FE0F",man_with_veil:"1F470-200D-2642-FE0F",bride_with_veil:"1F470","blond-haired-woman":"1F471-200D-2640-FE0F","blond-haired-man":"1F471-200D-2642-FE0F",person_with_blond_hair:"1F471-200D-2642-FE0F",man_with_gua_pi_mao:"1F472","woman-wearing-turban":"1F473-200D-2640-FE0F","man-wearing-turban":"1F473-200D-2642-FE0F",man_with_turban:"1F473-200D-2642-FE0F",older_man:"1F474",older_woman:"1F475",baby:"1F476","female-construction-worker":"1F477-200D-2640-FE0F","male-construction-worker":"1F477-200D-2642-FE0F",construction_worker:"1F477-200D-2642-FE0F",princess:"1F478",japanese_ogre:"1F479",japanese_goblin:"1F47A",ghost:"1F47B",angel:"1F47C",alien:"1F47D",space_invader:"1F47E",imp:"1F47F",skull:"1F480","woman-tipping-hand":"1F481-200D-2640-FE0F","man-tipping-hand":"1F481-200D-2642-FE0F",information_desk_person:"1F481-200D-2640-FE0F","female-guard":"1F482-200D-2640-FE0F","male-guard":"1F482-200D-2642-FE0F",guardsman:"1F482-200D-2642-FE0F",dancer:"1F483",lipstick:"1F484",nail_care:"1F485","woman-getting-massage":"1F486-200D-2640-FE0F","man-getting-massage":"1F486-200D-2642-FE0F",massage:"1F486-200D-2640-FE0F","woman-getting-haircut":"1F487-200D-2640-FE0F","man-getting-haircut":"1F487-200D-2642-FE0F",haircut:"1F487-200D-2640-FE0F",barber:"1F488",syringe:"1F489",pill:"1F48A",kiss:"1F48B",love_letter:"1F48C",ring:"1F48D",gem:"1F48E",couplekiss:"1F48F",bouquet:"1F490",couple_with_heart:"1F491",wedding:"1F492",heartbeat:"1F493",broken_heart:"1F494",two_hearts:"1F495",sparkling_heart:"1F496",heartpulse:"1F497",cupid:"1F498",blue_heart:"1F499",green_heart:"1F49A",yellow_heart:"1F49B",purple_heart:"1F49C",gift_heart:"1F49D",revolving_hearts:"1F49E",heart_decoration:"1F49F",diamond_shape_with_a_dot_inside:"1F4A0",bulb:"1F4A1",anger:"1F4A2",bomb:"1F4A3",zzz:"1F4A4",boom:"1F4A5",sweat_drops:"1F4A6",droplet:"1F4A7",dash:"1F4A8",hankey:"1F4A9",muscle:"1F4AA",dizzy:"1F4AB",speech_balloon:"1F4AC",thought_balloon:"1F4AD",white_flower:"1F4AE",100:"1F4AF",moneybag:"1F4B0",currency_exchange:"1F4B1",heavy_dollar_sign:"1F4B2",credit_card:"1F4B3",yen:"1F4B4",dollar:"1F4B5",euro:"1F4B6",pound:"1F4B7",money_with_wings:"1F4B8",chart:"1F4B9",seat:"1F4BA",computer:"1F4BB",briefcase:"1F4BC",minidisc:"1F4BD",floppy_disk:"1F4BE",cd:"1F4BF",dvd:"1F4C0",file_folder:"1F4C1",open_file_folder:"1F4C2",page_with_curl:"1F4C3",page_facing_up:"1F4C4",date:"1F4C5",calendar:"1F4C6",card_index:"1F4C7",chart_with_upwards_trend:"1F4C8",chart_with_downwards_trend:"1F4C9",bar_chart:"1F4CA",clipboard:"1F4CB",pushpin:"1F4CC",round_pushpin:"1F4CD",paperclip:"1F4CE",straight_ruler:"1F4CF",triangular_ruler:"1F4D0",bookmark_tabs:"1F4D1",ledger:"1F4D2",notebook:"1F4D3",notebook_with_decorative_cover:"1F4D4",closed_book:"1F4D5",book:"1F4D6",green_book:"1F4D7",blue_book:"1F4D8",orange_book:"1F4D9",books:"1F4DA",name_badge:"1F4DB",scroll:"1F4DC",memo:"1F4DD",telephone_receiver:"1F4DE",pager:"1F4DF",fax:"1F4E0",satellite_antenna:"1F4E1",loudspeaker:"1F4E2",mega:"1F4E3",outbox_tray:"1F4E4",inbox_tray:"1F4E5",package:"1F4E6","e-mail":"1F4E7",incoming_envelope:"1F4E8",envelope_with_arrow:"1F4E9",mailbox_closed:"1F4EA",mailbox:"1F4EB",mailbox_with_mail:"1F4EC",mailbox_with_no_mail:"1F4ED",postbox:"1F4EE",postal_horn:"1F4EF",newspaper:"1F4F0",iphone:"1F4F1",calling:"1F4F2",vibration_mode:"1F4F3",mobile_phone_off:"1F4F4",no_mobile_phones:"1F4F5",signal_strength:"1F4F6",camera:"1F4F7",camera_with_flash:"1F4F8",video_camera:"1F4F9",tv:"1F4FA",radio:"1F4FB",vhs:"1F4FC",film_projector:"1F4FD-FE0F",prayer_beads:"1F4FF",twisted_rightwards_arrows:"1F500",repeat:"1F501",repeat_one:"1F502",arrows_clockwise:"1F503",arrows_counterclockwise:"1F504",low_brightness:"1F505",high_brightness:"1F506",mute:"1F507",speaker:"1F508",sound:"1F509",loud_sound:"1F50A",battery:"1F50B",electric_plug:"1F50C",mag:"1F50D",mag_right:"1F50E",lock_with_ink_pen:"1F50F",closed_lock_with_key:"1F510",key:"1F511",lock:"1F512",unlock:"1F513",bell:"1F514",no_bell:"1F515",bookmark:"1F516",link:"1F517",radio_button:"1F518",back:"1F519",end:"1F51A",on:"1F51B",soon:"1F51C",top:"1F51D",underage:"1F51E",keycap_ten:"1F51F",capital_abcd:"1F520",abcd:"1F521",1234:"1F522",symbols:"1F523",abc:"1F524",fire:"1F525",flashlight:"1F526",wrench:"1F527",hammer:"1F528",nut_and_bolt:"1F529",hocho:"1F52A",gun:"1F52B",microscope:"1F52C",telescope:"1F52D",crystal_ball:"1F52E",six_pointed_star:"1F52F",beginner:"1F530",trident:"1F531",black_square_button:"1F532",white_square_button:"1F533",red_circle:"1F534",large_blue_circle:"1F535",large_orange_diamond:"1F536",large_blue_diamond:"1F537",small_orange_diamond:"1F538",small_blue_diamond:"1F539",small_red_triangle:"1F53A",small_red_triangle_down:"1F53B",arrow_up_small:"1F53C",arrow_down_small:"1F53D",om_symbol:"1F549-FE0F",dove_of_peace:"1F54A-FE0F",kaaba:"1F54B",mosque:"1F54C",synagogue:"1F54D",menorah_with_nine_branches:"1F54E",clock1:"1F550",clock2:"1F551",clock3:"1F552",clock4:"1F553",clock5:"1F554",clock6:"1F555",clock7:"1F556",clock8:"1F557",clock9:"1F558",clock10:"1F559",clock11:"1F55A",clock12:"1F55B",clock130:"1F55C",clock230:"1F55D",clock330:"1F55E",clock430:"1F55F",clock530:"1F560",clock630:"1F561",clock730:"1F562",clock830:"1F563",clock930:"1F564",clock1030:"1F565",clock1130:"1F566",clock1230:"1F567",candle:"1F56F-FE0F",mantelpiece_clock:"1F570-FE0F",hole:"1F573-FE0F",man_in_business_suit_levitating:"1F574-FE0F","female-detective":"1F575-FE0F-200D-2640-FE0F","male-detective":"1F575-FE0F-200D-2642-FE0F",sleuth_or_spy:"1F575-FE0F-200D-2642-FE0F",dark_sunglasses:"1F576-FE0F",spider:"1F577-FE0F",spider_web:"1F578-FE0F",joystick:"1F579-FE0F",man_dancing:"1F57A",linked_paperclips:"1F587-FE0F",lower_left_ballpoint_pen:"1F58A-FE0F",lower_left_fountain_pen:"1F58B-FE0F",lower_left_paintbrush:"1F58C-FE0F",lower_left_crayon:"1F58D-FE0F",raised_hand_with_fingers_splayed:"1F590-FE0F",middle_finger:"1F595","spock-hand":"1F596",black_heart:"1F5A4",desktop_computer:"1F5A5-FE0F",printer:"1F5A8-FE0F",three_button_mouse:"1F5B1-FE0F",trackball:"1F5B2-FE0F",frame_with_picture:"1F5BC-FE0F",card_index_dividers:"1F5C2-FE0F",card_file_box:"1F5C3-FE0F",file_cabinet:"1F5C4-FE0F",wastebasket:"1F5D1-FE0F",spiral_note_pad:"1F5D2-FE0F",spiral_calendar_pad:"1F5D3-FE0F",compression:"1F5DC-FE0F",old_key:"1F5DD-FE0F",rolled_up_newspaper:"1F5DE-FE0F",dagger_knife:"1F5E1-FE0F",speaking_head_in_silhouette:"1F5E3-FE0F",left_speech_bubble:"1F5E8-FE0F",right_anger_bubble:"1F5EF-FE0F",ballot_box_with_ballot:"1F5F3-FE0F",world_map:"1F5FA-FE0F",mount_fuji:"1F5FB",tokyo_tower:"1F5FC",statue_of_liberty:"1F5FD",japan:"1F5FE",moyai:"1F5FF",grinning:"1F600",grin:"1F601",joy:"1F602",smiley:"1F603",smile:"1F604",sweat_smile:"1F605",laughing:"1F606",innocent:"1F607",smiling_imp:"1F608",wink:"1F609",blush:"1F60A",yum:"1F60B",relieved:"1F60C",heart_eyes:"1F60D",sunglasses:"1F60E",smirk:"1F60F",neutral_face:"1F610",expressionless:"1F611",unamused:"1F612",sweat:"1F613",pensive:"1F614",confused:"1F615",confounded:"1F616",kissing:"1F617",kissing_heart:"1F618",kissing_smiling_eyes:"1F619",kissing_closed_eyes:"1F61A",stuck_out_tongue:"1F61B",stuck_out_tongue_winking_eye:"1F61C",stuck_out_tongue_closed_eyes:"1F61D",disappointed:"1F61E",worried:"1F61F",angry:"1F620",rage:"1F621",cry:"1F622",persevere:"1F623",triumph:"1F624",disappointed_relieved:"1F625",frowning:"1F626",anguished:"1F627",fearful:"1F628",weary:"1F629",sleepy:"1F62A",tired_face:"1F62B",grimacing:"1F62C",sob:"1F62D",face_exhaling:"1F62E-200D-1F4A8",open_mouth:"1F62E",hushed:"1F62F",cold_sweat:"1F630",scream:"1F631",astonished:"1F632",flushed:"1F633",sleeping:"1F634",face_with_spiral_eyes:"1F635-200D-1F4AB",dizzy_face:"1F635",face_in_clouds:"1F636-200D-1F32B-FE0F",no_mouth:"1F636",mask:"1F637",smile_cat:"1F638",joy_cat:"1F639",smiley_cat:"1F63A",heart_eyes_cat:"1F63B",smirk_cat:"1F63C",kissing_cat:"1F63D",pouting_cat:"1F63E",crying_cat_face:"1F63F",scream_cat:"1F640",slightly_frowning_face:"1F641",head_shaking_horizontally:"1F642-200D-2194-FE0F",head_shaking_vertically:"1F642-200D-2195-FE0F",slightly_smiling_face:"1F642",upside_down_face:"1F643",face_with_rolling_eyes:"1F644","woman-gesturing-no":"1F645-200D-2640-FE0F","man-gesturing-no":"1F645-200D-2642-FE0F",no_good:"1F645-200D-2640-FE0F","woman-gesturing-ok":"1F646-200D-2640-FE0F","man-gesturing-ok":"1F646-200D-2642-FE0F",ok_woman:"1F646-200D-2640-FE0F","woman-bowing":"1F647-200D-2640-FE0F","man-bowing":"1F647-200D-2642-FE0F",bow:"1F647",see_no_evil:"1F648",hear_no_evil:"1F649",speak_no_evil:"1F64A","woman-raising-hand":"1F64B-200D-2640-FE0F","man-raising-hand":"1F64B-200D-2642-FE0F",raising_hand:"1F64B-200D-2640-FE0F",raised_hands:"1F64C","woman-frowning":"1F64D-200D-2640-FE0F","man-frowning":"1F64D-200D-2642-FE0F",person_frowning:"1F64D-200D-2640-FE0F","woman-pouting":"1F64E-200D-2640-FE0F","man-pouting":"1F64E-200D-2642-FE0F",person_with_pouting_face:"1F64E-200D-2640-FE0F",pray:"1F64F",rocket:"1F680",helicopter:"1F681",steam_locomotive:"1F682",railway_car:"1F683",bullettrain_side:"1F684",bullettrain_front:"1F685",train2:"1F686",metro:"1F687",light_rail:"1F688",station:"1F689",tram:"1F68A",train:"1F68B",bus:"1F68C",oncoming_bus:"1F68D",trolleybus:"1F68E",busstop:"1F68F",minibus:"1F690",ambulance:"1F691",fire_engine:"1F692",police_car:"1F693",oncoming_police_car:"1F694",taxi:"1F695",oncoming_taxi:"1F696",car:"1F697",oncoming_automobile:"1F698",blue_car:"1F699",truck:"1F69A",articulated_lorry:"1F69B",tractor:"1F69C",monorail:"1F69D",mountain_railway:"1F69E",suspension_railway:"1F69F",mountain_cableway:"1F6A0",aerial_tramway:"1F6A1",ship:"1F6A2","woman-rowing-boat":"1F6A3-200D-2640-FE0F","man-rowing-boat":"1F6A3-200D-2642-FE0F",rowboat:"1F6A3-200D-2642-FE0F",speedboat:"1F6A4",traffic_light:"1F6A5",vertical_traffic_light:"1F6A6",construction:"1F6A7",rotating_light:"1F6A8",triangular_flag_on_post:"1F6A9",door:"1F6AA",no_entry_sign:"1F6AB",smoking:"1F6AC",no_smoking:"1F6AD",put_litter_in_its_place:"1F6AE",do_not_litter:"1F6AF",potable_water:"1F6B0","non-potable_water":"1F6B1",bike:"1F6B2",no_bicycles:"1F6B3","woman-biking":"1F6B4-200D-2640-FE0F","man-biking":"1F6B4-200D-2642-FE0F",bicyclist:"1F6B4-200D-2642-FE0F","woman-mountain-biking":"1F6B5-200D-2640-FE0F","man-mountain-biking":"1F6B5-200D-2642-FE0F",mountain_bicyclist:"1F6B5-200D-2642-FE0F","woman-walking":"1F6B6-200D-2640-FE0F",woman_walking_facing_right:"1F6B6-200D-2640-FE0F-200D-27A1-FE0F","man-walking":"1F6B6-200D-2642-FE0F",man_walking_facing_right:"1F6B6-200D-2642-FE0F-200D-27A1-FE0F",person_walking_facing_right:"1F6B6-200D-27A1-FE0F",walking:"1F6B6-200D-2642-FE0F",no_pedestrians:"1F6B7",children_crossing:"1F6B8",mens:"1F6B9",womens:"1F6BA",restroom:"1F6BB",baby_symbol:"1F6BC",toilet:"1F6BD",wc:"1F6BE",shower:"1F6BF",bath:"1F6C0",bathtub:"1F6C1",passport_control:"1F6C2",customs:"1F6C3",baggage_claim:"1F6C4",left_luggage:"1F6C5",couch_and_lamp:"1F6CB-FE0F",sleeping_accommodation:"1F6CC",shopping_bags:"1F6CD-FE0F",bellhop_bell:"1F6CE-FE0F",bed:"1F6CF-FE0F",place_of_worship:"1F6D0",octagonal_sign:"1F6D1",shopping_trolley:"1F6D2",hindu_temple:"1F6D5",hut:"1F6D6",elevator:"1F6D7",wireless:"1F6DC",playground_slide:"1F6DD",wheel:"1F6DE",ring_buoy:"1F6DF",hammer_and_wrench:"1F6E0-FE0F",shield:"1F6E1-FE0F",oil_drum:"1F6E2-FE0F",motorway:"1F6E3-FE0F",railway_track:"1F6E4-FE0F",motor_boat:"1F6E5-FE0F",small_airplane:"1F6E9-FE0F",airplane_departure:"1F6EB",airplane_arriving:"1F6EC",satellite:"1F6F0-FE0F",passenger_ship:"1F6F3-FE0F",scooter:"1F6F4",motor_scooter:"1F6F5",canoe:"1F6F6",sled:"1F6F7",flying_saucer:"1F6F8",skateboard:"1F6F9",auto_rickshaw:"1F6FA",pickup_truck:"1F6FB",roller_skate:"1F6FC",large_orange_circle:"1F7E0",large_yellow_circle:"1F7E1",large_green_circle:"1F7E2",large_purple_circle:"1F7E3",large_brown_circle:"1F7E4",large_red_square:"1F7E5",large_blue_square:"1F7E6",large_orange_square:"1F7E7",large_yellow_square:"1F7E8",large_green_square:"1F7E9",large_purple_square:"1F7EA",large_brown_square:"1F7EB",heavy_equals_sign:"1F7F0",pinched_fingers:"1F90C",white_heart:"1F90D",brown_heart:"1F90E",pinching_hand:"1F90F",zipper_mouth_face:"1F910",money_mouth_face:"1F911",face_with_thermometer:"1F912",nerd_face:"1F913",thinking_face:"1F914",face_with_head_bandage:"1F915",robot_face:"1F916",hugging_face:"1F917",the_horns:"1F918",call_me_hand:"1F919",raised_back_of_hand:"1F91A","left-facing_fist":"1F91B","right-facing_fist":"1F91C",handshake:"1F91D",crossed_fingers:"1F91E",i_love_you_hand_sign:"1F91F",face_with_cowboy_hat:"1F920",clown_face:"1F921",nauseated_face:"1F922",rolling_on_the_floor_laughing:"1F923",drooling_face:"1F924",lying_face:"1F925","woman-facepalming":"1F926-200D-2640-FE0F","man-facepalming":"1F926-200D-2642-FE0F",face_palm:"1F926",sneezing_face:"1F927",face_with_raised_eyebrow:"1F928","star-struck":"1F929",zany_face:"1F92A",shushing_face:"1F92B",face_with_symbols_on_mouth:"1F92C",face_with_hand_over_mouth:"1F92D",face_vomiting:"1F92E",exploding_head:"1F92F",pregnant_woman:"1F930","breast-feeding":"1F931",palms_up_together:"1F932",selfie:"1F933",prince:"1F934",woman_in_tuxedo:"1F935-200D-2640-FE0F",man_in_tuxedo:"1F935-200D-2642-FE0F",person_in_tuxedo:"1F935",mrs_claus:"1F936","woman-shrugging":"1F937-200D-2640-FE0F","man-shrugging":"1F937-200D-2642-FE0F",shrug:"1F937","woman-cartwheeling":"1F938-200D-2640-FE0F","man-cartwheeling":"1F938-200D-2642-FE0F",person_doing_cartwheel:"1F938","woman-juggling":"1F939-200D-2640-FE0F","man-juggling":"1F939-200D-2642-FE0F",juggling:"1F939",fencer:"1F93A","woman-wrestling":"1F93C-200D-2640-FE0F","man-wrestling":"1F93C-200D-2642-FE0F",wrestlers:"1F93C","woman-playing-water-polo":"1F93D-200D-2640-FE0F","man-playing-water-polo":"1F93D-200D-2642-FE0F",water_polo:"1F93D","woman-playing-handball":"1F93E-200D-2640-FE0F","man-playing-handball":"1F93E-200D-2642-FE0F",handball:"1F93E",diving_mask:"1F93F",wilted_flower:"1F940",drum_with_drumsticks:"1F941",clinking_glasses:"1F942",tumbler_glass:"1F943",spoon:"1F944",goal_net:"1F945",first_place_medal:"1F947",second_place_medal:"1F948",third_place_medal:"1F949",boxing_glove:"1F94A",martial_arts_uniform:"1F94B",curling_stone:"1F94C",lacrosse:"1F94D",softball:"1F94E",flying_disc:"1F94F",croissant:"1F950",avocado:"1F951",cucumber:"1F952",bacon:"1F953",potato:"1F954",carrot:"1F955",baguette_bread:"1F956",green_salad:"1F957",shallow_pan_of_food:"1F958",stuffed_flatbread:"1F959",egg:"1F95A",glass_of_milk:"1F95B",peanuts:"1F95C",kiwifruit:"1F95D",pancakes:"1F95E",dumpling:"1F95F",fortune_cookie:"1F960",takeout_box:"1F961",chopsticks:"1F962",bowl_with_spoon:"1F963",cup_with_straw:"1F964",coconut:"1F965",broccoli:"1F966",pie:"1F967",pretzel:"1F968",cut_of_meat:"1F969",sandwich:"1F96A",canned_food:"1F96B",leafy_green:"1F96C",mango:"1F96D",moon_cake:"1F96E",bagel:"1F96F",smiling_face_with_3_hearts:"1F970",yawning_face:"1F971",smiling_face_with_tear:"1F972",partying_face:"1F973",woozy_face:"1F974",hot_face:"1F975",cold_face:"1F976",ninja:"1F977",disguised_face:"1F978",face_holding_back_tears:"1F979",pleading_face:"1F97A",sari:"1F97B",lab_coat:"1F97C",goggles:"1F97D",hiking_boot:"1F97E",womans_flat_shoe:"1F97F",crab:"1F980",lion_face:"1F981",scorpion:"1F982",turkey:"1F983",unicorn_face:"1F984",eagle:"1F985",duck:"1F986",bat:"1F987",shark:"1F988",owl:"1F989",fox_face:"1F98A",butterfly:"1F98B",deer:"1F98C",gorilla:"1F98D",lizard:"1F98E",rhinoceros:"1F98F",shrimp:"1F990",squid:"1F991",giraffe_face:"1F992",zebra_face:"1F993",hedgehog:"1F994",sauropod:"1F995","t-rex":"1F996",cricket:"1F997",kangaroo:"1F998",llama:"1F999",peacock:"1F99A",hippopotamus:"1F99B",parrot:"1F99C",raccoon:"1F99D",lobster:"1F99E",mosquito:"1F99F",microbe:"1F9A0",badger:"1F9A1",swan:"1F9A2",mammoth:"1F9A3",dodo:"1F9A4",sloth:"1F9A5",otter:"1F9A6",orangutan:"1F9A7",skunk:"1F9A8",flamingo:"1F9A9",oyster:"1F9AA",beaver:"1F9AB",bison:"1F9AC",seal:"1F9AD",guide_dog:"1F9AE",probing_cane:"1F9AF",bone:"1F9B4",leg:"1F9B5",foot:"1F9B6",tooth:"1F9B7",female_superhero:"1F9B8-200D-2640-FE0F",male_superhero:"1F9B8-200D-2642-FE0F",superhero:"1F9B8",female_supervillain:"1F9B9-200D-2640-FE0F",male_supervillain:"1F9B9-200D-2642-FE0F",supervillain:"1F9B9",safety_vest:"1F9BA",ear_with_hearing_aid:"1F9BB",motorized_wheelchair:"1F9BC",manual_wheelchair:"1F9BD",mechanical_arm:"1F9BE",mechanical_leg:"1F9BF",cheese_wedge:"1F9C0",cupcake:"1F9C1",salt:"1F9C2",beverage_box:"1F9C3",garlic:"1F9C4",onion:"1F9C5",falafel:"1F9C6",waffle:"1F9C7",butter:"1F9C8",mate_drink:"1F9C9",ice_cube:"1F9CA",bubble_tea:"1F9CB",troll:"1F9CC",woman_standing:"1F9CD-200D-2640-FE0F",man_standing:"1F9CD-200D-2642-FE0F",standing_person:"1F9CD",woman_kneeling:"1F9CE-200D-2640-FE0F",woman_kneeling_facing_right:"1F9CE-200D-2640-FE0F-200D-27A1-FE0F",man_kneeling:"1F9CE-200D-2642-FE0F",man_kneeling_facing_right:"1F9CE-200D-2642-FE0F-200D-27A1-FE0F",person_kneeling_facing_right:"1F9CE-200D-27A1-FE0F",kneeling_person:"1F9CE",deaf_woman:"1F9CF-200D-2640-FE0F",deaf_man:"1F9CF-200D-2642-FE0F",deaf_person:"1F9CF",face_with_monocle:"1F9D0",farmer:"1F9D1-200D-1F33E",cook:"1F9D1-200D-1F373",person_feeding_baby:"1F9D1-200D-1F37C",mx_claus:"1F9D1-200D-1F384",student:"1F9D1-200D-1F393",singer:"1F9D1-200D-1F3A4",artist:"1F9D1-200D-1F3A8",teacher:"1F9D1-200D-1F3EB",factory_worker:"1F9D1-200D-1F3ED",technologist:"1F9D1-200D-1F4BB",office_worker:"1F9D1-200D-1F4BC",mechanic:"1F9D1-200D-1F527",scientist:"1F9D1-200D-1F52C",astronaut:"1F9D1-200D-1F680",firefighter:"1F9D1-200D-1F692",people_holding_hands:"1F9D1-200D-1F91D-200D-1F9D1",person_with_white_cane_facing_right:"1F9D1-200D-1F9AF-200D-27A1-FE0F",person_with_probing_cane:"1F9D1-200D-1F9AF",red_haired_person:"1F9D1-200D-1F9B0",curly_haired_person:"1F9D1-200D-1F9B1",bald_person:"1F9D1-200D-1F9B2",white_haired_person:"1F9D1-200D-1F9B3",person_in_motorized_wheelchair_facing_right:"1F9D1-200D-1F9BC-200D-27A1-FE0F",person_in_motorized_wheelchair:"1F9D1-200D-1F9BC",person_in_manual_wheelchair_facing_right:"1F9D1-200D-1F9BD-200D-27A1-FE0F",person_in_manual_wheelchair:"1F9D1-200D-1F9BD",family_adult_adult_child:"1F9D1-200D-1F9D1-200D-1F9D2",family_adult_adult_child_child:"1F9D1-200D-1F9D1-200D-1F9D2-200D-1F9D2",family_adult_child_child:"1F9D1-200D-1F9D2-200D-1F9D2",family_adult_child:"1F9D1-200D-1F9D2",health_worker:"1F9D1-200D-2695-FE0F",judge:"1F9D1-200D-2696-FE0F",pilot:"1F9D1-200D-2708-FE0F",adult:"1F9D1",child:"1F9D2",older_adult:"1F9D3",woman_with_beard:"1F9D4-200D-2640-FE0F",man_with_beard:"1F9D4-200D-2642-FE0F",bearded_person:"1F9D4",person_with_headscarf:"1F9D5",woman_in_steamy_room:"1F9D6-200D-2640-FE0F",man_in_steamy_room:"1F9D6-200D-2642-FE0F",person_in_steamy_room:"1F9D6-200D-2642-FE0F",woman_climbing:"1F9D7-200D-2640-FE0F",man_climbing:"1F9D7-200D-2642-FE0F",person_climbing:"1F9D7-200D-2640-FE0F",woman_in_lotus_position:"1F9D8-200D-2640-FE0F",man_in_lotus_position:"1F9D8-200D-2642-FE0F",person_in_lotus_position:"1F9D8-200D-2640-FE0F",female_mage:"1F9D9-200D-2640-FE0F",male_mage:"1F9D9-200D-2642-FE0F",mage:"1F9D9-200D-2640-FE0F",female_fairy:"1F9DA-200D-2640-FE0F",male_fairy:"1F9DA-200D-2642-FE0F",fairy:"1F9DA-200D-2640-FE0F",female_vampire:"1F9DB-200D-2640-FE0F",male_vampire:"1F9DB-200D-2642-FE0F",vampire:"1F9DB-200D-2640-FE0F",mermaid:"1F9DC-200D-2640-FE0F",merman:"1F9DC-200D-2642-FE0F",merperson:"1F9DC-200D-2642-FE0F",female_elf:"1F9DD-200D-2640-FE0F",male_elf:"1F9DD-200D-2642-FE0F",elf:"1F9DD-200D-2642-FE0F",female_genie:"1F9DE-200D-2640-FE0F",male_genie:"1F9DE-200D-2642-FE0F",genie:"1F9DE-200D-2642-FE0F",female_zombie:"1F9DF-200D-2640-FE0F",male_zombie:"1F9DF-200D-2642-FE0F",zombie:"1F9DF-200D-2642-FE0F",brain:"1F9E0",orange_heart:"1F9E1",billed_cap:"1F9E2",scarf:"1F9E3",gloves:"1F9E4",coat:"1F9E5",socks:"1F9E6",red_envelope:"1F9E7",firecracker:"1F9E8",jigsaw:"1F9E9",test_tube:"1F9EA",petri_dish:"1F9EB",dna:"1F9EC",compass:"1F9ED",abacus:"1F9EE",fire_extinguisher:"1F9EF",toolbox:"1F9F0",bricks:"1F9F1",magnet:"1F9F2",luggage:"1F9F3",lotion_bottle:"1F9F4",thread:"1F9F5",yarn:"1F9F6",safety_pin:"1F9F7",teddy_bear:"1F9F8",broom:"1F9F9",basket:"1F9FA",roll_of_paper:"1F9FB",soap:"1F9FC",sponge:"1F9FD",receipt:"1F9FE",nazar_amulet:"1F9FF",ballet_shoes:"1FA70","one-piece_swimsuit":"1FA71",briefs:"1FA72",shorts:"1FA73",thong_sandal:"1FA74",light_blue_heart:"1FA75",grey_heart:"1FA76",pink_heart:"1FA77",drop_of_blood:"1FA78",adhesive_bandage:"1FA79",stethoscope:"1FA7A","x-ray":"1FA7B",crutch:"1FA7C","yo-yo":"1FA80",kite:"1FA81",parachute:"1FA82",boomerang:"1FA83",magic_wand:"1FA84",pinata:"1FA85",nesting_dolls:"1FA86",maracas:"1FA87",flute:"1FA88",ringed_planet:"1FA90",chair:"1FA91",razor:"1FA92",axe:"1FA93",diya_lamp:"1FA94",banjo:"1FA95",military_helmet:"1FA96",accordion:"1FA97",long_drum:"1FA98",coin:"1FA99",carpentry_saw:"1FA9A",screwdriver:"1FA9B",ladder:"1FA9C",hook:"1FA9D",mirror:"1FA9E",window:"1FA9F",plunger:"1FAA0",sewing_needle:"1FAA1",knot:"1FAA2",bucket:"1FAA3",mouse_trap:"1FAA4",toothbrush:"1FAA5",headstone:"1FAA6",placard:"1FAA7",rock:"1FAA8",mirror_ball:"1FAA9",identification_card:"1FAAA",low_battery:"1FAAB",hamsa:"1FAAC",folding_hand_fan:"1FAAD",hair_pick:"1FAAE",khanda:"1FAAF",fly:"1FAB0",worm:"1FAB1",beetle:"1FAB2",cockroach:"1FAB3",potted_plant:"1FAB4",wood:"1FAB5",feather:"1FAB6",lotus:"1FAB7",coral:"1FAB8",empty_nest:"1FAB9",nest_with_eggs:"1FABA",hyacinth:"1FABB",jellyfish:"1FABC",wing:"1FABD",goose:"1FABF",anatomical_heart:"1FAC0",lungs:"1FAC1",people_hugging:"1FAC2",pregnant_man:"1FAC3",pregnant_person:"1FAC4",person_with_crown:"1FAC5",moose:"1FACE",donkey:"1FACF",blueberries:"1FAD0",bell_pepper:"1FAD1",olive:"1FAD2",flatbread:"1FAD3",tamale:"1FAD4",fondue:"1FAD5",teapot:"1FAD6",pouring_liquid:"1FAD7",beans:"1FAD8",jar:"1FAD9",ginger_root:"1FADA",pea_pod:"1FADB",melting_face:"1FAE0",saluting_face:"1FAE1",face_with_open_eyes_and_hand_over_mouth:"1FAE2",face_with_peeking_eye:"1FAE3",face_with_diagonal_mouth:"1FAE4",dotted_line_face:"1FAE5",biting_lip:"1FAE6",bubbles:"1FAE7",shaking_face:"1FAE8",hand_with_index_finger_and_thumb_crossed:"1FAF0",rightwards_hand:"1FAF1",leftwards_hand:"1FAF2",palm_down_hand:"1FAF3",palm_up_hand:"1FAF4",index_pointing_at_the_viewer:"1FAF5",heart_hands:"1FAF6",leftwards_pushing_hand:"1FAF7",rightwards_pushing_hand:"1FAF8",bangbang:"203C-FE0F",interrobang:"2049-FE0F",tm:"2122-FE0F",information_source:"2139-FE0F",left_right_arrow:"2194-FE0F",arrow_up_down:"2195-FE0F",arrow_upper_left:"2196-FE0F",arrow_upper_right:"2197-FE0F",arrow_lower_right:"2198-FE0F",arrow_lower_left:"2199-FE0F",leftwards_arrow_with_hook:"21A9-FE0F",arrow_right_hook:"21AA-FE0F",watch:"231A",hourglass:"231B",keyboard:"2328-FE0F",eject:"23CF-FE0F",fast_forward:"23E9",rewind:"23EA",arrow_double_up:"23EB",arrow_double_down:"23EC",black_right_pointing_double_triangle_with_vertical_bar:"23ED-FE0F",black_left_pointing_double_triangle_with_vertical_bar:"23EE-FE0F",black_right_pointing_triangle_with_double_vertical_bar:"23EF-FE0F",alarm_clock:"23F0",stopwatch:"23F1-FE0F",timer_clock:"23F2-FE0F",hourglass_flowing_sand:"23F3",double_vertical_bar:"23F8-FE0F",black_square_for_stop:"23F9-FE0F",black_circle_for_record:"23FA-FE0F",m:"24C2-FE0F",black_small_square:"25AA-FE0F",white_small_square:"25AB-FE0F",arrow_forward:"25B6-FE0F",arrow_backward:"25C0-FE0F",white_medium_square:"25FB-FE0F",black_medium_square:"25FC-FE0F",white_medium_small_square:"25FD",black_medium_small_square:"25FE",sunny:"2600-FE0F",cloud:"2601-FE0F",umbrella:"2602-FE0F",snowman:"2603-FE0F",comet:"2604-FE0F",phone:"260E-FE0F",ballot_box_with_check:"2611-FE0F",umbrella_with_rain_drops:"2614",coffee:"2615",shamrock:"2618-FE0F",point_up:"261D-FE0F",skull_and_crossbones:"2620-FE0F",radioactive_sign:"2622-FE0F",biohazard_sign:"2623-FE0F",orthodox_cross:"2626-FE0F",star_and_crescent:"262A-FE0F",peace_symbol:"262E-FE0F",yin_yang:"262F-FE0F",wheel_of_dharma:"2638-FE0F",white_frowning_face:"2639-FE0F",relaxed:"263A-FE0F",female_sign:"2640-FE0F",male_sign:"2642-FE0F",aries:"2648",taurus:"2649",gemini:"264A",cancer:"264B",leo:"264C",virgo:"264D",libra:"264E",scorpius:"264F",sagittarius:"2650",capricorn:"2651",aquarius:"2652",pisces:"2653",chess_pawn:"265F-FE0F",spades:"2660-FE0F",clubs:"2663-FE0F",hearts:"2665-FE0F",diamonds:"2666-FE0F",hotsprings:"2668-FE0F",recycle:"267B-FE0F",infinity:"267E-FE0F",wheelchair:"267F",hammer_and_pick:"2692-FE0F",anchor:"2693",crossed_swords:"2694-FE0F",medical_symbol:"2695-FE0F",scales:"2696-FE0F",alembic:"2697-FE0F",gear:"2699-FE0F",atom_symbol:"269B-FE0F",fleur_de_lis:"269C-FE0F",warning:"26A0-FE0F",zap:"26A1",transgender_symbol:"26A7-FE0F",white_circle:"26AA",black_circle:"26AB",coffin:"26B0-FE0F",funeral_urn:"26B1-FE0F",soccer:"26BD",baseball:"26BE",snowman_without_snow:"26C4",partly_sunny:"26C5",thunder_cloud_and_rain:"26C8-FE0F",ophiuchus:"26CE",pick:"26CF-FE0F",helmet_with_white_cross:"26D1-FE0F",broken_chain:"26D3-FE0F-200D-1F4A5",chains:"26D3-FE0F",no_entry:"26D4",shinto_shrine:"26E9-FE0F",church:"26EA",mountain:"26F0-FE0F",umbrella_on_ground:"26F1-FE0F",fountain:"26F2",golf:"26F3",ferry:"26F4-FE0F",boat:"26F5",skier:"26F7-FE0F",ice_skate:"26F8-FE0F","woman-bouncing-ball":"26F9-FE0F-200D-2640-FE0F","man-bouncing-ball":"26F9-FE0F-200D-2642-FE0F",person_with_ball:"26F9-FE0F-200D-2642-FE0F",tent:"26FA",fuelpump:"26FD",scissors:"2702-FE0F",white_check_mark:"2705",airplane:"2708-FE0F",email:"2709-FE0F",fist:"270A",hand:"270B",v:"270C-FE0F",writing_hand:"270D-FE0F",pencil2:"270F-FE0F",black_nib:"2712-FE0F",heavy_check_mark:"2714-FE0F",heavy_multiplication_x:"2716-FE0F",latin_cross:"271D-FE0F",star_of_david:"2721-FE0F",sparkles:"2728",eight_spoked_asterisk:"2733-FE0F",eight_pointed_black_star:"2734-FE0F",snowflake:"2744-FE0F",sparkle:"2747-FE0F",x:"274C",negative_squared_cross_mark:"274E",question:"2753",grey_question:"2754",grey_exclamation:"2755",exclamation:"2757",heavy_heart_exclamation_mark_ornament:"2763-FE0F",heart_on_fire:"2764-FE0F-200D-1F525",mending_heart:"2764-FE0F-200D-1FA79",heart:"2764-FE0F",heavy_plus_sign:"2795",heavy_minus_sign:"2796",heavy_division_sign:"2797",arrow_right:"27A1-FE0F",curly_loop:"27B0",loop:"27BF",arrow_heading_up:"2934-FE0F",arrow_heading_down:"2935-FE0F",arrow_left:"2B05-FE0F",arrow_up:"2B06-FE0F",arrow_down:"2B07-FE0F",black_large_square:"2B1B",white_large_square:"2B1C",star:"2B50",o:"2B55",wavy_dash:"3030-FE0F",part_alternation_mark:"303D-FE0F",congratulations:"3297-FE0F",secret:"3299-FE0F"}})); define("core/emoji/picker",["exports","core/localstorage","core/emoji/data","core/utils","core/str","core/templates"],(function(_exports,_localstorage,EmojiData,_utils,_str,_templates){var obj; /** * Emoji picker. * * @module core/emoji/picker * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_localstorage=(obj=_localstorage)&&obj.__esModule?obj:{default:obj},EmojiData=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(EmojiData);const ROW_TYPE_EMOJI=0,ROW_TYPE_HEADER=1,SELECTORS_CATEGORY_SELECTOR='[data-action="show-category"]',SELECTORS_EMOJIS_CONTAINER='[data-region="emojis-container"]',SELECTORS_EMOJI_PREVIEW='[data-region="emoji-preview"]',SELECTORS_EMOJI_SHORT_NAME='[data-region="emoji-short-name"]',SELECTORS_ROW_CONTAINER='[data-region="row-container"]',SELECTORS_SEARCH_INPUT='[data-region="search-input"]',SELECTORS_SEARCH_RESULTS_CONTAINER='[data-region="search-results-container"]',createRowDataForCategory=(categoryName,categoryDisplayName,emojis,totalRowCount)=>{const rowData=[];rowData.push({index:totalRowCount+rowData.length,type:ROW_TYPE_HEADER,data:{name:categoryName,displayName:categoryDisplayName}});for(let i=0;irowData.map(((data,index)=>({...data,index:index}))),getCategoryScrollPositionsFromRowData=rowData=>rowData.reduce(((carry,row,index)=>(row.type===ROW_TYPE_HEADER&&(carry[row.data.name]=40*index),carry)),{}),isEmojiElement=element=>null!==element.getAttribute("data-short-names"),findCategorySelectorFromElement=element=>element?"show-category"===element.getAttribute("data-action")?element:findCategorySelectorFromElement(element.parentElement):null,getCategorySelectorByCategoryName=(root,name)=>root.querySelector('[data-category="'.concat(name,'"]')),getCategoryByScrollPosition=(root,position,categoryScrollPositions)=>{let positions=[];position<0&&(position=0);for(const categoryName in categoryScrollPositions){const categoryPosition=categoryScrollPositions[categoryName];positions.push([categoryPosition,categoryName])}positions.sort(((_ref,_ref2)=>{let[a]=_ref,[b]=_ref2;return ab?1:0}));const{categoryName:categoryName,previousPosition:previousPosition,nextPosition:nextPosition}=positions.reduce(((carry,candidate)=>{const[categoryPosition,categoryName]=candidate;return categoryPosition<=position?(carry.categoryName=categoryName,carry.previousPosition=carry.currentPosition,carry.currentPosition=position):null===carry.nextPosition&&(carry.nextPosition=categoryPosition),carry}),{categoryName:null,currentPosition:null,previousPosition:null,nextPosition:null});return[getCategorySelectorByCategoryName(root,categoryName),previousPosition,nextPosition]},getRecentEmojis=()=>{const storedData=_localstorage.default.get("moodle-recent-emojis");return storedData?JSON.parse(storedData):[]},addRecentEmoji=(rowData,recentEmojiRowCount,newEmoji)=>{const categoryName=rowData[0].data.name,categoryDisplayName=rowData[0].data.displayName,recentEmojis=getRecentEmojis();let newRecentEmojis=[newEmoji,...recentEmojis.filter((emoji=>emoji.unified!=newEmoji.unified))];newRecentEmojis=newRecentEmojis.slice(0,21);const newRecentEmojiRowData=createRowDataForCategory(categoryName,categoryDisplayName,newRecentEmojis);return(recentEmojis=>{_localstorage.default.set("moodle-recent-emojis",JSON.stringify(recentEmojis))})(newRecentEmojis),[addIndexesToRowData(newRecentEmojiRowData.concat(rowData.slice(recentEmojiRowCount))),newRecentEmojiRowData.length]},getRowsToRender=(scrollPosition,visibleRowCount,rowData)=>{const minVisibleRow=scrollPosition>40?Math.floor(scrollPosition/40):0,start=minVisibleRow>=5?minVisibleRow-5:minVisibleRow,end=minVisibleRow+visibleRowCount+5;return rowData.slice(start,end)},createRowElement=async rowData=>{let row=null;return row=rowData.type===ROW_TYPE_HEADER?await(async(rowIndex,name)=>{const context={index:rowIndex,text:name},html=await(0,_templates.render)("core/emoji/header_row",context),temp=document.createElement("div");return temp.innerHTML=html,temp.firstChild})(rowData.index,rowData.data.displayName):await(async(rowIndex,emojis)=>{const context={index:rowIndex,emojis:emojis.map((emojiData=>{const charCodes=emojiData.unified.split("-").map((code=>"0x".concat(code))),emojiText=String.fromCodePoint.apply(null,charCodes);return{shortnames:":".concat(emojiData.shortnames.join(": :"),":"),unified:emojiData.unified,text:emojiText,spacer:!1}})),spacers:Array(7-emojis.length).fill(!0)},html=await(0,_templates.render)("core/emoji/emoji_row",context),temp=document.createElement("div");return temp.innerHTML=html,temp.firstChild})(rowData.index,rowData.data),row.style.position="absolute",row.style.left=0,row.style.right=0,row.style.top="".concat(40*rowData.index,"px"),row},doRowsMatch=(a,b)=>{if(a.index!==b.index)return!1;if(a.type!==b.type)return!1;if(typeof a.data!=typeof b.data)return!1;if(a.type===ROW_TYPE_HEADER)return a.data.name===b.data.name;if(a.data.length!==b.data.length)return!1;for(let i=0;i{let currentRows=[],nextRows=[],rowCount=0,isRendering=!1;const renderNextRows=async()=>{if(!nextRows.length)return;if(isRendering)return;isRendering=!0;const nextRowsToRender=nextRows.slice();nextRows=[],await(async(rowContainer,currentRows,nextRows)=>{const toAdd=nextRows.filter((nextRow=>!currentRows.some((currentRow=>doRowsMatch(currentRow,nextRow)))));let toKeep=currentRows.filter((currentRow=>nextRows.some((nextRow=>doRowsMatch(currentRow,nextRow)))));const toRemoveElements=currentRows.filter((currentRow=>!nextRows.some((nextRow=>doRowsMatch(currentRow,nextRow))))).map((rowData=>rowContainer.querySelectorAll('[data-row="'.concat(rowData.index,'"]'))));(await Promise.all(toAdd.map((rowData=>createRowElement(rowData))))).forEach(((row,index)=>{const rowData=toAdd[index];let nextRowIndex=null;for(let i=0;irowData.index){nextRowIndex=i;break}if(null!==nextRowIndex){const nextRowData=toKeep[nextRowIndex],nextRowNode=rowContainer.querySelector('[data-row="'.concat(nextRowData.index,'"]'));rowContainer.insertBefore(row,nextRowNode),toKeep.splice(nextRowIndex,0,toKeep)}else toKeep.push(rowData),rowContainer.appendChild(row)})),toRemoveElements.forEach((rows=>{for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:10;nextRows=getRowsToRender(scrollPosition,rowLimit,rowData),renderNextRows(),rowCount!==rowData.length&&(rowContainer.style.height="".concat(40*rowData.length,"px")),rowCount=rowData.length}},clearSearch=(emojiContainer,searchResultsContainer,searchInput)=>{searchResultsContainer.classList.add("hidden"),emojiContainer.classList.remove("hidden"),searchInput.value=""},getHandleMouseEnter=(emojiPreview,emojiShortName)=>e=>{const target=e.target;isEmojiElement(target)&&(emojiShortName.textContent=target.getAttribute("data-short-names"),emojiPreview.textContent=target.textContent)},getHandleMouseLeave=(emojiPreview,emojiShortName)=>e=>{const target=e.target;isEmojiElement(target)&&(emojiShortName.textContent="",emojiPreview.textContent="")},getHandleScroll=(root,currentVisibleRowScrollPosition,emojiContainer,initialCategoryScrollPositions,renderAtPosition)=>{let[currentCategoryElement,previousCategoryPosition,nextCategoryPosition]=getCategoryByScrollPosition(root,emojiContainer.scrollTop,initialCategoryScrollPositions);return(categoryScrollPositions,rowData)=>{const newScrollPosition=emojiContainer.scrollTop,updateRenderRows=newScrollPositioncurrentVisibleRowScrollPosition+40;(newScrollPosition>=nextCategoryPosition||newScrollPosition{const allCategorySelectors=root.querySelectorAll(SELECTORS_CATEGORY_SELECTOR);for(let i=0;i{renderAtPosition(newScrollPosition,rowData),currentVisibleRowScrollPosition=newScrollPosition}))}},registerEventListeners=(root,emojiContainer,renderAtPosition,currentVisibleRowScrollPosition,selectCallback,categoryScrollPositions,rowData,recentEmojiRowCount)=>{const searchInput=root.querySelector(SELECTORS_SEARCH_INPUT),searchResultsContainer=root.querySelector(SELECTORS_SEARCH_RESULTS_CONTAINER),emojiPreview=root.querySelector(SELECTORS_EMOJI_PREVIEW),emojiShortName=root.querySelector(SELECTORS_EMOJI_SHORT_NAME),clickHandler=((recentEmojiRowCount,emojiContainer,searchResultsContainer,searchInput,selectCallback,renderAtPosition)=>(e,rowData,categoryScrollPositions)=>{const target=e.target;let newRowData=rowData,newCategoryScrollPositions=categoryScrollPositions;if(clearSearch(emojiContainer,searchResultsContainer,searchInput),isEmojiElement(target)){const emojiData={unified:target.getAttribute("data-unified"),shortnames:target.getAttribute("data-short-names").replace(/:/g,"").split(" ")},currentScrollTop=emojiContainer.scrollTop,isRecentEmojiRowVisible=null!==emojiContainer.querySelector('[data-row="'.concat(recentEmojiRowCount-1,'"]'));return[newRowData,recentEmojiRowCount]=addRecentEmoji(rowData,recentEmojiRowCount,emojiData),newCategoryScrollPositions=getCategoryScrollPositionsFromRowData(newRowData),isRecentEmojiRowVisible&&renderAtPosition(currentScrollTop,newRowData),selectCallback(target.textContent),[newRowData,newCategoryScrollPositions]}const categorySelector=findCategorySelectorFromElement(target);if(categorySelector){const position=categoryScrollPositions[categorySelector.getAttribute("data-category")];emojiContainer.scrollTop=position}return[newRowData,newCategoryScrollPositions]})(recentEmojiRowCount,emojiContainer,searchResultsContainer,searchInput,selectCallback,renderAtPosition),scrollHandler=getHandleScroll(root,currentVisibleRowScrollPosition,emojiContainer,categoryScrollPositions,renderAtPosition),searchHandler=((searchInput,searchResultsContainer,emojiContainer)=>{const rowContainer=searchResultsContainer.querySelector(SELECTORS_ROW_CONTAINER),renderSearchResultsAtPosition=generateRenderRowsAtPositionFunction(rowContainer);return searchResultsContainer.appendChild(rowContainer),async()=>{const searchTerm=searchInput.value.toLowerCase();if(searchTerm){((emojiContainer,searchResultsContainer)=>{searchResultsContainer.classList.remove("hidden"),emojiContainer.classList.add("hidden")})(emojiContainer,searchResultsContainer);const matchingEmojis=Object.keys(EmojiData.byShortName).reduce(((carry,shortName)=>(shortName.includes(searchTerm)&&carry.push({shortnames:[shortName],unified:EmojiData.byShortName[shortName]}),carry)),[]),searchResultsString=await(0,_str.getString)("searchresults","core"),rowData=createRowDataForCategory(searchResultsString,searchResultsString,matchingEmojis,0);renderSearchResultsAtPosition(0,rowData,rowData.length)}else clearSearch(emojiContainer,searchResultsContainer,searchInput)}})(searchInput,searchResultsContainer,emojiContainer);root.addEventListener("focus",getHandleMouseEnter(emojiPreview,emojiShortName),!0),root.addEventListener("blur",getHandleMouseLeave(emojiPreview,emojiShortName),!0),root.addEventListener("mouseenter",getHandleMouseEnter(emojiPreview,emojiShortName),!0),root.addEventListener("mouseleave",getHandleMouseLeave(emojiPreview,emojiShortName),!0),root.addEventListener("click",(e=>{[rowData,categoryScrollPositions]=clickHandler(e,rowData,categoryScrollPositions)})),emojiContainer.addEventListener("scroll",(0,_utils.throttle)((()=>scrollHandler(categoryScrollPositions,rowData)),50)),searchInput.addEventListener("input",(0,_utils.debounce)(searchHandler,200))};return _exports.default=(root,selectCallback)=>{const emojiContainer=root.querySelector(SELECTORS_EMOJIS_CONTAINER),rowContainer=emojiContainer.querySelector(SELECTORS_ROW_CONTAINER),allData=[{name:"Recent",emojis:getRecentEmojis()},...EmojiData.byCategory];let rowData=[],recentEmojiRowCount=0;allData.forEach((category=>{const categoryDisplayName=getCategorySelectorByCategoryName(root,category.name).title,categoryRowData=createRowDataForCategory(category.name,categoryDisplayName,category.emojis,rowData.length);"Recent"===category.name&&(recentEmojiRowCount=categoryRowData.length),rowData=rowData.concat(categoryRowData)})),rowData=addIndexesToRowData(rowData);const categoryScrollPositions=getCategoryScrollPositionsFromRowData(rowData),renderAtPosition=generateRenderRowsAtPositionFunction(rowContainer);renderAtPosition(0,rowData),registerEventListeners(root,emojiContainer,renderAtPosition,0,selectCallback,categoryScrollPositions,rowData,recentEmojiRowCount)},_exports.default})); define("core/event",["exports","core_editor/events","core_filters/events","core_form/events"],(function(_exports,_events,_events2,_events3){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0; /** * Global registry of core events that can be triggered/listened for. * * @module core/event * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.0 */ const getRenamedLegacyFunction=(oldFunctionName,newModule,newFunctionName,newFunctionRef)=>function(){return window.console.warn("The core/event::".concat(oldFunctionName,"() function has been moved to ").concat(newModule,"::").concat(newFunctionName,". ")+"Please update your code to use the new module."),newFunctionRef(...arguments)};var _default={Events:{FORM_FIELD_VALIDATION:"core_form-field-validation"},notifyEditorContentRestored:getRenamedLegacyFunction("notifyEditorContentRestored","core_editor/events","notifyEditorContentRestored",_events.notifyEditorContentRestored),notifyFilterContentUpdated:getRenamedLegacyFunction("notifyFilterContentUpdated","core_filters/events","notifyFilterContentUpdated",_events2.notifyFilterContentUpdated),notifyFormSubmitAjax:getRenamedLegacyFunction("notifyFormSubmitAjax","core_form/events","notifyFormSubmittedByJavascript",_events3.notifyFormSubmittedByJavascript)};return _exports.default=_default,_exports.default})); define("core/event_dispatcher",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.dispatchEvent=void 0;_exports.dispatchEvent=function(eventName){let detail=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},container=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,{bubbles:bubbles=!0,cancelable:cancelable=!1,composed:composed=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const customEvent=new CustomEvent(eventName,{bubbles:bubbles,cancelable:cancelable,composed:composed,detail:detail});return container.dispatchEvent(customEvent),customEvent}})); define("core/fetch",["exports","core/config","./pending"],(function(_exports,Cfg,_pending){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _classStaticPrivateMethodGet(receiver,classConstructor,method){return function(receiver,classConstructor){if(receiver!==classConstructor)throw new TypeError("Private static access of wrong provenance")}(receiver,classConstructor),method}function _classPrivateFieldInitSpec(obj,privateMap,value){!function(obj,privateCollection){if(privateCollection.has(obj))throw new TypeError("Cannot initialize the same private elements twice on an object")}(obj,privateMap),privateMap.set(obj,value)}function _classPrivateFieldGet(receiver,privateMap){return function(receiver,descriptor){if(descriptor.get)return descriptor.get.call(receiver);return descriptor.value}(receiver,_classExtractFieldDescriptor(receiver,privateMap,"get"))}function _classPrivateFieldSet(receiver,privateMap,value){return function(receiver,descriptor,value){if(descriptor.set)descriptor.set.call(receiver,value);else{if(!descriptor.writable)throw new TypeError("attempted to set read only private field");descriptor.value=value}}(receiver,_classExtractFieldDescriptor(receiver,privateMap,"set"),value),value}function _classExtractFieldDescriptor(receiver,privateMap,action){if(!privateMap.has(receiver))throw new TypeError("attempted to "+action+" private field on non-instance");return privateMap.get(receiver)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Cfg=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(Cfg),_pending=(obj=_pending)&&obj.__esModule?obj:{default:obj};var _request=new WeakMap,_promise=new WeakMap,_resolve=new WeakMap,_reject=new WeakMap;class RequestWrapper{constructor(request){_classPrivateFieldInitSpec(this,_request,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_promise,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_resolve,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_reject,{writable:!0,value:null}),_classPrivateFieldSet(this,_request,request),_classPrivateFieldSet(this,_promise,new Promise(((resolve,reject)=>{_classPrivateFieldSet(this,_resolve,resolve),_classPrivateFieldSet(this,_reject,reject)})))}get request(){return _classPrivateFieldGet(this,_request)}get promise(){return _classPrivateFieldGet(this,_promise)}handleResponse(response){response.ok?_classPrivateFieldGet(this,_resolve).call(this,response):_classPrivateFieldGet(this,_reject).call(this,response.statusText)}}class Fetch{static async request(component,action){let{params:params={},body:body=null,method:method="GET"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const pending=new _pending.default("Requesting ".concat(component,"/").concat(action," with ").concat(method)),requestWrapper=_classStaticPrivateMethodGet(Fetch,Fetch,_getRequest).call(Fetch,_classStaticPrivateMethodGet(Fetch,Fetch,_normaliseComponent).call(Fetch,component),action,{params:params,method:method,body:body}),result=await fetch(requestWrapper.request);return pending.resolve(),requestWrapper.handleResponse(result),requestWrapper.promise}static performGet(component,action){let{params:params={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(component,action,{params:params,method:"GET"})}static performHead(component,action){let{params:params={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(component,action,{params:params,method:"HEAD"})}static performPost(component,action){let{body:body}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(component,action,{body:body,method:"POST"})}static performPut(component,action){let{body:body}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(component,action,{body:body,method:"PUT"})}static performPatch(component,action){let{body:body}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(component,action,{body:body,method:"PATCH"})}static performDelete(component,action){let{params:params={},body:body=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(component,action,{body:body,params:params,method:"DELETE"})}}function _normaliseComponent(component){return component.replace(/^core_/,"")}function _getRequest(component,endpoint,_ref){let{params:params={},body:body=null,method:method="GET"}=_ref;const url=new URL("".concat(Cfg.apibase,"/rest/v2/").concat(component,"/").concat(endpoint)),options={method:method,headers:{Accept:"application/json","Content-Type":"application/json"}};return Object.entries(params).forEach((_ref2=>{let[key,value]=_ref2;url.searchParams.append(key,value)})),body&&(body instanceof FormData?options.body=body:options.body=body instanceof Object?JSON.stringify(body):body),new RequestWrapper(new Request(url,options))}return _exports.default=Fetch,_exports.default})); define("core/first",["jquery"],(function(_jquery){var obj; /** * This is an empty module, that is required before all other modules. * Because every module is returned from a request for any other module, this * forces the loading of all modules with a single request. * * This function also sets up the listeners for ajax requests so we can tell * if any requests are still in progress. * * @module core/first * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 2.9 */(0,(_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj}).default)(document).bind("ajaxStart",(function(){M.util.js_pending("jq")})).bind("ajaxStop",(function(){M.util.js_complete("jq")})),window.jQuery=_jquery.default})); /** * Autocomplete wrapper for select2 library. * * @module core/form-autocomplete * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.0 */ define("core/form-autocomplete",["jquery","core/log","core/str","core/templates","core/notification","core/loadingicon","core/aria","core_form/changechecker","core/popper2","theme_boost/bootstrap/dom/event-handler"],(function($,log,str,templates,notification,LoadingIcon,Aria,FormChangeChecker,Popper,EventHandler){var KEYS_DOWN=40,KEYS_ENTER=13,KEYS_SPACE=32,KEYS_ESCAPE=27,KEYS_COMMA=44,KEYS_UP=38,KEYS_LEFT=37,KEYS_RIGHT=39,uniqueId=Date.now(),activateSelection=function(index,state){var selectionElement=$(document.getElementById(state.selectionId));index=wrapListIndex(index,selectionElement.children("[aria-selected=true]").length);var element=$(selectionElement.children("[aria-selected=true]").get(index)),itemId=state.selectionId+"-"+index;return selectionElement.children().attr("data-active-selection",null).attr("id",""),element.attr("data-active-selection",!0).attr("id",itemId),selectionElement.attr("aria-activedescendant",itemId),selectionElement.attr("data-active-value",element.attr("data-value")),$.Deferred().resolve()},updateActiveSelectionFromState=function(state){var activeElement=function(state){var _selectionRegion$attr,selectionRegion=$(document.getElementById(state.selectionId)),activeId=selectionRegion.attr("aria-activedescendant");if(activeId){var activeElement=$(document.getElementById(activeId));if(activeElement.length)return activeElement}var activeValue=null===(_selectionRegion$attr=selectionRegion.attr("data-active-value"))||void 0===_selectionRegion$attr?void 0:_selectionRegion$attr.replace(/"/g,'\\"');return selectionRegion.find('[data-value="'+activeValue+'"]')}(state),activeValue=activeElement.attr("data-value"),selectionRegion=$(document.getElementById(state.selectionId));if(activeValue){var activeIndex=selectionRegion.find("[aria-selected=true]").index(activeElement);if(-1!==activeIndex)return void activateSelection(activeIndex,state)}activateSelection(0,state)},updateSelectionList=function(options,state,originalSelect){var pendingKey="form-autocomplete-updateSelectionList-"+state.inputId;M.util.js_pending(pendingKey);var items=rebuildOptions(originalSelect.children("option:selected"),!1),newSelection=$(document.getElementById(state.selectionId));if(!hasItemListChanged(state,items))return M.util.js_complete(pendingKey),Promise.resolve();state.items=items;var context=$.extend(options,state);return templates.render(options.templates.items,context).then((function(html,js){templates.replaceNodeContents(newSelection,html,js),updateActiveSelectionFromState(state)})).then((function(){return M.util.js_complete(pendingKey)})).catch(notification.exception)},hasItemListChanged=function(state,items){return state.items.length!==items.length||state.items.filter((item=>-1===items.indexOf(item))).length>0},notifyChange=function(originalSelect){FormChangeChecker.markFormChangedFromNode(originalSelect[0]),originalSelect[0].dispatchEvent(new Event("change",{bubbles:!0}))};const deselectItem=async(options,state,item,originalSelect)=>{var _item$0$childNodes$2$,selectedItemValue=$(item).attr("data-value");void 0!==originalSelect.find("option").first().attr("value")&&originalSelect.prepend($(" * * import CollapsableSection from 'core/local/collapsable_section/controls'; * * const section = CollapsableSection.instanceFromSelector('#MyCollapsableSection'); * * // Use hide, show and toggle methods to control the section. * section.hide(); */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_collapse=(obj=_collapse)&&obj.__esModule?obj:{default:obj};let initialized=!1;return _exports.default=class{static instanceFromSelector(selector){const elements=document.querySelector(selector);if(!elements)throw new Error("No elements found with the selector: "+selector);return new this(elements)}static init(){initialized||(initialized=!0,document.addEventListener(_events.eventTypes.hiddenBsCollapse,(event=>{this.isCollapsableComponent(event.target)&&(0,_events.notifyCollapsableSectionHidden)(event.target)})),document.addEventListener(_events.eventTypes.shownBsCollapse,(event=>{this.isCollapsableComponent(event.target)&&(0,_events.notifyCollapsableSectionShown)(event.target)})))}static isCollapsableComponent(element){return element.hasAttribute("data-mdl-component")&&"core/local/collapsable_section"===element.getAttribute("data-mdl-component")}constructor(element){this.element=element}hide(){_collapse.default.getOrCreateInstance(this.element).hide()}show(){_collapse.default.getOrCreateInstance(this.element).show()}toggle(){_collapse.default.getOrCreateInstance(this.element).toggle()}isVisible(){return _collapse.default.getOrCreateInstance(this.element)._isShown()}},_exports.default})); define("core/local/collapsable_section/events",["exports","core/event_dispatcher"],(function(_exports,_event_dispatcher){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.notifyCollapsableSectionShown=_exports.notifyCollapsableSectionHidden=_exports.eventTypes=void 0; /** * The collapsable section events. * * This module wraps the standard bootstrap collapsable events, but for collapsable sections. * * @module core/local/collapsable_section/events * @copyright 2024 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * * @example * import {eventTypes as collapsableSectionEventTypes} from 'core/local/collapsable_section/events'; * * document.addEventListener(collapsableSectionEventTypes.shown, event => { * window.console.log(event.target); // The HTMLElement relating to the block whose content was updated. * }); */ const eventTypes={shown:"core_collapsable_section_shown",hidden:"core_collapsable_section_hidden",hideBsCollapse:"hide.bs.collapse",hiddenBsCollapse:"hidden.bs.collapse",showBsCollapse:"show.bs.collapse",shownBsCollapse:"shown.bs.collapse"};_exports.eventTypes=eventTypes;_exports.notifyCollapsableSectionShown=element=>(0,_event_dispatcher.dispatchEvent)(eventTypes.shown,{},element);_exports.notifyCollapsableSectionHidden=element=>(0,_event_dispatcher.dispatchEvent)(eventTypes.hidden,{},element)})); define("core/local/dropdown/dialog",["exports","theme_boost/bootstrap/dropdown","core/pagehelpers","core/pending","theme_boost/bootstrap/dom/event-handler"],(function(_exports,_dropdown,_pagehelpers,_pending,_eventHandler){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Dropdown status JS controls. * * @module core/local/dropdown/dialog * @copyright 2023 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=_exports.getDropdownDialog=_exports.DropdownDialog=void 0,_dropdown=_interopRequireDefault(_dropdown),_pending=_interopRequireDefault(_pending),_eventHandler=_interopRequireDefault(_eventHandler);const Selectors_dropdownButton='[data-for="dropdowndialog_button"]',Selectors_dropdownDialog='[data-for="dropdowndialog_dialog"]';class DropdownDialog{constructor(element){this.element=element,this.button=element.querySelector(Selectors_dropdownButton),this.panel=element.querySelector(Selectors_dropdownDialog)}init(){if(this.element.dataset.dropdownDialogInitialized)return;const dialogButtonSelector="#".concat(this.element.id," ").concat(Selectors_dropdownButton);_eventHandler.default.on(document,"keydown",dialogButtonSelector,this._buttonKeyHandler.bind(this));const dialogSelector="#".concat(this.element.id," ").concat(Selectors_dropdownDialog);_eventHandler.default.on(document,"keydown",dialogSelector,this._contentKeyHandler.bind(this)),this.element.dataset.dropdownDialogInitialized=!0}_buttonKeyHandler(event){if("ArrowUp"===event.key||"ArrowLeft"===event.key)return event.stopPropagation(),event.preventDefault(),void this.setVisible(!1);"ArrowDown"!==event.key&&"ArrowRight"!==event.key||(event.stopPropagation(),event.preventDefault(),this.setVisible(!0),this._focusPanelContent())}_contentKeyHandler(event){let newFocus=null;"End"===event.key&&(newFocus=(0,_pagehelpers.lastFocusableElement)(this.panel)),"Home"===event.key&&(newFocus=(0,_pagehelpers.firstFocusableElement)(this.panel)),"ArrowUp"!==event.key&&"ArrowLeft"!==event.key||(newFocus=(0,_pagehelpers.previousFocusableElement)(this.panel,!1),newFocus||(newFocus=this.button)),"ArrowDown"!==event.key&&"ArrowRight"!==event.key||(newFocus=(0,_pagehelpers.nextFocusableElement)(this.panel,!1)),null!==newFocus&&(event.stopPropagation(),event.preventDefault(),newFocus.focus())}_focusPanelContent(){const pendingPromise=new _pending.default("core/dropdown/dialog:focuscontent");setTimeout((()=>{const firstFocusable=(0,_pagehelpers.firstFocusableElement)(this.panel);firstFocusable&&firstFocusable.focus(),pendingPromise.resolve()}),100)}setVisible(visible){visible!==this.isVisible()&&_dropdown.default.getOrCreateInstance(this.button).toggle()}isVisible(){return"true"===this.button.getAttribute("aria-expanded")}setButtonContent(content){this.button.innerHTML=content}setButtonDisabled(disabled){disabled?this.button.setAttribute("disabled","disabled"):this.button.removeAttribute("disabled")}getElement(){return this.element}}_exports.DropdownDialog=DropdownDialog;const getDropdownDialog=selector=>{const dropdownElement=document.querySelector(selector);return dropdownElement?new DropdownDialog(dropdownElement):null};_exports.getDropdownDialog=getDropdownDialog;_exports.init=selector=>{const dropdown=getDropdownDialog(selector);if(!dropdown)throw new Error("Dopdown dialog element not found: ".concat(selector));dropdown.init()}})); define("core/local/dropdown/status",["exports","core/local/dropdown/dialog"],(function(_exports,_dialog){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=_exports.getDropdownStatus=_exports.DropdownStatus=void 0; /** * Dropdown status JS controls. * * The status controls enable extra configurarions for the dropdown like: * - Sync the button text with the selected option. * - Update the status of the button when the selected option changes. This will * trigger a "change" event when the status changes. * * @module core/local/dropdown/status * @copyright 2023 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const Selectors_checkedIcon='[data-for="checkedIcon"]',Selectors_option='[role="option"]',Selectors_optionItem="[data-optionnumber]",Selectors_optionIcon=".option-icon",Selectors_selectedOption='[role="option"][aria-selected="true"]',Selectors_uncheckedIcon='[data-for="uncheckedIcon"]',Classes_selected="selected",Classes_disabled="disabled",Classes_hidden="d-none";class DropdownStatus extends _dialog.DropdownDialog{constructor(element){super(element),this.buttonSync="true"==element.dataset.buttonSync,this.updateStatus="true"==element.dataset.updateStatus}init(){super.init(),this.element.dataset.dropdownStatusInitialized||(this.panel.addEventListener("click",this._contentClickHandler.bind(this)),"true"==this.element.dataset.buttonSync&&this.setButtonSyncEnabled(!0),"true"==this.element.dataset.updateStatus&&this.setUpdateStatusEnabled(!0),this.element.dataset.dropdownStatusInitialized=!0)}_contentClickHandler(event){const option=event.target.closest(Selectors_option);option&&"true"!==option.getAttribute("aria-disabled")&&"true"!==option.getAttribute("aria-selected")&&this.isUpdateStatusEnabled()&&(this.setSelectedValue(option.dataset.value),this.button.focus())}setSelectedValue(value){const selected=this.panel.querySelector(Selectors_selectedOption);if(selected&&selected.dataset.value===value)return;selected&&this._updateOptionChecked(selected,!1);const option=this.panel.querySelector("".concat(Selectors_option,'[data-value="').concat(value,'"]'));option&&this._updateOptionChecked(option,!0),this.isButtonSyncEnabled()&&this.syncButtonText(),this.element.dispatchEvent(new Event("change"))}_updateOptionChecked(option,checked){option.setAttribute("aria-selected",checked.toString()),option.classList.toggle(Classes_selected,checked),option.classList.toggle(Classes_disabled,checked);const optionItem=option.closest(Selectors_optionItem);optionItem&&this._updateOptionItemChecked(optionItem,checked),checked?this.element.dataset.value=option.dataset.value:this.element.dataset.value===option.dataset.value&&delete this.element.dataset.value}_updateOptionItemChecked(optionItem,checked){var _optionItem$dataset$s;const selectedClasses=null!==(_optionItem$dataset$s=optionItem.dataset.selectedClasses)&&void 0!==_optionItem$dataset$s?_optionItem$dataset$s:Classes_selected;for(const selectedClass of selectedClasses.split(" "))optionItem.classList.toggle(selectedClass,checked);checked?optionItem.dataset.selected=checked:null==optionItem||delete optionItem.dataset.selected;const checkedIcon=optionItem.querySelector(Selectors_checkedIcon);checkedIcon&&checkedIcon.classList.toggle(Classes_hidden,!checked);const uncheckedIcon=optionItem.querySelector(Selectors_uncheckedIcon);uncheckedIcon&&uncheckedIcon.classList.toggle(Classes_hidden,checked)}getSelectedValue(){var _selected$dataset$val;const selected=this.panel.querySelector(Selectors_selectedOption);return null!==(_selected$dataset$val=null==selected?void 0:selected.dataset.value)&&void 0!==_selected$dataset$val?_selected$dataset$val:null}setButtonSyncEnabled(value){value?this.element.dataset.buttonSync="true":delete this.element.dataset.buttonSync,value&&this.syncButtonText()}isButtonSyncEnabled(){return"true"==this.element.dataset.buttonSync}syncButtonText(){const selected=this.panel.querySelector(Selectors_selectedOption);if(!selected)return;let newText=selected.textContent;const optionIcon=this._getOptionIcon(selected);optionIcon&&(newText=optionIcon.innerHTML+newText),this.button.innerHTML=newText}setUpdateStatusEnabled(value){value?this.element.dataset.updateStatus="true":delete this.element.dataset.updateStatus}isUpdateStatusEnabled(){return"true"==this.element.dataset.updateStatus}_getOptionIcon(option){const optionItem=option.closest(Selectors_optionItem);return optionItem?optionItem.querySelector(Selectors_optionIcon):null}}_exports.DropdownStatus=DropdownStatus;const getDropdownStatus=selector=>{const dropdownElement=document.querySelector(selector);return dropdownElement?new DropdownStatus(dropdownElement):null};_exports.getDropdownStatus=getDropdownStatus;_exports.init=selector=>{const dropdown=getDropdownStatus(selector);if(!dropdown)throw new Error("Dopdown status element not found: ".concat(selector));dropdown.init()}})); define("core/local/inplace_editable/events",["exports","core/event_dispatcher"],(function(_exports,_event_dispatcher){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.notifyElementUpdated=_exports.notifyElementUpdateFailed=_exports.eventTypes=void 0; /** * Inplace editable module events * * @module core/local/inplace_editable/events * @copyright 2021 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const eventTypes={elementUpdated:"core/inplace_editable:updated",elementUpdateFailed:"core/inplace_editable:updateFailed"};_exports.eventTypes=eventTypes;_exports.notifyElementUpdated=(element,ajaxreturn,oldvalue)=>(0,_event_dispatcher.dispatchEvent)(eventTypes.elementUpdated,{ajaxreturn:ajaxreturn,oldvalue:oldvalue},element);_exports.notifyElementUpdateFailed=(element,exception,newvalue)=>(0,_event_dispatcher.dispatchEvent)(eventTypes.elementUpdateFailed,{exception:exception,newvalue:newvalue},element,{cancelable:!0})})); define("core/local/modal/alert",["exports","core/modal"],(function(_exports,_modal){var obj;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=(obj=_modal)&&obj.__esModule?obj:{default:obj};class ModalAlert extends _modal.default{registerEventListeners(){super.registerEventListeners(),this.registerCloseOnCancel()}}return _exports.default=ModalAlert,_defineProperty(ModalAlert,"TYPE","ALERT"),_defineProperty(ModalAlert,"TEMPLATE","core/local/modal/alert"),ModalAlert.registerModalType(),_exports.default})); define("core/local/process_monitor/events",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.dispatchStateChangedEvent=function(detail,target){void 0===target&&(target=document);target.dispatchEvent(new CustomEvent(eventTypes.processMonitorStateChange,{bubbles:!0,detail:detail}))},_exports.eventTypes=void 0; /** * Javascript events for the `process_monitor` module. * * @module core/local/process_monitor/events * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.2 */ const eventTypes={processMonitorStateChange:"core_editor/contentRestored"};_exports.eventTypes=eventTypes})); define("core/local/process_monitor/loadingprocess",["exports","core/log"],(function(_exports,_log){var obj;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.LoadingProcess=void 0,_log=(obj=_log)&&obj.__esModule?obj:{default:obj};_exports.LoadingProcess=class{constructor(manager,definition){_defineProperty(this,"processData",null),_defineProperty(this,"extraData",null),_defineProperty(this,"manager",null),_defineProperty(this,"finishedCallback",null),_defineProperty(this,"removedCallback",null),_defineProperty(this,"errorCallback",null),this.manager=manager,this.processData={id:manager.generateProcessId(),name:"",percentage:0,url:null,error:null,finished:!1,...definition},this._dispatch("addProcess",this.processData)}_dispatch(action,params){this.manager.getInitialStatePromise().then((()=>{this.manager.dispatch(action,params)})).catch((()=>{_log.default.error("Cannot update process monitor.")}))}onFinish(callback){this.finishedCallback=callback}onRemove(callback){this.removedCallback=callback}onError(callback){this.errorCallback=callback}setPercentage(percentage){this.processData.percentage=percentage,this._dispatch("updateProcess",this.processData)}setExtraData(extraData){this.extraData=extraData}setError(error){this.processData.error=error,null!==this.errorCallback&&this.errorCallback(this),this.processData.finished=!0,null!==this.finishedCallback&&this.finishedCallback(this),this._dispatch("updateProcess",this.processData)}setName(name){this.processData.name=name,this._dispatch("updateProcess",this.processData)}finish(){this.processData.finished=!0,null!==this.finishedCallback&&this.finishedCallback(this),this._dispatch("updateProcess",this.processData)}remove(){null!==this.removedCallback&&this.removedCallback(this),this._dispatch("removeProcess",this.processData.id)}getData(){return{...this.processData}}get name(){return this.processData.name}get id(){return this.processData.id}get data(){return this.extraData}}})); define("core/local/process_monitor/manager",["exports","core/reactive","core/local/process_monitor/events"],(function(_exports,_reactive,_events){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.manager=void 0; /** * The reactive file uploader class. * * As all the upload queues are reactive, any plugin can implement its own upload monitor. * * @module core/local/process_monitor/manager * @class ProcessMonitorManager * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class ProcessMonitorManager extends _reactive.Reactive{constructor(){var obj,key,value;super(...arguments),value=1,(key="nextId")in(obj=this)?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}generateProcessId(){return this.nextId++}}const mutations={addProcess:function(stateManager,processData){const state=stateManager.state;stateManager.setReadOnly(!1),state.queue.add({...processData}),state.display.show=!0,stateManager.setReadOnly(!0)},removeProcess:function(stateManager,processId){const state=stateManager.state;stateManager.setReadOnly(!1),state.queue.delete(processId),0===state.queue.size&&(state.display.show=!1),stateManager.setReadOnly(!0)},updateProcess:function(stateManager,processData){if(void 0===processData.id)throw Error("Missing process ID in process data");const state=stateManager.state;stateManager.setReadOnly(!1);const queueItem=state.queue.get(processData.id);if(!queueItem)throw Error("Unkown process with id ".concat(processData.id));for(const[prop,propValue]of Object.entries(processData))queueItem[prop]=propValue;stateManager.setReadOnly(!0)},setShow:function(stateManager,show){const state=stateManager.state;stateManager.setReadOnly(!1),state.display.show=show,show||this.cleanFinishedProcesses(stateManager),stateManager.setReadOnly(!0)},removeAllProcesses:function(stateManager){const state=stateManager.state;stateManager.setReadOnly(!1),state.queue.forEach((element=>{state.queue.delete(element.id)})),state.display.show=!1,stateManager.setReadOnly(!0)},cleanFinishedProcesses:function(stateManager){const state=stateManager.state;stateManager.setReadOnly(!1),state.queue.forEach((element=>{element.finished&&!element.error&&state.queue.delete(element.id)})),0===state.queue.size&&(state.display.show=!1),stateManager.setReadOnly(!0)}},manager=new ProcessMonitorManager({name:"ProcessMonitor",eventName:_events.eventTypes.processMonitorStateChange,eventDispatch:_events.dispatchStateChangedEvent,mutations:mutations,state:{display:{show:!1},queue:[]}});_exports.manager=manager})); define("core/local/process_monitor/monitor",["exports","core/templates","core/reactive","core/local/process_monitor/manager"],(function(_exports,_templates,_reactive,_manager){var obj; /** * The file upload monitor component. * * @module core/local/process_monitor/monitor * @class core/local/process_monitor/monitor * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_templates=(obj=_templates)&&obj.__esModule?obj:{default:obj};class _default extends _reactive.BaseComponent{create(){this.name="process_monitor",this.selectors={QUEUELIST:'[data-for="process-list"]',CLOSE:'[data-action="hide"]'},this.classes={SHOW:"show"}}static init(query,selectors){return new this({element:document.querySelector(query),reactive:_manager.manager,selectors:selectors})}stateReady(state){this._updateMonitor({state:state,element:state.display}),this.addEventListener(this.getElement(this.selectors.CLOSE),"click",this._closeMonitor),state.queue.forEach((element=>{this._createListItem({state:state,element:element})}))}getWatchers(){return[{watch:"queue:created",handler:this._createListItem},{watch:"display:updated",handler:this._updateMonitor}]}async _createListItem(_ref){let{element:element}=_ref;const{html:html,js:js}=await _templates.default.renderForPromise("core/local/process_monitor/process",{...element}),target=this.getElement(this.selectors.QUEUELIST);_templates.default.appendNodeContents(target,html,js)}_updateMonitor(_ref2){let{element:element}=_ref2;this.element.classList.toggle(this.classes.SHOW,!0===element.show)}_closeMonitor(){this.reactive.dispatch("setShow",!1)}}return _exports.default=_default,_exports.default})); define("core/local/process_monitor/process",["exports","core/reactive","core/local/process_monitor/manager"],(function(_exports,_reactive,_manager){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0; /** * The process motnitor's process reactive component. * * @module core/local/process_monitor/process * @class core/local/process_monitor/process * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class _default extends _reactive.BaseComponent{create(){this.name="process_monitor_process",this.selectors={CLOSE:'[data-action="closeProcess"]',ERROR:'[data-for="error"]',PROGRESSBAR:"progress",NAME:'[data-for="name"]'},this.classes={HIDE:"d-none"},this.id=this.element.dataset.id}static init(query,selectors){return new this({element:document.querySelector(query),reactive:_manager.manager,selectors:selectors})}stateReady(state){this._refreshItem({state:state,element:state.queue.get(this.id)}),this.addEventListener(this.getElement(this.selectors.CLOSE),"click",this._removeProcess)}getWatchers(){return[{watch:"queue[".concat(this.id,"]:updated"),handler:this._refreshItem},{watch:"queue[".concat(this.id,"]:deleted"),handler:this.remove}]}async _refreshItem(_ref){let{element:element}=_ref;this.getElement(this.selectors.NAME).innerHTML=element.name;const progressbar=this.getElement(this.selectors.PROGRESSBAR);progressbar.classList.toggle(this.classes.HIDE,element.finished),progressbar.value=element.percentage;this.getElement(this.selectors.CLOSE).classList.toggle(this.classes.HIDE,!element.error);const error=this.getElement(this.selectors.ERROR);error.innerHTML=element.error,error.classList.toggle(this.classes.HIDE,!element.error)}_removeProcess(){this.reactive.dispatch("removeProcess",this.id)}}return _exports.default=_default,_exports.default})); define("core/local/process_monitor/processqueue",["exports","core/utils","core/local/process_monitor/loadingprocess","core/log"],(function(_exports,_utils,_loadingprocess,_log){var obj;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.ProcessQueue=void 0,_log=(obj=_log)&&obj.__esModule?obj:{default:obj};_exports.ProcessQueue= /** * A process queue manager. * * Adding process to the queue will guarante process are executed in sequence. * * @module core/local/process_monitor/processqueue * @class ProcessQueue * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class{constructor(manager){_defineProperty(this,"pending",[]),_defineProperty(this,"currentProcess",null),this.manager=manager,this.cleanFinishedProcesses=(0,_utils.debounce)((()=>manager.dispatch("cleanFinishedProcesses")),3e3)}addPending(processName,processor){const process=new _loadingprocess.LoadingProcess(this.manager,{name:processName});process.setExtraData({processor:processor}),process.onFinish((uploadedFile=>{var _this$currentProcess;(null===(_this$currentProcess=this.currentProcess)||void 0===_this$currentProcess?void 0:_this$currentProcess.id)===uploadedFile.id&&this._discardCurrent()})),this.pending.push(process),this._continueProcessing()}addError(processName,errorMessage){new _loadingprocess.LoadingProcess(this.manager,{name:processName}).setError(errorMessage)}_discardCurrent(){this.currentProcess&&(this.currentProcess=null),this.cleanFinishedProcesses(),this._continueProcessing()}_currentProcessor(){return this.currentProcess.data.processor}async _continueProcessing(){if(null===this.currentProcess&&0!==this.pending.length){this.currentProcess=this.pending.shift();try{const processor=this._currentProcessor();await processor(this.currentProcess)}catch(error){this.currentProcess.setError(error.message),_log.default.error(error)}}}}})); define("core/local/reactive/basecomponent",["exports","core/templates","core/local/reactive/overlay"],(function(_exports,_templates,_overlay){var obj; /** * Reactive UI component base class. * * Each UI reactive component should extend this class to interact with a reactive state. * * @module core/local/reactive/basecomponent * @class core/local/reactive/basecomponent * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_templates=(obj=_templates)&&obj.__esModule?obj:{default:obj};return _exports.default=class{constructor(descriptor){if(void 0===descriptor.element||!(descriptor.element instanceof HTMLElement))throw Error("Reactive components needs a main DOM element to dispatch events");this.element=descriptor.element,this.eventHandlers=new Map([]),this.eventListeners=[],this.selectors={},this.events=this.constructor.getEvents(),this.create(descriptor),void 0!==descriptor.selectors&&this.addSelectors(descriptor.selectors),void 0===descriptor.reactive?this.element.dispatchEvent(new CustomEvent("core/reactive:requestRegistration",{bubbles:!0,detail:{component:this}})):(this.reactive=descriptor.reactive,this.reactive.registerComponent(this),this.addEventListener(this.element,"core/reactive:requestRegistration",(event=>{var _event$detail;null!=event&&null!==(_event$detail=event.detail)&&void 0!==_event$detail&&_event$detail.component&&(event.stopPropagation(),this.registerChildComponent(event.detail.component))})))}static getEvents(){return{}}create(descriptor){}destroy(){}getWatchers(){return[]}stateReady(){}getElement(query,dataId){if(void 0===query&&void 0===dataId)return this.element;const dataSelector=dataId?"[data-id='".concat(dataId,"']"):"",selector="".concat(null!=query?query:"").concat(dataSelector);return this.element.querySelector(selector)}getElements(query,dataId){const dataSelector=dataId?"[data-id='".concat(dataId,"']"):"",selector="".concat(null!=query?query:"").concat(dataSelector);return this.element.querySelectorAll(selector)}addSelectors(newSelectors){for(const[selectorName,selector]of Object.entries(newSelectors))this.selectors[selectorName]=selector}getSelector(selectorName){return this.selectors[selectorName]}dispatchEvent(eventName,detail){this.element.dispatchEvent(new CustomEvent(eventName,{bubbles:!0,detail:detail}))}renderComponent(target,file,data){return new Promise(((resolve,reject)=>{target.addEventListener("ComponentRegistration:Success",(_ref=>{let{detail:detail}=_ref;resolve(detail.component)})),target.addEventListener("ComponentRegistration:Fail",(()=>{reject("Registration of ".concat(file," fails."))})),_templates.default.renderForPromise(file,data).then((_ref2=>{let{html:html,js:js}=_ref2;return _templates.default.replaceNodeContents(target,html,js),!0})).catch((error=>{throw reject("Rendering of ".concat(file," throws an error.")),error}))}))}addEventListener(target,type,listener){let bindListener=this.eventHandlers.get(listener);void 0===bindListener&&(bindListener=listener.bind(this),this.eventHandlers.set(listener,bindListener)),target.addEventListener(type,bindListener),this.eventListeners.push({target:target,type:type,bindListener:bindListener})}removeEventListener(target,type,listener){let bindListener=this.eventHandlers.get(listener);void 0!==bindListener&&target.removeEventListener(type,bindListener)}removeAllEventListeners(){this.eventListeners.forEach((_ref3=>{let{target:target,type:type,bindListener:bindListener}=_ref3;target.removeEventListener(type,bindListener)})),this.eventListeners=[]}remove(){this.unregister(),this.element.remove()}unregister(){this.reactive.unregisterComponent(this),this.removeAllEventListeners(),this.destroy()}dispatchRegistrationSuccess(){void 0!==this.element.parentNode&&this.element.parentNode.dispatchEvent(new CustomEvent("ComponentRegistration:Success",{bubbles:!1,detail:{component:this}}))}dispatchRegistrationFail(){void 0!==this.element.parentNode&&this.element.parentNode.dispatchEvent(new CustomEvent("ComponentRegistration:Fail",{bubbles:!1,detail:{component:this}}))}registerChildComponent(component){component.reactive=this.reactive,this.reactive.registerComponent(component)}set locked(locked){this.setElementLocked(this.element,locked)}get locked(){return this.getElementLocked(this.element)}setElementLocked(target,locked){target.dataset.locked=null!=locked&&locked,locked?(target.style.pointerEvents="none",target.style.userSelect="none",target.hasAttribute("draggable")&&target.setAttribute("draggable",!1),target.setAttribute("aria-busy",!0)):(target.style.pointerEvents=null,target.style.userSelect=null,target.hasAttribute("draggable")&&target.setAttribute("draggable",!0),target.setAttribute("aria-busy",!1))}getElementLocked(target){var _target$dataset$locke;return null!==(_target$dataset$locke=target.dataset.locked)&&void 0!==_target$dataset$locke&&_target$dataset$locke}async addOverlay(definition,target){var _definition$classes;this._overlay&&this.removeOverlay(),this._overlay=await(0,_overlay.addOverlay)({content:definition.content,css:null!==(_definition$classes=definition.classes)&&void 0!==_definition$classes?_definition$classes:"file-drop-zone"},null!=target?target:this.element)}removeOverlay(){this._overlay&&((0,_overlay.removeOverlay)(this._overlay),this._overlay=null)}removeAllOverlays(){(0,_overlay.removeAllOverlays)()}},_exports.default})); define("core/local/reactive/debug",["exports","core/local/reactive/reactive","core/log"],(function(_exports,_reactive,_log){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Reactive module debug tools. * * @module core/local/reactive/debug * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.initDebug=void 0,_reactive=_interopRequireDefault(_reactive),_log=_interopRequireDefault(_log);const reactiveInstances={},reactiveDebuggers={}; /** * Reactive module debug tools. * * If debug is enabled, this reactive module will spy all the reactive instances and keep a record * of the changes and components they have. * * It is important to note that the Debug class is also a Reactive module. The debug instance keeps * the reactive instances data as its own state. This way it is possible to implement development tools * that whatches this data. * * @class core/reactive/local/reactive/debug/Debug * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class Debug extends _reactive.default{setInitialState(stateData){super.setInitialState(stateData),_log.default.debug('Debug module "M.reactive" loaded.')}get list(){return JSON.parse(JSON.stringify(this.state.reactives))}registerNewInstance(instance){var _instance$name;let name=null!==(_instance$name=instance.name)&&void 0!==_instance$name?_instance$name:"instance".concat(this.state.reactives.length);name=name.replace(/\W/g,""),_log.default.debug('Registering new reactive instance "M.reactive.'.concat(name,'"')),reactiveInstances[name]=instance,reactiveDebuggers[name]=new DebugInstance(reactiveInstances[name]),this.dispatch("putInstance",name,instance);const refreshMethod=()=>{this.dispatch("putInstance",name,instance)};instance.target.addEventListener("readmode:on",refreshMethod),instance.target.addEventListener("readmode:off",refreshMethod),instance.target.addEventListener("registerComponent:success",refreshMethod),instance.target.addEventListener("transaction:end",refreshMethod);instance.target.addEventListener("transaction:end",(_ref=>{let{detail:detail}=_ref;const changes=null==detail?void 0:detail.changes;this.dispatch("lastTransaction",name,changes)}))}debug(name){return reactiveDebuggers[name]}}class Mutations{putInstance(stateManager,name,instance){const state=stateManager.state;stateManager.setReadOnly(!1),state.reactives.has(name)?(state.reactives.get(name).countcomponents=instance.components.length,state.reactives.get(name).readOnly=instance.stateManager.readonly,state.reactives.get(name).modified=(new Date).getTime()):state.reactives.add({id:name,countcomponents:instance.components.length,readOnly:instance.stateManager.readonly,lastChanges:[],modified:(new Date).getTime()}),stateManager.setReadOnly(!0)}lastTransaction(stateManager,name,changes){if(!changes||0===changes.length)return;const state=stateManager.state,lastChanges=["transaction:start"];changes.forEach((change=>{lastChanges.push(change.eventName)})),lastChanges.push("transaction:end"),stateManager.setReadOnly(!1),state.reactives.get(name).lastChanges=[],state.reactives.get(name).lastChanges=lastChanges,stateManager.setReadOnly(!0)}} /** * Class used to debug a specific instance and manipulate the state from the JS console. * * @class core/reactive/local/reactive/debug/DebugInstance * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */class DebugInstance{constructor(instance){this.instance=instance,void 0===instance._reactiveDebugData&&(instance._reactiveDebugData={highlighted:!1})}set readOnly(value){this.instance.stateManager.setReadOnly(value)}get readOnly(){return this.instance.stateManager.readonly}get state(){return this.instance.state}set highlight(value){this.instance._reactiveDebugData.highlighted=value,this.instance.components.forEach((_ref2=>{let{element:element}=_ref2;const border=value?"thick solid #0000FF":"";element.style.border=border}))}get highlight(){return this.instance._reactiveDebugData.highlighted}get components(){return[...this.instance.components]}get changes(){const result=[];return this.instance.stateManager.eventsToPublish.forEach((element=>{result.push(element.eventName)})),result}async dispatch(){this.instance.dispatch(...arguments)}get elements(){const result=[];return this.instance.components.forEach((_ref3=>{let{element:element}=_ref3;result.push(element)})),result}get stateData(){return JSON.parse(JSON.stringify(this.state))}processUpdates(updates){this.instance.stateManager.processUpdates(updates)}}function dispatchStateChangedEvent(detail,target){void 0===target&&(target=document),target.dispatchEvent(new CustomEvent("core_reactive_debug:stateChanged",{bubbles:!0,detail:detail}))}_exports.initDebug=()=>{const debug=new Debug({name:"CoreReactiveDebug",eventName:"core_reactive_debug:stateChanged",eventDispatch:dispatchStateChangedEvent,mutations:new Mutations,state:{reactives:[]}});return reactiveDebuggers.registerNewInstance=debug.registerNewInstance.bind(debug),{debug:debug,debuggers:reactiveDebuggers}}})); define("core/local/reactive/debugpanel",["exports","core/reactive","core/log","core/utils"],(function(_exports,_reactive,_log,_utils){var obj; /** * Reactive module debug panel. * * This module contains all the UI components for the reactive debug tools. * Those tools are only available if the debug is enables and could be used * from the footer. * * @module core/local/reactive/debugpanel * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.initsubpanel=_exports.init=void 0,_log=(obj=_log)&&obj.__esModule?obj:{default:obj};_exports.init=(target,selectors)=>{const element=document.getElementById(target);void 0!==_reactive.debug?new GlobalDebugPanel({element:element,reactive:_reactive.debug,selectors:selectors}):element.remove()};_exports.initsubpanel=(target,selectors)=>{const element=document.getElementById(target);void 0!==_reactive.debug?new DebugInstanceSubpanel({element:element,reactive:_reactive.debug,selectors:selectors}):element.remove()};class GlobalDebugPanel extends _reactive.BaseComponent{create(){this.name="GlobalDebugPanel",this.selectors={LOADERS:"[data-for='loaders']",SUBPANEL:"[data-for='subpanel']",NOINSTANCES:"[data-for='noinstances']",LOG:"[data-for='log']"},this.classes={HIDE:"d-none"},this.subPanels=new Set}stateReady(state){this._updateReactivesPanels({state:state}),this.getElement(this.selectors.SUBPANEL).innerHTML=""}getWatchers(){return[{watch:"reactives:created",handler:this._updateReactivesPanels}]}_updateReactivesPanels(_ref){var _this$getElement,_this$getElement$clas;let{state:state}=_ref;null===(_this$getElement=this.getElement(this.selectors.NOINSTANCES))||void 0===_this$getElement||null===(_this$getElement$clas=_this$getElement.classList)||void 0===_this$getElement$clas||_this$getElement$clas.toggle(this.classes.HIDE,state.reactives.size>0),state.reactives.forEach((instance=>{this._createLoader(instance)}))}_createLoader(instance){if(this.subPanels.has(instance.id))return;this.subPanels.add(instance.id);const loaders=this.getElement(this.selectors.LOADERS),btn=document.createElement("button");btn.innerHTML=instance.id,btn.dataset.id=instance.id,loaders.appendChild(btn),this.addEventListener(btn,"click",(()=>this._openPanel(btn,instance)))}async _openPanel(btn,instance){try{const target=this.getElement(this.selectors.SUBPANEL),data={...instance};await this.renderComponent(target,"core/local/reactive/debuginstancepanel",data)}catch(error){throw _log.default.error("Cannot load reactive debug subpanel"),error}}}class DebugInstanceSubpanel extends _reactive.BaseComponent{create(){this.name="DebugInstanceSubpanel",this.selectors={NAME:"[data-for='name']",CLOSE:"[data-for='close']",READMODE:"[data-for='readmode']",HIGHLIGHT:"[data-for='highlight']",LOG:"[data-for='log']",STATE:"[data-for='state']",CLEAN:"[data-for='clean']",PIN:"[data-for='pin']",SAVE:"[data-for='save']",INVALID:"[data-for='invalid']"},this.id=this.element.dataset.id,this.controller=M.reactive[this.id],this.draggable=!1,this.relativeDrag=!0,this.strings={savewarning:""}}stateReady(){var _this$getElement$inne,_this$getElement2;this.dragdrop=new _reactive.DragDrop(this),this.addEventListener(this.getElement(this.selectors.CLOSE),"click",this.remove),this.controller.highlight&&this._toggleButtonText(this.getElement(this.selectors.HIGHLIGHT)),this.addEventListener(this.getElement(this.selectors.HIGHLIGHT),"click",(()=>{this.controller.highlight=!this.controller.highlight,this._toggleButtonText(this.getElement(this.selectors.HIGHLIGHT))})),this.addEventListener(this.getElement(this.selectors.READMODE),"click",this._toggleEditMode),this.addEventListener(this.getElement(this.selectors.CLEAN),"click",this._cleanAreas),this.addEventListener(this.getElement(this.selectors.PIN),"click",this._togglePin),this.getElement(this.selectors.SAVE).disabled=!0,this.addEventListener(this.getElement(this.selectors.STATE),"keyup",(0,_utils.debounce)(this._checkJSON.bind(this),500)),this.addEventListener(this.getElement(this.selectors.SAVE),"click",this._saveState),this.strings.savewarning=null!==(_this$getElement$inne=null===(_this$getElement2=this.getElement(this.selectors.INVALID))||void 0===_this$getElement2?void 0:_this$getElement2.innerHTML)&&void 0!==_this$getElement$inne?_this$getElement$inne:"",this._refreshState()}destroy(){void 0!==this.dragdrop&&this.dragdrop.unregister()}getWatchers(){return[{watch:"reactives[".concat(this.id,"].lastChanges:updated"),handler:this._refreshLog},{watch:"reactives[".concat(this.id,"].modified:updated"),handler:this._refreshState},{watch:"reactives[".concat(this.id,"].readOnly:updated"),handler:this._refreshReadOnly}]}_refreshLog(_ref2){var _element$lastChanges;let{element:element}=_ref2;const list=null!==(_element$lastChanges=null==element?void 0:element.lastChanges)&&void 0!==_element$lastChanges?_element$lastChanges:[],target=this.getElement(this.selectors.LOG);""!==target.value&&(target.value+="\n\n");const logContent=list.join("\n");target.value+="= Transaction =\n".concat(logContent),target.scrollTop=target.scrollHeight}_cleanAreas(){this.getElement(this.selectors.LOG).value="",this._refreshState()}_refreshState(){this.getElement(this.selectors.STATE).value=JSON.stringify(this.controller.state,null,4)}_refreshReadOnly(){const target=this.getElement(this.selectors.READMODE);void 0===target.dataset.readonly&&(target.dataset.readonly=target.innerHTML),this.controller.readOnly?target.innerHTML=target.dataset.readonly:target.innerHTML=target.dataset.alt}_toggleEditMode(){this.controller.readOnly=!this.controller.readOnly}_checkJSON(){const invalid=this.getElement(this.selectors.INVALID),save=this.getElement(this.selectors.SAVE),edited=this.getElement(this.selectors.STATE).value,currentStateData=this.controller.stateData;if(edited==JSON.stringify(this.controller.state,null,4))return invalid.style.color="",invalid.innerHTML="",void(save.disabled=!0);try{const newState=JSON.parse(edited),result=this._generateStateUpdates(currentStateData,newState);return invalid.style.color="",invalid.innerHTML=this.strings.savewarning,save.disabled=!1,result}catch(error){var _error$message;return invalid.style.color="red",invalid.innerHTML=null!==(_error$message=error.message)&&void 0!==_error$message?_error$message:"Invalid JSON sctructure",void(save.disabled=!0)}}_saveState(){const updates=this._checkJSON();updates&&this.controller.processUpdates(updates)}_generateStateUpdates(currentStateData,newStateData){const updates=[],ids={};for(const[key,newValue]of Object.entries(newStateData))Array.isArray(newValue)?(ids[key]={},newValue.forEach((element=>{if(void 0===element.id)throw Error("Array ".concat(key," element without id attribute"));updates.push({name:key,action:"override",fields:element});const index=String(element.id).valueOf();ids[key][index]=!0}))):updates.push({name:key,action:"override",fields:newValue});for(const[key,oldValue]of Object.entries(currentStateData)){let deleteField=!1;if(void 0===newStateData[key]&&(deleteField=!0),Array.isArray(oldValue)){if(!deleteField&&void 0===ids[key])throw Error("Array ".concat(key," cannot change to object."));oldValue.forEach((element=>{const index=String(element.id).valueOf();let deleteEntry=deleteField;deleteEntry||void 0!==ids[key][index]||(deleteEntry=!0),deleteEntry&&updates.push({name:key,action:"delete",fields:element})}))}else{if(!deleteField&&void 0!==ids[key])throw Error("Object ".concat(key," cannot change to array."));deleteField&&updates.push({name:key,action:"delete",fields:oldValue})}}return updates}getDraggableData(){return this.draggable}dragEnd(dropdata,event){this.element.style.top="".concat(event.newFixedTop,"px"),this.element.style.left="".concat(event.newFixedLeft,"px")}_togglePin(){this.draggable=!this.draggable,this.dragdrop.setDraggable(this.draggable),this.draggable?this._unpin():this._pin()}_unpin(){const pageCenterY=window.innerHeight/2,pageCenterX=window.innerWidth/2,style={position:"fixed",resize:"both",overflow:"auto",height:"400px",width:"400px",top:"".concat(pageCenterY-200,"px"),left:"".concat(pageCenterX-200,"px")};Object.assign(this.element.style,style),this.getElement(this.selectors.STATE).style.height="50px",this.getElement(this.selectors.LOG).style.height="50px",this._toggleButtonText(this.getElement(this.selectors.PIN))}_pin(){["position","resize","overflow","top","left","height","width"].forEach((prop=>this.element.style.removeProperty(prop))),this._toggleButtonText(this.getElement(this.selectors.PIN))}_toggleButtonText(element){[element.innerHTML,element.dataset.alt]=[element.dataset.alt,element.innerHTML]}}})); define("core/local/reactive/dragdrop",["exports","core/local/reactive/basecomponent"],(function(_exports,_basecomponent){var obj; /** * Drag and drop helper component. * * This component is used to delegate drag and drop handling. * * To delegate the logic to this particular element the component should create a new instance * passing "this" as param. The component will use all the necessary callbacks and add all the * necessary listeners to the component element. * * Component attributes used by dragdrop module: * - element: the draggable or dropzone element. * - (optional) classes: object with alternative CSS classes * - (optional) fullregion: page element affeted by the elementy dragging. Use this attribute if * the draggable element affects a bigger region (for example a draggable * title). * - (optional) autoconfigDraggable: by default, the component will be draggable if it has a * getDraggableData method. If this value is false draggable * property must be defined using setDraggable method. * - (optional) relativeDrag: by default the drag image is located at point (0,0) relative to the * mouse position to prevent the mouse from covering it. If this attribute * is true the drag image will be located at the click offset. * * Methods the parent component should have for making it draggable: * * - getDraggableData(): Object|data * Return the data that will be passed to any valid dropzone while it is dragged. * If the component has this method, the dragdrop module will enable the dragging, * this is the only required method for dragging. * If at the dragging moment this method returns a false|null|undefined, the dragging * actions won't be captured. * * - (optional) dragStart(Object dropdata, Event event): void * - (optional) dragEnd(Object dropdata, Event event): void * Callbacks dragdrop will call when the element is dragged and getDraggableData * return some data. * * Methods the parent component should have for enabling it as a dropzone: * * - validateDropData(Object dropdata): boolean * If that method exists, the dragdrop module will automathically configure the element as dropzone. * This method will return true if the dropdata is accepted. In case it returns false, no drag and * drop event will be listened for this specific dragged dropdata. * * - (Optional) showDropZone(Object dropdata, Event event): void * - (Optional) hideDropZone(Object dropdata, Event event): void * Methods called when a valid dragged data pass over the element. * * - (Optional) drop(Object dropdata, Event event): void * Called when a valid dragged element is dropped over the element. * * Note that none of this methods will be called if validateDropData * returns a false value. * * This module will also add or remove several CSS classes from both dragged elements and dropzones. * See the "this.classes" in the create method for more details. In case the parent component wants * to use the same classes, it can use the getClasses method. On the other hand, if the parent * component has an alternative "classes" attribute, this will override the default drag and drop * classes. * * @module core/local/reactive/dragdrop * @class core/local/reactive/dragdrop * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_basecomponent=(obj=_basecomponent)&&obj.__esModule?obj:{default:obj};let activeDropData=new Map,dragStartPoint={};class _default extends _basecomponent.default{create(parent){var _parent$name,_parent$classes,_this$parent$draggabl,_this$parent$relative;this.name="".concat(null!==(_parent$name=parent.name)&&void 0!==_parent$name?_parent$name:"unkown","_dragdrop"),this.classes=Object.assign({BODYDRAGGING:"dragging",DRAGGABLEREADY:"draggable",DROPREADY:"dropready",DRAGOVER:"dragover",DRAGGING:"dragging",DROPUP:"drop-up",DROPDOWN:"drop-down",DROPZONE:"drop-zone",DRAGICON:"dragicon"},null!==(_parent$classes=null==parent?void 0:parent.classes)&&void 0!==_parent$classes?_parent$classes:{}),this.fullregion=parent.fullregion,this.parent=parent,this.autoconfigDraggable=null===(_this$parent$draggabl=this.parent.draggable)||void 0===_this$parent$draggabl||_this$parent$draggabl,this.relativeDrag=null!==(_this$parent$relative=this.parent.relativeDrag)&&void 0!==_this$parent$relative&&_this$parent$relative,this.entercount=0,this.dropzonevisible=!1,this.ismouseover=!1}getClasses(){return this.classes}isDropzoneVisible(){return this.dropzonevisible}stateReady(){"function"==typeof this.parent.validateDropData&&(this.element.classList.add(this.classes.DROPREADY),this.addEventListener(this.element,"dragenter",this._dragEnter),this.addEventListener(this.element,"dragleave",this._dragLeave),this.addEventListener(this.element,"dragover",this._dragOver),this.addEventListener(this.element,"drop",this._drop),this.addEventListener(this.element,"mouseover",this._mouseOver),this.addEventListener(this.element,"mouseleave",this._mouseLeave)),this.autoconfigDraggable&&"function"==typeof this.parent.getDraggableData&&this.setDraggable(!0)}setDraggable(value){if("function"!=typeof this.parent.getDraggableData)throw new Error("Draggable components must have a getDraggableData method");this.element.setAttribute("draggable",value),value?(this.addEventListener(this.element,"dragstart",this._dragStart),this.addEventListener(this.element,"dragend",this._dragEnd),this.element.classList.add(this.classes.DRAGGABLEREADY)):(this.removeEventListener(this.element,"dragstart",this._dragStart),this.removeEventListener(this.element,"dragend",this._dragEnd),this.element.classList.remove(this.classes.DRAGGABLEREADY))}_mouseOver(){this.ismouseover=!0}_mouseLeave(){this.ismouseover=!1}_dragStart(event){var _this$fullregion;if(document.activeElement.matches("textarea, input"))return void event.preventDefault();const dropdata=this.parent.getDraggableData();if(!dropdata)return;dragStartPoint={pageX:event.pageX,pageY:event.pageY},event.stopPropagation(),activeDropData.set(this.reactive,dropdata),document.body.classList.add(this.classes.BODYDRAGGING),this.element.classList.add(this.classes.DRAGGING),null===(_this$fullregion=this.fullregion)||void 0===_this$fullregion||_this$fullregion.classList.add(this.classes.DRAGGING);let dragImage=this.element;if(void 0!==this.parent.setDragImage){const customImage=this.parent.setDragImage(dropdata,event);customImage&&(dragImage=customImage)}const position={x:0,y:0};this.relativeDrag&&(position.x=event.offsetX,position.y=event.offsetY),event.dataTransfer.setDragImage(dragImage,position.x,position.y),event.dataTransfer.effectAllowed="copyMove",this._callParentMethod("dragStart",dropdata,event)}_dragEnd(event){var _this$fullregion2;const dropdata=activeDropData.get(this.reactive);dropdata&&(activeDropData.delete(this.reactive),document.body.classList.remove(this.classes.BODYDRAGGING),this.element.classList.remove(this.classes.DRAGGING),null===(_this$fullregion2=this.fullregion)||void 0===_this$fullregion2||_this$fullregion2.classList.remove(this.classes.DRAGGING),this.removeAllOverlays(),this._addEventTotalMovement(event),this._callParentMethod("dragEnd",dropdata,event))}_dragEnter(event){const dropdata=this._processEvent(event);dropdata&&(this.entercount++,this.element.classList.add(this.classes.DRAGOVER),1!=this.entercount||this.dropzonevisible||(this.dropzonevisible=!0,this.element.classList.add(this.classes.DRAGOVER),this._callParentMethod("showDropZone",dropdata,event)))}_dragOver(event){const dropdata=this._processEvent(event);dropdata&&!this.dropzonevisible&&(event.dataTransfer.dropEffect=event.altKey?"copy":"move",this.dropzonevisible=!0,this.element.classList.add(this.classes.DRAGOVER),this._callParentMethod("showDropZone",dropdata,event))}_dragLeave(event){const dropdata=this._processEvent(event);dropdata&&(this.entercount--,this.entercount<=0&&this.dropzonevisible&&(this.dropzonevisible=!1,this.element.classList.remove(this.classes.DRAGOVER),this._callParentMethod("hideDropZone",dropdata,event)))}_drop(event){const dropdata=this._processEvent(event);dropdata&&(this.entercount=0,this.dropzonevisible&&(this.dropzonevisible=!1,this._callParentMethod("hideDropZone",dropdata,event)),this.element.classList.remove(this.classes.DRAGOVER),this.removeAllOverlays(),this._callParentMethod("drop",dropdata,event),dragStartPoint={})}_processEvent(event){const dropdata=this._getDropData(event);return dropdata&&this.parent.validateDropData(dropdata)?(event.preventDefault(),event.stopPropagation(),this._addEventTotalMovement(event),dropdata):null}_addEventTotalMovement(event){if(void 0===dragStartPoint.pageX||void 0===event.pageX)return;event.fixedMovementX=event.pageX-dragStartPoint.pageX,event.fixedMovementY=event.pageY-dragStartPoint.pageY,event.initialPageX=dragStartPoint.pageX,event.initialPageY=dragStartPoint.pageY;const current=this.element.getBoundingClientRect();if(event.newFixedTop=current.top+event.fixedMovementY,event.newFixedLeft=current.left+event.fixedMovementX,void 0!==this.fullregion){const current=this.fullregion.getBoundingClientRect();event.newRegionFixedxTop=current.top+event.fixedMovementY,event.newRegionFixedxLeft=current.left+event.fixedMovementX}}_callParentMethod(methodname,dropdata,event){"function"==typeof this.parent[methodname]&&this.parent[methodname](dropdata,event)}_getDropData(event){return this._isOnlyFilesDragging=this._containsOnlyFiles(event),this._isOnlyFilesDragging?void 0!==this.reactive.getFilesDraggableData&&"function"==typeof this.reactive.getFilesDraggableData?this.reactive.getFilesDraggableData(event.dataTransfer):void 0:activeDropData.get(this.reactive)}_containsOnlyFiles(event){return!!event.dataTransfer.types.includes("Files")&&event.dataTransfer.types.every((type=>"text/uri-list"!=type.toLowerCase()&&"text/html"!=type.toLowerCase()&&"text/plain"!=type.toLowerCase()))}}return _exports.default=_default,_exports.default})); define("core/local/reactive/logger",["exports","core/toast"],(function(_exports,_toast){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default= /** * Default reactive mutations logger class. * * This logger is used by default by the StateManager to log mutation feedbacks * and actions. By default, feedbacks will be displayed as a toast. However, the * reactive instance can provide alternative loggers to provide advanced logging * capabilities. * * @module core/local/reactive/logger * @class Logger * @copyright 2023 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class{constructor(){this._debug=!1}add(entry){entry.feedbackMessage&&(0,_toast.add)(entry.feedbackMessage)}},_exports.default})); define("core/local/reactive/overlay",["exports","core/templates","core/prefetch"],(function(_exports,_templates,_prefetch){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Element overlay methods. * * This module is used to create overlay information on components. For example * to generate or destroy file drop-zones. * * @module core/local/reactive/overlay * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.removeOverlay=_exports.removeAllOverlays=_exports.addOverlay=void 0,_templates=_interopRequireDefault(_templates),_prefetch=_interopRequireDefault(_prefetch);_prefetch.default.prefetchTemplate("core/local/reactive/overlay");const selectors_OVERLAY="[data-overlay]",selectors_REPOSITION="[data-overlay-dynamic]",selectors_NAVBAR="nav.navbar.fixed-top";_exports.addOverlay=async(definition,parent)=>{var _definition$classes;definition.content&&"string"!=typeof definition.content&&(definition.content=await definition.content),definition.icon&&"string"!=typeof definition.icon&&(definition.icon=await definition.icon);const data={content:definition.content,css:null!==(_definition$classes=definition.classes)&&void 0!==_definition$classes?_definition$classes:"file-drop-zone"},{html:html,js:js}=await _templates.default.renderForPromise("core/local/reactive/overlay",data);_templates.default.appendNodeContents(parent,html,js);const overlay=parent.querySelector(selectors_OVERLAY);return rePositionPreviewInfoElement(overlay),init(),overlay};const removeOverlay=overlay=>{var _overlay$dataset;overlay&&overlay.parentNode&&(null!==(_overlay$dataset=overlay.dataset)&&void 0!==_overlay$dataset&&_overlay$dataset.overlayPosition&&delete overlay.parentNode.style.position,overlay.parentNode.removeChild(overlay))};_exports.removeOverlay=removeOverlay;_exports.removeAllOverlays=()=>{document.querySelectorAll(selectors_OVERLAY).forEach((overlay=>{removeOverlay(overlay)}))};const rePositionPreviewInfoElement=function(overlay){var _overlay$parentNode,_overlay$parentNode$s;if(!overlay)throw new Error("Inexistent overlay element");null!==(_overlay$parentNode=overlay.parentNode)&&void 0!==_overlay$parentNode&&null!==(_overlay$parentNode$s=_overlay$parentNode.style)&&void 0!==_overlay$parentNode$s&&_overlay$parentNode$s.position||(overlay.parentNode.style.position="relative",overlay.dataset.overlayPosition="true");const target=overlay.querySelector(selectors_REPOSITION);if(!target)return;const rect=overlay.getBoundingClientRect(),sectionHeight=parseInt(window.getComputedStyle(overlay).height,10),sectionOffset=rect.top,previewHeight=parseInt(window.getComputedStyle(target).height,10)+2*parseInt(window.getComputedStyle(target).padding,10);let top,bottom;if(sectionOffset<0)if(sectionHeight+sectionOffset>=previewHeight){let offSetTop=0-sectionOffset;const navBar=document.querySelector(selectors_NAVBAR);navBar&&(offSetTop+=navBar.offsetHeight),top=offSetTop+"px",bottom="unset"}else top="unset",bottom=0;else top=0,bottom="unset";target.style.top=top,target.style.bottom=bottom},init=()=>{document.addEventListener("scroll",(()=>{document.querySelectorAll(selectors_OVERLAY).forEach((overlay=>{rePositionPreviewInfoElement(overlay)}))}),!0)}})); define("core/local/reactive/reactive",["exports","core/log","core/local/reactive/statemanager","core/pending"],(function(_exports,_log,_statemanager,_pending){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * A generic single state reactive module. * * @module core/local/reactive/reactive * @class core/local/reactive/reactive * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_log=_interopRequireDefault(_log),_statemanager=_interopRequireDefault(_statemanager),_pending=_interopRequireDefault(_pending);let pendingCount=0;return _exports.default=class{constructor(description){var _description$target,_description$mutation;if(void 0===description.eventName||void 0===description.eventDispatch)throw new Error("Reactivity event required");void 0!==description.name&&(this.name=description.name),this.target=null!==(_description$target=description.target)&&void 0!==_description$target?_description$target:document.createTextNode(null),this.eventName=description.eventName,this.eventDispatch=description.eventDispatch,this.stateManager=new _statemanager.default(this.eventDispatch,this.target),this.watchers=new Map([]),this.components=new Set([]),this.mutations=null!==(_description$mutation=description.mutations)&&void 0!==_description$mutation?_description$mutation:{},this.target.addEventListener(this.eventName,this.callWatchersHandler.bind(this)),this.pendingState=new _pending.default("core/reactive:registerInstance".concat(pendingCount++)),void 0!==description.state&&this.setInitialState(description.state),void 0!==M.reactive&&M.reactive.registerNewInstance(this)}callWatchersHandler(event){this.target.dispatchEvent(new CustomEvent(event.detail.action,{bubbles:!1,detail:event.detail}))}setInitialState(stateData){this.pendingState.resolve(),this.stateManager.setInitialState(stateData)}addMutations(newFunctions){void 0!==newFunctions.init&&newFunctions.init(this.stateManager);for(const[mutation,mutationFunction]of Object.entries(newFunctions))this.mutations[mutation]=mutationFunction.bind(newFunctions)}setMutations(manager){this.mutations=manager,void 0!==manager.init&&manager.init(this.stateManager)}get state(){return this.stateManager.state}get(name,id){return this.stateManager.get(name,id)}getInitialStatePromise(){return this.stateManager.getInitialPromise()}registerComponent(component){var _component$name;const componentName=null!==(_component$name=component.name)&&void 0!==_component$name?_component$name:"Unkown component";let dispatchSuccess=()=>{},dispatchFail=dispatchSuccess;if(void 0!==component.dispatchRegistrationSuccess&&(dispatchSuccess=component.dispatchRegistrationSuccess.bind(component)),void 0!==component.dispatchRegistrationFail&&(dispatchFail=component.dispatchRegistrationFail.bind(component)),this.components.has(component))return dispatchSuccess(),component;const pendingPromise=new _pending.default("core/reactive:registerComponent".concat(pendingCount++));let listeners=[],handlers=[];return void 0!==component.getWatchers&&(handlers=component.getWatchers()),handlers.forEach((_ref=>{let{watch:watch,handler:handler}=_ref;if(void 0===watch)throw dispatchFail(),new Error("Missing watch attribute in ".concat(componentName," watcher"));if(void 0===handler)throw dispatchFail(),new Error("Missing handler for watcher ".concat(watch," in ").concat(componentName));const listener=event=>{const currentFocus=document.activeElement;handler.apply(component,[event.detail]),document.activeElement===document.body&&document.body.contains(currentFocus)&¤tFocus.focus()};listeners.push({target:this.target,watch:watch,listener:listener}),this.target.addEventListener(watch,listener)})),void 0!==component.stateReady&&this.getInitialStatePromise().then((state=>(component.stateReady(state),pendingPromise.resolve(),!0))).catch((reason=>{pendingPromise.resolve(),_log.default.error("Initial state in ".concat(componentName," rejected due to: ").concat(reason)),_log.default.error(reason)})),this.watchers.set(component,listeners),this.components.add(component),this.target.dispatchEvent(new CustomEvent("registerComponent:success",{bubbles:!1,detail:{component:component}})),dispatchSuccess(),component}unregisterComponent(component){if(!this.components.has(component))return component;this.components.delete(component);const listeners=this.watchers.get(component);return void 0===listeners||(listeners.forEach((_ref2=>{let{target:target,watch:watch,listener:listener}=_ref2;target.removeEventListener(watch,listener)})),this.watchers.delete(component)),component}async dispatch(actionName){if("string"!=typeof actionName)throw new Error("Dispatch action name must be a string");if("_"===actionName.charAt(0))throw new Error("Illegal Private ".concat(actionName," mutation method dispatch"));if(void 0===this.mutations[actionName])throw new Error("Unkown ".concat(actionName," mutation"));const pendingPromise=new _pending.default("core/reactive:".concat(actionName).concat(pendingCount++)),mutationFunction=this.mutations[actionName];try{for(var _len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];await mutationFunction.apply(this.mutations,[this.stateManager,...params]),pendingPromise.resolve()}catch(error){throw this.stateManager.setReadOnly(!0),pendingPromise.resolve(),error}}},_exports.default})); define("core/local/reactive/srlogger",["exports","core/local/reactive/logger"],(function(_exports,_logger){var obj;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_logger=(obj=_logger)&&obj.__esModule?obj:{default:obj};class SRLogger extends _logger.default{add(entry){if(entry.feedbackMessage){let loggerFeedback=document.getElementById(SRLogger.liveRegionId);loggerFeedback||(loggerFeedback=document.createElement("div"),loggerFeedback.id=SRLogger.liveRegionId,loggerFeedback.classList.add("visually-hidden"),loggerFeedback.setAttribute("aria-live","polite"),document.body.append(loggerFeedback)),loggerFeedback.innerHTML=entry.feedbackMessage,setTimeout((()=>{loggerFeedback.innerHTML=""}),4e3)}}}return _exports.default=SRLogger,function(obj,key,value){key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}(SRLogger,"liveRegionId","sr-logger-feedback-container"),_exports.default})); define("core/local/reactive/statemanager",["exports","core/local/reactive/logger"],(function(_exports,_logger){var obj; /** * Reactive simple state manager. * * The state manager contains the state data, trigger update events and * can lock and unlock the state data. * * This file contains the three main elements of the state manager: * - State manager: the public class to alter the state, dispatch events and process update messages. * - Proxy handler: a private class to keep track of the state object changes. * - StateMap class: a private class extending Map class that triggers event when a state list is modifed. * * @module core/local/reactive/statemanager * @class StateManager * @copyright 2021 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_logger=(obj=_logger)&&obj.__esModule?obj:{default:obj};_exports.default=class{constructor(dispatchEvent,target){this.dispatchEvent=dispatchEvent,this.target=null!=target?target:document,this.readonly=!1,this.eventsToPublish=[],this.updateTypes={create:this.defaultCreate.bind(this),update:this.defaultUpdate.bind(this),delete:this.defaultDelete.bind(this),put:this.defaultPut.bind(this),override:this.defaultOverride.bind(this),remove:this.defaultRemove.bind(this),prepareFields:this.defaultPrepareFields.bind(this)},this.initialPromise=new Promise((resolve=>{this.target.addEventListener("state:loaded",(event=>{resolve(event.detail.state)}))})),this.logger=new _logger.default}setInitialState(initialState){if(void 0!==this.state)throw Error("Initial state can only be initialized ones");const state=new Proxy({},new Handler("state",this,!0));for(const[prop,propValue]of Object.entries(initialState))state[prop]=propValue;this.state=state,this.readonly=!0,this.dispatchEvent({action:"state:loaded",state:this.state},this.target)}getInitialPromise(){return this.initialPromise}setReadOnly(readonly){this.readonly=readonly;let mode="off";this.readonly&&(mode="on",this._publishEvents()),this.dispatchEvent({action:"readmode:".concat(mode),state:this.state,element:null},this.target)}addUpdateTypes(newFunctions){for(const[updateType,updateFunction]of Object.entries(newFunctions))"function"==typeof updateFunction&&(this.updateTypes[updateType]=updateFunction.bind(newFunctions))}processUpdates(updates,updateTypes){if(!Array.isArray(updates))throw Error("State updates must be an array");this.setReadOnly(!1),updates.forEach((update=>{if(void 0===update.name)throw Error("Missing state update name");this.processUpdate(update.name,update.action,update.fields,updateTypes)})),this.setReadOnly(!0)}processUpdate(updateName,action,fields,updateTypes){var _action,_updateTypes$action,_updateTypes$prepareF;if(!fields)throw Error("Missing state update fields");void 0===updateTypes&&(updateTypes={});const method=null!==(_updateTypes$action=updateTypes[action=null!==(_action=action)&&void 0!==_action?_action:"update"])&&void 0!==_updateTypes$action?_updateTypes$action:this.updateTypes[action];if(void 0===method)throw Error("Unkown update action ".concat(action));method(this,updateName,(null!==(_updateTypes$prepareF=updateTypes.prepareFields)&&void 0!==_updateTypes$prepareF?_updateTypes$prepareF:this.updateTypes.prepareFields)(this,updateName,fields))}defaultPrepareFields(stateManager,updateName,fields){return fields}defaultCreate(stateManager,updateName,fields){let state=stateManager.state;state[updateName]instanceof StateMap?state[updateName].add(fields):state[updateName]=fields}defaultDelete(stateManager,updateName,fields){if(!stateManager.get(updateName,fields.id))throw Error("Inexistent ".concat(updateName," ").concat(fields.id));let state=stateManager.state;state[updateName]instanceof StateMap?state[updateName].delete(fields.id):delete state[updateName]}defaultRemove(stateManager,updateName,fields){if(!stateManager.get(updateName,fields.id))return;let state=stateManager.state;state[updateName]instanceof StateMap?state[updateName].delete(fields.id):delete state[updateName]}defaultUpdate(stateManager,updateName,fields){let current=stateManager.get(updateName,fields.id);if(!current)throw Error("Inexistent ".concat(updateName," ").concat(fields.id));for(const[fieldName,fieldValue]of Object.entries(fields))current[fieldName]=fieldValue}defaultPut(stateManager,updateName,fields){let current=stateManager.get(updateName,fields.id);if(current)for(const[fieldName,fieldValue]of Object.entries(fields))current[fieldName]=fieldValue;else{let state=stateManager.state;if(state[updateName]instanceof StateMap)return void state[updateName].add(fields);state[updateName]=fields}}defaultOverride(stateManager,updateName,fields){let current=stateManager.get(updateName,fields.id);if(current){for(const[fieldName]of Object.entries(current))void 0===fields[fieldName]&&delete current[fieldName];for(const[fieldName,fieldValue]of Object.entries(fields))current[fieldName]=fieldValue}else{let state=stateManager.state;if(state[updateName]instanceof StateMap)return void state[updateName].add(fields);state[updateName]=fields}}setLogger(logger){this.logger=logger}addLoggerEntry(entry){this.logger.add(entry)}get(name,id){const state=this.state;let current=state[name];if(current instanceof StateMap){if(void 0===id)throw Error("Missing id for ".concat(name," state update"));current=state[name].get(id)}return current}getIds(name){const state=this.state;if(!(state[name]instanceof StateMap))throw Error("".concat(name," is not an instance of StateMap"));return[...state[name].keys()]}registerStateAction(field,prop,action,data){let parentAction="updated";null!==prop?this.eventsToPublish.push({eventName:"".concat(field,".").concat(prop,":").concat(action),eventData:data,action:action}):parentAction=action,void 0!==data.id&&(null!==prop&&this.eventsToPublish.push({eventName:"".concat(field,"[").concat(data.id,"].").concat(prop,":").concat(action),eventData:data,action:action}),this.eventsToPublish.push({eventName:"".concat(field,"[").concat(data.id,"]:").concat(parentAction),eventData:data,action:parentAction})),this.eventsToPublish.push({eventName:"".concat(field,":").concat(parentAction),eventData:data,action:parentAction}),this.eventsToPublish.push({eventName:"state:updated",eventData:data,action:"updated"})}_publishEvents(){const fieldChanges=this.eventsToPublish;this.eventsToPublish=[],this.dispatchEvent({action:"transaction:start",state:this.state,element:null,changes:fieldChanges},this.target),fieldChanges.sort(((a,b)=>{var _weights$a$action,_weights$b$action;const weights={created:0,updated:1,deleted:2},aweight=null!==(_weights$a$action=weights[a.action])&&void 0!==_weights$a$action?_weights$a$action:0,bweight=null!==(_weights$b$action=weights[b.action])&&void 0!==_weights$b$action?_weights$b$action:0;return aweight===bweight?a.eventName.length-b.eventName.length:aweight-bweight}));let publishedEvents=new Set,transactionEvents=[];fieldChanges.forEach((event=>{var _event$eventData$id;const eventkey="".concat(event.eventName,".").concat(null!==(_event$eventData$id=event.eventData.id)&&void 0!==_event$eventData$id?_event$eventData$id:0);publishedEvents.has(eventkey)||(this.dispatchEvent({action:event.eventName,state:this.state,element:event.eventData},this.target),publishedEvents.add(eventkey),transactionEvents.push(event))})),this.dispatchEvent({action:"transaction:end",state:this.state,element:null,changes:transactionEvents},this.target)}};class Handler{constructor(name,stateManager,proxyValues){this.name=name,this.stateManager=stateManager,this.proxyValues=null!=proxyValues&&proxyValues}set(obj,prop,value,receiver){if(this.stateManager.readonly)throw new Error("State locked. Use mutations to change ".concat(prop," value in ").concat(this.name,"."));if(JSON.stringify(obj[prop])===JSON.stringify(value))return!0;const action=void 0!==obj[prop]?"updated":"created";return this.proxyValues?Array.isArray(value)?obj[prop]=new StateMap(prop,this.stateManager).loadValues(value):obj[prop]=new Proxy(value,new Handler(prop,this.stateManager)):obj[prop]=value,void 0===this.stateManager.state||this.stateManager.registerStateAction(this.name,prop,action,receiver),!0}deleteProperty(obj,prop){if(this.stateManager.readonly)throw new Error("State locked. Use mutations to delete ".concat(prop," in ").concat(this.name,"."));return prop in obj&&(delete obj[prop],this.stateManager.registerStateAction(this.name,prop,"deleted",obj)),!0}}class StateMap extends Map{constructor(name,stateManager,iterable){super(iterable),this.name=name,this.stateManager=stateManager}set(key,value){if(this.stateManager.readonly)throw new Error("State locked. Use mutations to change ".concat(key," value in ").concat(this.name,"."));if(key=this.normalizeKey(key),this.checkValue(value),null==key)throw Error("State lists keys cannot be null or undefined");if(this.normalizeKey(value.id)!==key)throw new Error("State error: ".concat(this.name," list element ID (").concat(value.id,") and key (").concat(key,") mismatch"));const action=super.has(key)?"updated":"created",result=super.set(key,new Proxy(value,new Handler(this.name,this.stateManager)));return void 0===this.stateManager.state||this.stateManager.registerStateAction(this.name,null,action,super.get(key)),result}checkValue(value){if(void 0===value.id)throw Error("State lists elements must contain at least an id attribute")}normalizeKey(key){return String(key).valueOf()}add(value){return this.checkValue(value),this.set(value.id,value)}get(key){return super.get(this.normalizeKey(key))}has(key){return super.has(this.normalizeKey(key))}delete(key){if(key=this.normalizeKey(key),this.stateManager.readonly)throw new Error("State locked. Use mutations to change ".concat(key," value in ").concat(this.name,"."));const previous=super.get(key),result=super.delete(key);return result?(this.stateManager.registerStateAction(this.name,null,"deleted",previous),result):result}toJSON(){let result=[];return this.forEach((value=>{result.push(value)})),result}loadValues(values){return values.forEach((data=>{this.checkValue(data);let key=data.id,newvalue=new Proxy(data,new Handler(this.name,this.stateManager));this.set(key,newvalue)})),this}}return _exports.default})); define("core/local/repository/dynamic_tabs",["exports","core/ajax"],(function(_exports,_ajax){var obj; /** * Module to handle dynamic tabs AJAX requests * * @module core/local/repository/dynamic_tabs * @copyright 2021 David Matamoros * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.getContent=void 0,_ajax=(obj=_ajax)&&obj.__esModule?obj:{default:obj};_exports.getContent=(tab,jsondata)=>{const request={methodname:"core_dynamic_tabs_get_content",args:{tab:tab,jsondata:jsondata}};return _ajax.default.call([request])[0]}})); define("core/local/templates/loader",["exports","jquery","core/ajax","core/str","core/config","core/mustache","core/localstorage","core/utils"],(function(_exports,_jquery,_ajax,str,config,_mustache,_localstorage,_utils){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj} /** * Template this. * * @module core/local/templates/loader * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.3 */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=_interopRequireDefault(_jquery),_ajax=_interopRequireDefault(_ajax),str=_interopRequireWildcard(str),config=_interopRequireWildcard(config),_mustache=_interopRequireDefault(_mustache),_localstorage=_interopRequireDefault(_localstorage);class Loader{constructor(){_defineProperty(this,"currentThemeName","")}static getSearchKey(theme,templateName){return"".concat(theme,"/").concat(templateName)}static getTemplate(templateName){let themeName=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config.theme;const searchKey=this.getSearchKey(themeName,templateName),cachedPromise=this.getTemplatePromiseFromCache(searchKey);if(cachedPromise)return cachedPromise;const existingBufferRecords=this.loadTemplateBuffer.filter((record=>record.searchKey===searchKey));if(existingBufferRecords.length)return existingBufferRecords[0].deferred.promise();const parts=templateName.split("/"),component=(0,_utils.getNormalisedComponent)(parts.shift()),name=parts.join("/"),deferred=_jquery.default.Deferred();return this.loadTemplateBuffer.push({component:component,name:name,theme:themeName,searchKey:searchKey,deferred:deferred}),this.processLoadTemplateBuffer(),deferred.promise()}static setTemplateInCache(searchKey,templateSource){this.templateCache.set(searchKey,templateSource)}static getTemplateFromCache(searchKey){return this.templateCache.get(searchKey)}static hasTemplateInCache(searchKey){return this.templateCache.has(searchKey)}static prefetchTemplates(templateNames,themeName){templateNames.forEach((templateName=>this.prefetchTemplate(templateName,themeName)))}static prefetchTemplate(templateName,themeName){const searchKey=this.getSearchKey(themeName,templateName);if(this.hasTemplateInCache(searchKey))return;if(this.loadTemplateBuffer.filter((record=>record.searchKey===searchKey)).length)return;const parts=templateName.split("/"),component=(0,_utils.getNormalisedComponent)(parts.shift()),name=parts.join("/");this.loadTemplateBuffer.push({component:component,name:name,theme:themeName,searchKey:searchKey,deferred:_jquery.default.Deferred()}),this.processLoadTemplateBuffer()}static partialHelper(name){let themeName=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config.theme;const searchKey=this.getSearchKey(themeName,name);return this.hasTemplateInCache(searchKey)||new Error("Failed to pre-fetch the template: ".concat(name)),this.getTemplateFromCache(searchKey)}static scanForPartials(templateSource){const tokens=_mustache.default.parse(templateSource),partials=[],findPartial=(tokens,partials)=>{let i;for(i=0;i"!=token[0]&&"<"!=token[0]||partials.push(token[1]),token.length>4&&findPartial(token[4],partials)}};return findPartial(tokens,partials),partials}static cachePartials(templateName){let themeName=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config.theme,parentage=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const searchKey=this.getSearchKey(themeName,templateName);return searchKey in this.cachePartialPromises||(parentage.length||parentage.push(searchKey),this.cachePartialPromises[searchKey]=_jquery.default.Deferred(),this._cachePartials(templateName,themeName,parentage).catch((error=>{this.cachePartialPromises[searchKey].reject(error)}))),this.cachePartialPromises[searchKey]}static async _cachePartials(templateName,themeName,parentage){const searchKey=this.getSearchKey(themeName,templateName),templateSource=await this.getTemplate(templateName,themeName),fetchThemAll=this.scanForPartials(templateSource).filter((partialName=>!(parentage.indexOf("".concat(themeName,"/").concat(partialName))>=0)&&partialName!==templateName)).map((partialName=>(parentage.push("".concat(themeName,"/").concat(partialName)),this.cachePartials(partialName,themeName,parentage))));return await Promise.all(fetchThemAll),this.cachePartialPromises[searchKey].resolve(templateSource)}static processLoadTemplateBuffer(){if(!this.loadTemplateBuffer.length)return;if(this.isLoadingTemplates)return;this.isLoadingTemplates=!0;const templatesToLoad=this.loadTemplateBuffer.slice(),serverRequestsDeferred=_jquery.default.Deferred(),requests=[],templatePromises=templatesToLoad.map((templateData=>{const component=(0,_utils.getNormalisedComponent)(templateData.component),name=templateData.name,searchKey=templateData.searchKey,theme=templateData.theme,templateDeferred=templateData.deferred;let promise=null;if(this.hasTemplateInCache(searchKey))promise=this.getTemplatePromiseFromCache(searchKey);else{requests.push({methodname:"core_output_load_template_with_dependencies",args:{component:component,template:name,themename:theme,lang:config.language}});const index=requests.length-1;promise=serverRequestsDeferred.promise().then((promises=>(templatePromises[searchKey]=promises[index].then((response=>(response.templates.forEach((data=>{data.component=(0,_utils.getNormalisedComponent)(data.component);const tempSearchKey=this.getSearchKey(theme,[data.component,data.name].join("/"));this.setTemplateInCache(tempSearchKey,data.value),config.templaterev>0&&_localstorage.default.set("core_template/".concat(config.templaterev,":").concat(tempSearchKey),data.value)})),response.strings.length&&str.cache_strings(response.strings.map((_ref=>{let{component:component,name:name,value:value}=_ref;return{component:(0,_utils.getNormalisedComponent)(component),key:name,value:value}}))),this.hasTemplateInCache(searchKey)?this.getTemplateFromCache(searchKey):null))),templatePromises[searchKey])))}return promise.then((source=>templateDeferred.resolve(source))).catch((error=>{throw templateDeferred.reject(error),error}))}));requests.length?serverRequestsDeferred.resolve(_ajax.default.call(requests,!0,!1,!1,0,config.templaterev)):serverRequestsDeferred.resolve(),_jquery.default.when.apply(null,templatePromises).then((()=>{this.loadTemplateBuffer.splice(0,templatesToLoad.length),this.isLoadingTemplates=!1,this.processLoadTemplateBuffer()})).catch((()=>{this.loadTemplateBuffer.splice(0,templatesToLoad.length),this.isLoadingTemplates=!1,this.processLoadTemplateBuffer()}))}static getTemplatePromiseFromCache(searchKey){if(searchKey in this.templatePromises)return this.templatePromises[searchKey];if(this.hasTemplateInCache(searchKey)){const templateSource=this.getTemplateFromCache(searchKey);return this.templatePromises[searchKey]=_jquery.default.Deferred().resolve(templateSource).promise(),this.templatePromises[searchKey]}if(config.templaterev<=0)return null;const cached=_localstorage.default.get("core_template/".concat(config.templaterev,":").concat(searchKey));return cached?(this.setTemplateInCache(searchKey,cached),this.templatePromises[searchKey]=_jquery.default.Deferred().resolve(cached).promise(),this.templatePromises[searchKey]):null}}return _exports.default=Loader,_defineProperty(Loader,"loadTemplateBuffer",[]),_defineProperty(Loader,"isLoadingTemplates",!1),_defineProperty(Loader,"templateCache",new Map),_defineProperty(Loader,"templatePromises",{}),_defineProperty(Loader,"cachePartialPromises",[]),_exports.default})); define("core/local/templates/renderer",["exports","core/log","core/truncate","core/user_date","core/pending","core/str","core/icon_system","core/config","core/mustache","./loader","core/utils"],(function(_exports,Log,Truncate,UserDate,_pending,_str,_icon_system,_config,_mustache,_loader,_utils){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Log=_interopRequireWildcard(Log),Truncate=_interopRequireWildcard(Truncate),UserDate=_interopRequireWildcard(UserDate),_pending=_interopRequireDefault(_pending),_icon_system=_interopRequireDefault(_icon_system),_config=_interopRequireDefault(_config),_mustache=_interopRequireDefault(_mustache),_loader=_interopRequireDefault(_loader); /** * Template Renderer Class. * * Note: This class is not intended to be instantiated directly. Instead, use the core/templates module. * * @module core/local/templates/renderer * @copyright 2023 Andrew Lyons * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.3 */ class Renderer{constructor(){_defineProperty(this,"requiredStrings",null),_defineProperty(this,"requiredDates",[]),_defineProperty(this,"requiredJS",null),_defineProperty(this,"currentThemeName",""),_defineProperty(this,"iconSystem",null),this.requiredStrings=[],this.requiredJS=[],this.requiredDates=[],this.currentThemeName=""}static setLoader(loader){this.loader=loader}static getLoader(){return this.loader}async renderIcon(key,component,title){component=(0,_utils.getNormalisedComponent)(component),await this.setupIconSystem();const template=await Renderer.getLoader().getTemplate(this.iconSystem.getTemplateName(),this.currentThemeName);return this.iconSystem.renderIcon(key,component,title,template)}async setupIconSystem(){return this.iconSystem||(this.iconSystem=await _icon_system.default.instance()),this.iconSystem}pixHelper(context,sectionText,helper){const parts=sectionText.split(",");let key="",component="",text="";parts.length>0&&(key=helper(parts.shift().trim(),context)),parts.length>0&&(component=helper(parts.shift().trim(),context)),parts.length>0&&(text=helper(parts.join(",").trim(),context));const Loader=Renderer.getLoader(),templateName=this.iconSystem.getTemplateName(),searchKey=Loader.getSearchKey(this.currentThemeName,templateName),template=Loader.getTemplateFromCache(searchKey);return component=(0,_utils.getNormalisedComponent)(component),key=key.replace(///gi,"/"),this.iconSystem.renderIcon(key,component,text,template)}jsHelper(context,sectionText,helper){return this.requiredJS.push(helper(sectionText,context)),""}stringHelper(context,sectionText,helper){let parts=sectionText.split(",");const key=parts.length>0?parts.shift().trim():"",component=parts.length>0?(0,_utils.getNormalisedComponent)(parts.shift().trim()):"";let param=parts.length>0?parts.join(",").trim():"";if(""!==param&&(param=helper(param,context)),param.match(/^{\s*"/gm))try{const parsedParam=JSON.parse(param);parsedParam&&"object"==typeof parsedParam&&(param=parsedParam)}catch(err){window.console.warn(err.message)}const index=this.requiredStrings.length;return this.requiredStrings.push({key:key,component:component,param:param}),"[[_s".concat(index,"]]")}cleanStringHelper(context,sectionText,helper){return this.stringHelper(context,sectionText,helper).replace("s","c")}quoteHelper(context,sectionText,helper){let content=helper(sectionText.trim(),context);return content=JSON.stringify(content),content=content.replace(/([{}]{2,3})/g,"{{=<% %>=}}$1<%={{ }}=%>"),content}shortenTextHelper(context,sectionText,helper){const parts=sectionText.match(/(.*?),(.*)/),length=parts[1].trim(),content=helper(parts[2].trim(),context);return Truncate.truncate(content,{length:length,words:!0,ellipsis:"..."})}userDateHelper(context,sectionText,helper){const parts=sectionText.match(/(.*?),(.*)/),timestamp=helper(parts[1].trim(),context),format=helper(parts[2].trim(),context),index=this.requiredDates.length;return this.requiredDates.push({timestamp:timestamp,format:format}),"[[_t_".concat(index,"]]")}addHelperFunction(helperFunction,context){return function(){return function(sectionText,helper){const originalHelpers=Renderer.disallowedNestedHelpers.reduce(((carry,name)=>(context.hasOwnProperty(name)&&(carry[name]=context[name]),carry)),{});Renderer.disallowedNestedHelpers.forEach((helperName=>{context[helperName]=()=>""}));const result=helperFunction.apply(this,[context,sectionText,helper]);for(const name in originalHelpers)context[name]=originalHelpers[name];return result}.bind(this)}.bind(this)}addHelpers(context,themeName){this.currentThemeName=themeName,this.requiredStrings=[],this.requiredJS=[],context.uniqid=Renderer.uniqInstances++,context.str=this.addHelperFunction(this.stringHelper,context),context.cleanstr=this.addHelperFunction(this.cleanStringHelper,context),context.pix=this.addHelperFunction(this.pixHelper,context),context.js=this.addHelperFunction(this.jsHelper,context),context.quote=this.addHelperFunction(this.quoteHelper,context),context.shortentext=this.addHelperFunction(this.shortenTextHelper,context),context.userdate=this.addHelperFunction(this.userDateHelper,context),context.globals={config:_config.default},context.currentTheme=themeName}getJS(){return this.requiredJS.join(";\n")}treatStringsInContent(content,stringMap){const stringPattern=/(?\[\[_(?[cs])(?\d+)\]\])/g,getUpdatedString=_ref=>{let{placeholder:placeholder,stringType:stringType,stringIndex:stringIndex}=_ref;if(stringMap.has(placeholder))return stringMap.get(placeholder);if("c"===stringType){const uncleanString=stringMap.get("[[_s".concat(stringIndex,"]]"));if(uncleanString)return stringMap.set(placeholder,_mustache.default.escape(uncleanString)),stringMap.get(placeholder)}return Log.debug("Could not find string for pattern ".concat(placeholder)),""};let updatedContent=content,placeholderFound=!0;for(;placeholderFound;){let match,result=[],lastIndex=0;for(placeholderFound=!1;null!==(match=stringPattern.exec(updatedContent));)placeholderFound=!0,result.push(updatedContent.slice(lastIndex,match.index)),result.push(getUpdatedString(match.groups)),lastIndex=match.index+match[0].length;result.push(updatedContent.slice(lastIndex)),updatedContent=result.join("")}return updatedContent}treatDatesInContent(content,dates){return dates.forEach(((date,index)=>{content=content.replace(new RegExp("\\[\\[_t_".concat(index,"\\]\\]"),"g"),date)})),content}async doRender(templateSourcePromise,context,themeName){this.currentThemeName=themeName;const iconTemplate=this.iconSystem.getTemplateName(),pendingPromise=new _pending.default("core/templates:doRender"),[templateSource]=await Promise.all([templateSourcePromise,Renderer.getLoader().getTemplate(iconTemplate,themeName)]),templateContext={...context};this.addHelpers(templateContext,themeName);const renderedContent=await _mustache.default.render(templateSource,templateContext,(partialName=>Renderer.getLoader().partialHelper(partialName,themeName))),{html:html,js:js}=await this.processRenderedContent(renderedContent);return pendingPromise.resolve(),{html:html,js:js}}async processRenderedContent(renderedContent){let html=renderedContent.trim(),js=this.getJS();if(this.requiredStrings.length>0){const stringMap=new Map((await(0,_str.getStrings)(this.requiredStrings)).map(((string,index)=>["[[_s".concat(index,"]]"),string])));this.requiredDates=this.requiredDates.map(function(date){return{timestamp:this.treatStringsInContent(date.timestamp,stringMap),format:this.treatStringsInContent(date.format,stringMap)}}.bind(this)),html=this.treatStringsInContent(html,stringMap),js=this.treatStringsInContent(js,stringMap)}if(this.requiredDates.length>0){const dates=await UserDate.get(this.requiredDates);html=this.treatDatesInContent(html,dates),js=this.treatDatesInContent(js,dates)}return{html:html,js:js}}async render(templateName){let context=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},themeName=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_config.default.theme;this.currentThemeName=themeName,await this.setupIconSystem();const templateSource=Renderer.getLoader().cachePartials(templateName,themeName);return this.doRender(templateSource,context,themeName)}}return _exports.default=Renderer,_defineProperty(Renderer,"uniqInstances",0),_defineProperty(Renderer,"loadTemplateBuffer",[]),_defineProperty(Renderer,"isLoadingTemplates",!1),_defineProperty(Renderer,"disallowedNestedHelpers",["js"]),_defineProperty(Renderer,"templateCache",{}),_defineProperty(Renderer,"templatePromises",{}),_defineProperty(Renderer,"loader",_loader.default),_exports.default})); /** * Simple API for set/get to localstorage, with cacherev expiration. * * @module core/localstorage * @class localstorage * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 2.9 */ define("core/localstorage",["core/config","core/storagewrapper"],(function(config,StorageWrapper){var storage=new StorageWrapper(window.localStorage);return{get:function(key){return storage.get(key)},set:function(key,value){return storage.set(key,value)},clean:function(){return storage.clean()}}})); /** * This is an empty module, that is required before all other modules. * Because every module is returned from a request for any other module, this * forces the loading of all modules with a single request. * * @module core/log * @copyright 2015 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/log",["core/loglevel"],(function(log){var originalFactory=log.methodFactory;return log.methodFactory=function(methodName,logLevel){var rawMethod=originalFactory(methodName,logLevel);return function(message,source){rawMethod(source?source+": "+message:message)}},log.setConfig=function(config){void 0!==config.level&&log.setLevel(config.level)},log})); var root,definition;root=window,definition=function(){var noop=function(){},isIE="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),logMethods=["trace","debug","info","warn","error"],_loggersByName={},defaultLogger=null;function bindMethod(obj,methodName){var method=obj[methodName];if("function"==typeof method.bind)return method.bind(obj);try{return Function.prototype.bind.call(method,obj)}catch(e){return function(){return Function.prototype.apply.apply(method,[obj,arguments])}}}function traceForIE(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function realMethod(methodName){return"debug"===methodName&&(methodName="log"),"undefined"!=typeof console&&("trace"===methodName&&isIE?traceForIE:void 0!==console[methodName]?bindMethod(console,methodName):void 0!==console.log?bindMethod(console,"log"):noop)}function replaceLoggingMethods(){for(var level=this.getLevel(),i=0;i=0&&level<=self.levels.SILENT)return level;throw new TypeError("log.setLevel() called with invalid level: "+input)}"string"==typeof name?storageKey+=":"+name:"symbol"==typeof name&&(storageKey=void 0),self.name=name,self.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},self.methodFactory=factory||defaultMethodFactory,self.getLevel=function(){return null!=userLevel?userLevel:null!=defaultLevel?defaultLevel:inheritedLevel},self.setLevel=function(level,persist){return userLevel=normalizeLevel(level),!1!==persist&&function(levelNum){var levelName=(logMethods[levelNum]||"silent").toUpperCase();if("undefined"!=typeof window&&storageKey){try{return void(window.localStorage[storageKey]=levelName)}catch(ignore){}try{window.document.cookie=encodeURIComponent(storageKey)+"="+levelName+";"}catch(ignore){}}}(userLevel),replaceLoggingMethods.call(self)},self.setDefaultLevel=function(level){defaultLevel=normalizeLevel(level),getPersistedLevel()||self.setLevel(level,!1)},self.resetLevel=function(){userLevel=null,function(){if("undefined"!=typeof window&&storageKey){try{window.localStorage.removeItem(storageKey)}catch(ignore){}try{window.document.cookie=encodeURIComponent(storageKey)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(ignore){}}}(),replaceLoggingMethods.call(self)},self.enableAll=function(persist){self.setLevel(self.levels.TRACE,persist)},self.disableAll=function(persist){self.setLevel(self.levels.SILENT,persist)},self.rebuild=function(){if(defaultLogger!==self&&(inheritedLevel=normalizeLevel(defaultLogger.getLevel())),replaceLoggingMethods.call(self),defaultLogger===self)for(var childName in _loggersByName)_loggersByName[childName].rebuild()},inheritedLevel=normalizeLevel(defaultLogger?defaultLogger.getLevel():"WARN");var initialLevel=getPersistedLevel();null!=initialLevel&&(userLevel=normalizeLevel(initialLevel)),replaceLoggingMethods.call(self)}(defaultLogger=new Logger).getLogger=function(name){if("symbol"!=typeof name&&"string"!=typeof name||""===name)throw new TypeError("You must supply a name when creating a logger.");var logger=_loggersByName[name];return logger||(logger=_loggersByName[name]=new Logger(name,defaultLogger.methodFactory)),logger};var _log="undefined"!=typeof window?window.log:void 0;return defaultLogger.noConflict=function(){return"undefined"!=typeof window&&window.log===defaultLogger&&(window.log=_log),defaultLogger},defaultLogger.getLoggers=function(){return _loggersByName},defaultLogger.default=defaultLogger,defaultLogger},"function"==typeof define&&define.amd?define("core/loglevel",definition):"object"==typeof module&&module.exports?module.exports=definition():root.log=definition(); define("core/menu_navigation",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0; /** * Keyboard initialization for a given html node. * * @module core/menu_navigation * @copyright 2021 Moodle * @author Mathew May * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const SELECTORS_menuitem='[role="menuitem"]',SELECTORS_tab='[role="tab"]',SELECTORS_dropdowntoggle='[data-bs-toggle="dropdown"]';let openDropdownNode=null;const clickErrorHandler=(item,fallback)=>null!==item?item:fallback,menuItemHelper=src=>{let parent;if(!src.dataset.disableactive){if(src.classList.contains("dropdown-item")){parent=src.closest(".dropdown-menu");const dropDownToggle=document.getElementById(parent.getAttribute("aria-labelledby"));dropDownToggle.classList.add("active"),dropDownToggle.setAttribute("tabindex",0)}else{if(!src.matches("".concat(SELECTORS_tab,",").concat(SELECTORS_menuitem))||src.matches(SELECTORS_dropdowntoggle))return;parent=src.parentElement.parentElement.querySelector(".dropdown-menu")}Array.prototype.forEach.call(parent.children,(node=>{const menuItem=node.querySelector(SELECTORS_menuitem);null!==menuItem&&(menuItem.classList.remove("active"),menuItem.removeAttribute("aria-current"))})),"menuitem"===src.getAttribute("role")&&src.setAttribute("aria-current","true")}},keyboardListenerEvents=e=>{const src=e.srcElement,firstNode=e.currentTarget.firstElementChild,lastNode=findUsableLastNode(e.currentTarget);if(src.classList.contains("dropdown-item"))"ArrowRight"!=e.key&&"ArrowLeft"!=e.key||(e.preventDefault(),null!==openDropdownNode&&openDropdownNode.parentElement.click())," "!=e.key&&"Enter"!=e.key||(e.preventDefault(),menuItemHelper(src),src.parentElement.classList.contains("dropdown")||src.click());else{const rtl=window.right_to_left(),arrowNext=rtl?"ArrowLeft":"ArrowRight",arrowPrevious=rtl?"ArrowRight":"ArrowLeft";"menuitem"===src.getAttribute("role")&&(e.key==arrowNext&&(e.preventDefault(),setFocusNext(src,firstNode)),e.key==arrowPrevious&&(e.preventDefault(),setFocusPrev(src,lastNode)),"ArrowUp"!=e.key&&"ArrowDown"!=e.key||(openDropdownNode=src,e.preventDefault()),"Home"==e.key&&(e.preventDefault(),setFocusHomeEnd(firstNode)),"End"==e.key&&(e.preventDefault(),setFocusHomeEnd(lastNode)))," "!=e.key&&"Enter"!=e.key||(e.preventDefault(),src.parentElement.classList.contains("dropdown")||src.click())}},clickListenerEvents=e=>{const src=e.srcElement;menuItemHelper(src)};_exports.default=elementRoot=>{elementRoot.removeEventListener("keydown",keyboardListenerEvents),elementRoot.removeEventListener("click",clickListenerEvents),elementRoot.addEventListener("keydown",keyboardListenerEvents),elementRoot.addEventListener("click",clickListenerEvents)};const setFocusNext=(currentNode,firstNode)=>{const listElement=currentNode.parentElement,nextListItem=(el=>{do{el=el.nextElementSibling}while(el&&!el.offsetHeight);return el})(listElement),nodeToSelect=clickErrorHandler(nextListItem,firstNode),itemSelector="tablist"===listElement.parentElement.getAttribute("role")?SELECTORS_tab:SELECTORS_menuitem;nodeToSelect.querySelector(itemSelector).focus()},setFocusPrev=(currentNode,lastNode)=>{const listElement=currentNode.parentElement,nextListItem=(el=>{do{el=el.previousElementSibling}while(el&&!el.offsetHeight);return el})(listElement),nodeToSelect=clickErrorHandler(nextListItem,lastNode),itemSelector="tablist"===listElement.parentElement.getAttribute("role")?SELECTORS_tab:SELECTORS_menuitem;nodeToSelect.querySelector(itemSelector).focus()},setFocusHomeEnd=node=>{node.querySelector(SELECTORS_menuitem).focus()},findUsableLastNode=elementRoot=>{if(elementRoot.lastElementChild.classList.contains("d-none")){const nodesToUse=Array.prototype.map.call(elementRoot.children,(node=>node)).reverse().filter((node=>{if(!node.classList.contains("d-none"))return node}));return 0!==nodesToUse.length?nodesToUse[0]:elementRoot.firstElementChild}return elementRoot.lastElementChild};return _exports.default})); define("core/modal",["exports","jquery","core/templates","core/notification","core/key_codes","core/modal_backdrop","core/modal_events","core/modal_registry","core/pending","core/custom_interaction_events","core_filters/events","core/local/aria/focuslock","core/aria","core/fullscreen","./toast","core/event_dispatcher"],(function(_exports,_jquery,Templates,Notification,KeyCodes,_modal_backdrop,_modal_events,ModalRegistry,_pending,CustomEvents,FilterEvents,FocusLock,Aria,Fullscreen,_toast,_event_dispatcher){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=_interopRequireDefault(_jquery),Templates=_interopRequireWildcard(Templates),Notification=_interopRequireWildcard(Notification),KeyCodes=_interopRequireWildcard(KeyCodes),_modal_backdrop=_interopRequireDefault(_modal_backdrop),_modal_events=_interopRequireDefault(_modal_events),ModalRegistry=_interopRequireWildcard(ModalRegistry),_pending=_interopRequireDefault(_pending),CustomEvents=_interopRequireWildcard(CustomEvents),FilterEvents=_interopRequireWildcard(FilterEvents),FocusLock=_interopRequireWildcard(FocusLock),Aria=_interopRequireWildcard(Aria),Fullscreen=_interopRequireWildcard(Fullscreen);const SELECTORS_CONTAINER='[data-region="modal-container"]',SELECTORS_MODAL='[data-region="modal"]',SELECTORS_HEADER='[data-region="header"]',SELECTORS_TITLE='[data-region="title"]',SELECTORS_BODY='[data-region="body"]',SELECTORS_FOOTER='[data-region="footer"]',SELECTORS_HIDE='[data-action="hide"]',SELECTORS_DIALOG="[role=dialog]",SELECTORS_FORM="form",SELECTORS_MENU_BAR="[role=menubar]",SELECTORS_HAS_Z_INDEX=".moodle-has-zindex",TEMPLATES_LOADING="core/loading",TEMPLATES_BACKDROP="core/modal_backdrop";class Modal{get root(){return(0,_jquery.default)(this._root.filter(SELECTORS_CONTAINER))}set root(root){this._root=root}constructor(root){this.root=(0,_jquery.default)(root),this.modal=this.root.find(SELECTORS_MODAL),this.header=this.modal.find(SELECTORS_HEADER),this.headerPromise=_jquery.default.Deferred(),this.title=this.header.find(SELECTORS_TITLE),this.titlePromise=_jquery.default.Deferred(),this.body=this.modal.find(SELECTORS_BODY),this.bodyPromise=_jquery.default.Deferred(),this.footer=this.modal.find(SELECTORS_FOOTER),this.footerPromise=_jquery.default.Deferred(),this.hiddenSiblings=[],this.isAttached=!1,this.bodyJS=null,this.footerJS=null,this.modalCount=Modal.modalCounter++,this.attachmentPoint=document.createElement("div"),document.body.append(this.attachmentPoint),this.focusOnClose=null,this.templateJS=null,this.root.is(SELECTORS_CONTAINER)||Notification.exception({message:"Element is not a modal container"}),this.modal.length||Notification.exception({message:"Container does not contain a modal"}),this.header.length||Notification.exception({message:"Modal is missing a header region"}),this.title.length||Notification.exception({message:"Modal header is missing a title region"}),this.body.length||Notification.exception({message:"Modal is missing a body region"}),this.footer.length||Notification.exception({message:"Modal is missing a footer region"}),this.registerEventListeners()}static registerModalType(){if(!this.TYPE)throw new Error("Unknown modal type",this);if(!this.TEMPLATE)throw new Error("Unknown modal template",this);ModalRegistry.register(this.TYPE,this,this.TEMPLATE)}static async create(){let modalConfig=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const pendingModalPromise=new _pending.default("core/modal_factory:create");modalConfig.type=this.TYPE;const templateName=this._getTemplateName(modalConfig),templateContext=modalConfig.templateContext||{},{html:html,js:js}=await Templates.renderForPromise(templateName,templateContext),modal=new this(html);return js&&modal.setTemplateJS(js),modal.configure(modalConfig),pendingModalPromise.resolve(),modal}static _getTemplateName(modalConfig){if(modalConfig.template)return modalConfig.template;if(this.TEMPLATE)return this.TEMPLATE;if(ModalRegistry.has(this.TYPE)){window.console.warning("Use of core/modal_registry is deprecated. Please define your modal template in a new static TEMPLATE property on your modal class.");return ModalRegistry.get(this.TYPE).template}throw new Error("Unable to determine template name for modal ".concat(this.TYPE))}configure(){let{show:show=!1,large:large=!1,isVerticallyCentered:isVerticallyCentered=!1,removeOnClose:removeOnClose=!1,scrollable:scrollable=!0,returnElement:returnElement,title:title,body:body,footer:footer,buttons:buttons={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};large&&this.setLarge(),isVerticallyCentered&&this.setVerticallyCentered(),this.setRemoveOnClose(removeOnClose),this.setReturnElement(returnElement),this.setScrollable(scrollable),void 0!==title&&this.setTitle(title),void 0!==body&&this.setBody(body),void 0!==footer&&this.setFooter(footer),Object.entries(buttons).forEach((_ref=>{let[key,value]=_ref;return this.setButtonText(key,value)})),show&&this.show()}attachToDOM(){this.getAttachmentPoint().append(this._root),this.isAttached||(FocusLock.trapFocus(this.root[0]),this.templateJS&&(Templates.runTemplateJS(this.templateJS),this.templateJS=null),this.bodyJS&&(Templates.runTemplateJS(this.bodyJS),this.bodyJS=null),this.footerJS&&(Templates.runTemplateJS(this.footerJS),this.footerJS=null),this.isAttached=!0)}countOtherVisibleModals(){let count=0;return(0,_jquery.default)("body").find(SELECTORS_CONTAINER).each(((index,element)=>{element=(0,_jquery.default)(element),!this.root.is(element)&&element.hasClass("show")&&count++})),count}getBackdrop(){return Modal.backdropPromise||(Modal.backdropPromise=Templates.render(TEMPLATES_BACKDROP,{}).then((html=>new _modal_backdrop.default((0,_jquery.default)(html)))).catch(Notification.exception)),Modal.backdropPromise}getRoot(){return this.root}getModal(){return this.modal}getTitle(){return this.title}getBody(){return this.body}getFooter(){return this.footer}getTitlePromise(){return this.titlePromise}getBodyPromise(){return this.bodyPromise}getFooterPromise(){return this.footerPromise}getModalCount(){return this.modalCount}setTitle(value){const title=this.getTitle();this.titlePromise=_jquery.default.Deferred(),this.asyncSet(value,title.html.bind(title)).then((()=>{this.titlePromise.resolve(title)})).catch(Notification.exception)}setBody(value){this.bodyPromise=_jquery.default.Deferred();const body=this.getBody();if("string"==typeof value)body.html(value),FilterEvents.notifyFilterContentUpdated(body),this.getRoot().trigger(_modal_events.default.bodyRendered,this),this.bodyPromise.resolve(body);else{const modalPromise=new _pending.default("amd-modal-js-pending-id-".concat(this.getModalCount()));let contentPromise=null;if(body.css("overflow","hidden"),"pending"==(value=_jquery.default.when(value)).state()){let height=body.innerHeight();height<100&&(height=100),body.animate({height:"".concat(height,"px")},150),body.html(""),contentPromise=Templates.render(TEMPLATES_LOADING,{}).then((html=>{const loadingIcon=(0,_jquery.default)(html).hide();return body.html(loadingIcon),loadingIcon.fadeIn(150),_jquery.default.when(loadingIcon.promise(),value)})).then((loadingIcon=>loadingIcon.fadeOut(100).promise())).then((()=>value))}else contentPromise=value;contentPromise.then(((html,js)=>{let result=null;if(this.isVisible()){body.css("opacity",0);const currentHeight=body.innerHeight();body.html(html),body.css("height","");const newHeight=body.innerHeight();body.css("height","".concat(currentHeight,"px")),result=body.animate({height:"".concat(newHeight,"px"),opacity:1},{duration:150,queue:!1}).promise()}else body.html(html);return js&&(this.isAttached?Templates.runTemplateJS(js):this.bodyJS=js),result})).then((result=>(FilterEvents.notifyFilterContentUpdated(body),this.getRoot().trigger(_modal_events.default.bodyRendered,this),(0,_event_dispatcher.dispatchEvent)("core/modal:bodyRendered",this,this.modal[0]),result))).then((()=>{this.bodyPromise.resolve(body)})).catch(Notification.exception).always((()=>{body.css("height",""),body.css("overflow",""),body.css("opacity",""),modalPromise.resolve()}))}}setBodyContent(promise){return promise.then((_ref2=>{let{html:html,js:js}=_ref2;return this.setBody(_jquery.default.when(html,js))})).catch((exception=>{throw this.hide(),exception}))}setFooter(value){this.showFooter(),this.footerPromise=_jquery.default.Deferred();const footer=this.getFooter();"string"==typeof value?(footer.html(value),this.footerPromise.resolve(footer)):Templates.render(TEMPLATES_LOADING,{}).then((html=>(footer.html(html),value))).then(((html,js)=>(footer.html(html),js&&(this.isAttached?Templates.runTemplateJS(js):this.footerJS=js),footer))).then((footer=>{this.footerPromise.resolve(footer),this.showFooter()})).catch(Notification.exception)}hasFooterContent(){return!!this.getFooter().children().length}hideFooter(){this.getFooter().addClass("hidden")}showFooter(){this.getFooter().removeClass("hidden")}setLarge(){this.isLarge()||this.getModal().addClass("modal-lg")}setVerticallyCentered(){this.isVerticallyCentered()||this.getModal().addClass("modal-dialog-centered")}isLarge(){return this.getModal().hasClass("modal-lg")}isVerticallyCentered(){return this.getModal().hasClass("modal-dialog-centered")}setSmall(){this.isSmall()||this.getModal().removeClass("modal-lg")}isSmall(){return!this.getModal().hasClass("modal-lg")}setScrollable(value){value?this.getModal()[0].classList.add("modal-dialog-scrollable"):this.getModal()[0].classList.remove("modal-dialog-scrollable")}calculateZIndex(){const items=(0,_jquery.default)("".concat(SELECTORS_DIALOG,", ").concat(SELECTORS_MENU_BAR,", ").concat(SELECTORS_HAS_Z_INDEX));let zIndex=parseInt(this.root.css("z-index"));return items.each(((index,item)=>{if(!(item=(0,_jquery.default)(item)).is(":visible"))return;const itemZIndex=item.css("z-index")?parseInt(item.css("z-index")):0;itemZIndex>zIndex&&(zIndex=itemZIndex)})),zIndex}isVisible(){return this.root.hasClass("show")}hasFocus(){const target=(0,_jquery.default)(document.activeElement);return this.root.is(target)||this.root.has(target).length}hasTransitions(){return this.getRoot().hasClass("fade")}getAttachmentPoint(){return(0,_jquery.default)(Fullscreen.getElement()||this.attachmentPoint)}show(){if(this.isVisible())return _jquery.default.Deferred().resolve();const pendingPromise=new _pending.default("core/modal:show");return this.hasFooterContent()?this.showFooter():this.hideFooter(),this.attachToDOM(),!this.focusOnClose&&document.activeElement&&(this.focusOnClose=document.activeElement),this.getBackdrop().then((backdrop=>{const newIndex=this.calculateZIndex()+2,newBackdropIndex=newIndex-1;this.root.css("z-index",newIndex),backdrop.setZIndex(newBackdropIndex),backdrop.show(),this.root.removeClass("hide").addClass("show"),this.accessibilityShow(),this.getModal().focus(),(0,_jquery.default)("body").addClass("modal-open");const scrollbarWidth=window.innerWidth-document.documentElement.clientWidth;(0,_jquery.default)("body").css({overflow:"hidden",paddingRight:"".concat(scrollbarWidth,"px")}),this.root.trigger(_modal_events.default.shown,this),(0,_event_dispatcher.dispatchEvent)("core/modal:shown",this,this.modal[0])})).then(pendingPromise.resolve)}hideIfNotForm(){0==this.modal.find(SELECTORS_FORM).length&&this.hide()}hide(){this.getBackdrop().done((backdrop=>{FocusLock.untrapFocus(),this.countOtherVisibleModals()||(backdrop.hide(),(0,_jquery.default)("body").removeClass("modal-open"),(0,_jquery.default)("body").css({overflow:"",paddingRight:""}));const currentIndex=parseInt(this.root.css("z-index"));this.root.css("z-index",""),backdrop.setZIndex(currentIndex-3),this.accessibilityHide(),this.hasTransitions()?this.getRoot().one("transitionend webkitTransitionEnd oTransitionEnd",(()=>{this.getRoot().removeClass("show").addClass("hide")})):this.getRoot().removeClass("show").addClass("hide"),(0,_jquery.default)(document.body).find(this.getRoot()).length&&(0,_jquery.default)(document.body).append(this.getRoot()),this.getRoot().find('[data-bs-toggle="popover"]').each((function(){var _document$getElementB;null===(_document$getElementB=document.getElementById(this.getAttribute("aria-describedby")))||void 0===_document$getElementB||_document$getElementB.remove()})),this.root.trigger(_modal_events.default.hidden,this)}))}destroy(){this.hide(),(0,_toast.removeToastRegion)(this.getBody().get(0)),this.root.remove(),this.root.trigger(_modal_events.default.destroyed,this),this.attachmentPoint.remove()}accessibilityShow(){Aria.unhide(this.root.get()),Aria.hideSiblings(this.root.get()[0])}accessibilityHide(){Aria.unhideSiblings(this.root.get()[0]),Aria.hide(this.root.get())}registerEventListeners(){this.getRoot().on("keydown",(e=>{this.isVisible()&&e.keyCode==KeyCodes.escape&&(this.removeOnClose?this.destroy():this.hide())})),this.getRoot().click((e=>{if(!(0,_jquery.default)(e.target).closest(SELECTORS_MODAL).length&&(0,_jquery.default)(e.target).closest(SELECTORS_CONTAINER).length){const outsideClickEvent=_jquery.default.Event(_modal_events.default.outsideClick);this.getRoot().trigger(outsideClickEvent,this),outsideClickEvent.isDefaultPrevented()||this.hideIfNotForm()}})),CustomEvents.define(this.getModal(),[CustomEvents.events.activate]),this.getModal().on(CustomEvents.events.activate,SELECTORS_HIDE,((e,data)=>{this.removeOnClose?this.destroy():this.hide(),data.originalEvent.preventDefault()})),this.getRoot().on(_modal_events.default.hidden,(()=>{this.focusOnClose&&this.focusOnClose.focus()}))}registerCloseOnCancel(){this.getModal().on(CustomEvents.events.activate,this.getActionSelector("cancel"),((e,data)=>{const cancelEvent=_jquery.default.Event(_modal_events.default.cancel);this.getRoot().trigger(cancelEvent,this),cancelEvent.isDefaultPrevented()||(data.originalEvent.preventDefault(),this.removeOnClose?this.destroy():this.hide())}))}registerCloseOnSave(){this.getModal().on(CustomEvents.events.activate,this.getActionSelector("save"),((e,data)=>{const saveEvent=_jquery.default.Event(_modal_events.default.save);this.getRoot().trigger(saveEvent,this),saveEvent.isDefaultPrevented()||(data.originalEvent.preventDefault(),this.removeOnClose?this.destroy():this.hide())}))}registerCloseOnDelete(){this.getModal().on(CustomEvents.events.activate,this.getActionSelector("delete"),((e,data)=>{const deleteEvent=_jquery.default.Event(_modal_events.default.delete);this.getRoot().trigger(deleteEvent,this),deleteEvent.isDefaultPrevented()||(data.originalEvent.preventDefault(),this.removeOnClose?this.destroy():this.hide())}))}asyncSet(value,setFunction){return(value=>value instanceof Promise?_jquery.default.when(value):"object"==typeof value&&value.hasOwnProperty("then")?value:_jquery.default.Deferred().resolve(value))(value).then((content=>setFunction(content))).catch(Notification.exception)}setButtonText(action,value){const button=this.getFooter().find(this.getActionSelector(action));if(!button)throw new Error("Unable to find the '"+action+"' button");return this.asyncSet(value,button.text.bind(button))}getActionSelector(action){return"[data-action='"+action+"']"}setRemoveOnClose(remove){this.removeOnClose=remove}setReturnElement(element){this.focusOnClose=element}setButtonDisabled(action,disabled){const button=this.getFooter().find(this.getActionSelector(action));if(!button)throw new Error("Unable to find the '"+action+"' button");disabled?button.attr("disabled",""):button.removeAttr("disabled")}setTemplateJS(js){this.templateJS=js}}return _exports.default=Modal,_defineProperty(Modal,"TYPE","default"),_defineProperty(Modal,"TEMPLATE","core/modal"),_defineProperty(Modal,"backdropPromise",null),_defineProperty(Modal,"modalCounter",0),_exports.default})); define("core/modal_backdrop",["exports","jquery","./notification","./fullscreen"],(function(_exports,_jquery,Notification,Fullscreen){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj},Notification=_interopRequireWildcard(Notification),Fullscreen=_interopRequireWildcard(Fullscreen);const SELECTORS_ROOT='[data-region="modal-backdrop"]';return _exports.default=class{constructor(root){_defineProperty(this,"root",null),_defineProperty(this,"isAttached",!1),_defineProperty(this,"attachmentPoint",null),this.root=(0,_jquery.default)(root),this.isAttached=!1,this.attachmentPoint=document.createElement("div"),document.body.append(this.attachmentPoint),this.root.is(SELECTORS_ROOT)||Notification.exception({message:"Element is not a modal backdrop"})}getRoot(){return this.root}getAttachmentPoint(){const fullscreenElement=Fullscreen.getElement();return fullscreenElement&&"html"===fullscreenElement.tagName.toLowerCase()?(0,_jquery.default)(this.attachmentPoint):(0,_jquery.default)(fullscreenElement||this.attachmentPoint)}attachToDOM(){this.getAttachmentPoint().append(this.root),this.isAttached||(this.isAttached=!0)}setZIndex(value){this.root.css("z-index",value)}isVisible(){return this.root.hasClass("show")}hasTransitions(){return this.getRoot().hasClass("fade")}show(){this.isVisible()||(this.attachToDOM(),this.root.removeClass("hide").addClass("show"))}hide(){this.isVisible()&&(this.hasTransitions()?this.getRoot().one("transitionend webkitTransitionEnd oTransitionEnd",(()=>{this.getRoot().removeClass("show").addClass("hide")})):this.getRoot().removeClass("show").addClass("hide"),(0,_jquery.default)(document.body).find(this.getRoot()).length&&(0,_jquery.default)(document.body).append(this.getRoot()))}destroy(){this.root.remove(),this.attachmentPoint.remove()}},_exports.default})); define("core/modal_cancel",["exports","core/modal","core/notification"],(function(_exports,_modal,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=_interopRequireDefault(_modal),_notification=_interopRequireDefault(_notification);class ModalCancel extends _modal.default{constructor(root){super(root),this.getFooter().find(this.getActionSelector("cancel")).length||_notification.default.exception({message:"No cancel button found"})}registerEventListeners(){super.registerEventListeners(),this.registerCloseOnCancel()}}return _exports.default=ModalCancel,_defineProperty(ModalCancel,"TYPE","CANCEL"),_defineProperty(ModalCancel,"TEMPLATE","core/modal_cancel"),ModalCancel.registerModalType(),_exports.default})); define("core/modal_copy_to_clipboard",["exports","core/modal","core/copy_to_clipboard"],(function(_exports,_modal,_copy_to_clipboard){var obj;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=(obj=_modal)&&obj.__esModule?obj:{default:obj};class CopyToClipboardModal extends _modal.default{constructor(){super(...arguments),this.setRemoveOnClose(!0)}registerEventListeners(){super.registerEventListeners(...arguments),this.getRoot().get(0).addEventListener("click",(e=>{e.target.closest('[data-action="copytoclipboard"]')&&this.getRoot().get(0).contains(e.target)&&setTimeout(this.destroy.bind(this))}))}static async create(){let{text:text,useTextArea:useTextArea=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},title=arguments.length>1?arguments[1]:void 0;const modalConfig={templateContext:{text:text,useTextArea:useTextArea}};return title&&(modalConfig.title=title),super.create(modalConfig)}configure(modalConfig){modalConfig.show=!0,modalConfig.removeOnClose=!0,super.configure(modalConfig)}}return _exports.default=CopyToClipboardModal,_defineProperty(CopyToClipboardModal,"TYPE","core/copytoclipboard"),_defineProperty(CopyToClipboardModal,"TEMPLATE","core/modal_copytoclipboard"),CopyToClipboardModal.registerModalType(),_exports.default})); define("core/modal_delete_cancel",["exports","core/modal","core/notification"],(function(_exports,_modal,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=_interopRequireDefault(_modal),_notification=_interopRequireDefault(_notification);class ModalDeleteCancel extends _modal.default{constructor(root){super(root),this.getFooter().find(this.getActionSelector("delete")).length||_notification.default.exception({message:"No delete button found"}),this.getFooter().find(this.getActionSelector("cancel")).length||_notification.default.exception({message:"No cancel button found"})}registerEventListeners(){super.registerEventListeners(),this.registerCloseOnDelete(),this.registerCloseOnCancel()}setFooter(){_notification.default.exception({message:"Can not change the footer of a delete cancel modal"})}setDeleteButtonText(value){return this.setButtonText("delete",value)}}return _exports.default=ModalDeleteCancel,_defineProperty(ModalDeleteCancel,"TYPE","DELETE_CANCEL"),_defineProperty(ModalDeleteCancel,"TEMPLATE","core/modal_delete_cancel"),ModalDeleteCancel.registerModalType(),_exports.default})); define("core/modal_events",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={shown:"modal:shown",hidden:"modal:hidden",destroyed:"modal:destroyed",bodyRendered:"modal:bodyRendered",outsideClick:"modal:outsideClick",save:"modal-save-cancel:save",delete:"modal-delete-cancel:delete",cancel:"modal-save-cancel:cancel"},_exports.default})); define("core/modal_factory",["exports","jquery","core/modal_events","core/modal_registry","core/modal","core/modal_save_cancel","core/modal_delete_cancel","core/modal_cancel","core/local/modal/alert","core/notification","core/custom_interaction_events","core/pending"],(function(_exports,_jquery,_modal_events,ModalRegistry,_modal,_modal_save_cancel,_modal_delete_cancel,_modal_cancel,_alert,Notification,CustomEvents,_pending){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Create a modal. * * @module core/modal_factory * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @deprecated since Moodle 4.3 * @todo Final deprecation in Moodle 4.7/5.2. See MDL-79128/ */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.types=_exports.default=_exports.create=void 0,_jquery=_interopRequireDefault(_jquery),_modal_events=_interopRequireDefault(_modal_events),ModalRegistry=_interopRequireWildcard(ModalRegistry),_modal=_interopRequireDefault(_modal),_modal_save_cancel=_interopRequireDefault(_modal_save_cancel),_modal_delete_cancel=_interopRequireDefault(_modal_delete_cancel),_modal_cancel=_interopRequireDefault(_modal_cancel),_alert=_interopRequireDefault(_alert),Notification=_interopRequireWildcard(Notification),CustomEvents=_interopRequireWildcard(CustomEvents),_pending=_interopRequireDefault(_pending);const types={DEFAULT:"DEFAULT",SAVE_CANCEL:_modal_save_cancel.default.TYPE,DELETE_CANCEL:_modal_delete_cancel.default.TYPE,CANCEL:_modal_cancel.default.TYPE,ALERT:_alert.default.TYPE};_exports.types=types,ModalRegistry.register(types.DEFAULT,_modal.default,_modal.default.TEMPLATE);const create=(modalConfig,triggerElement)=>{window.console.warn("The modal_factory has been deprecated since Moodle 4.3. Please use the create method on your target modal type instead.");const type=modalConfig.type||types.DEFAULT,registryConf=ModalRegistry.get(type);registryConf||Notification.exception({message:"Unable to find modal of type: ".concat(type)});const modal=registryConf.module.create(modalConfig);return triggerElement&&(window.console.warn("The triggerElement feature of the modal_factory has been deprecated. Please use event listeners instead."),((modalPromise,triggerElement,modalConfig)=>{let actualTriggerElement=null;const hasPreShowCallback="function"==typeof modalConfig.preShowCallback,triggeredCallback=(e,data)=>{const pendingPromise=new _pending.default("core/modal_factory:setUpTrigger:triggeredCallback");actualTriggerElement=(0,_jquery.default)(e.currentTarget),modalPromise.then((function(modal){return hasPreShowCallback&&modalConfig.preShowCallback(actualTriggerElement,modal),modal.show(),modal})).then(pendingPromise.resolve),data.originalEvent.preventDefault()};if(Array.isArray(triggerElement)){const selector=triggerElement[1];triggerElement=triggerElement[0],CustomEvents.define(triggerElement,[CustomEvents.events.activate]),triggerElement.on(CustomEvents.events.activate,selector,triggeredCallback)}else CustomEvents.define(triggerElement,[CustomEvents.events.activate]),triggerElement.on(CustomEvents.events.activate,triggeredCallback);modalPromise.then((function(modal){return modal.getRoot().on(_modal_events.default.hidden,(function(){null!==actualTriggerElement&&actualTriggerElement.focus()})),modal}))})(modal,triggerElement,modalConfig)),_jquery.default.when(new Promise(((resolve,reject)=>{modal.then(resolve).catch(reject)})))};_exports.create=create;var _default={create:create,types:types};return _exports.default=_default,_exports.default})); define("core/modal_registry",["exports","core/notification","core/prefetch"],(function(_exports,Notification,Prefetch){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj} /** * A registry for the different types of modal. * * @module core/modal_registry * @class modal_registry * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.register=_exports.get=_exports.default=void 0,Notification=_interopRequireWildcard(Notification),Prefetch=_interopRequireWildcard(Prefetch);const registry=new Map,get=type=>registry.get(type);_exports.get=get;const register=(type,module,template)=>{const existing=get(type);existing&&existing.module!==module&&Notification.exception({message:"Modal of type '".concat(type,"' is already registered")}),module&&"function"==typeof module||Notification.exception({message:"You must provide a modal module"}),template||Notification.exception({message:"You must provide a modal template"}),registry.set(type,{module:module,template:template}),Prefetch.prefetchTemplate(template)};_exports.register=register;var _default={register:register,get:get};return _exports.default=_default,_exports.default})); define("core/modal_save_cancel",["exports","core/modal","core/notification"],(function(_exports,_modal,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=_interopRequireDefault(_modal),_notification=_interopRequireDefault(_notification);class ModalSaveCancel extends _modal.default{constructor(root){super(root),this.getFooter().find(this.getActionSelector("save")).length||_notification.default.exception({message:"No save button found"}),this.getFooter().find(this.getActionSelector("cancel")).length||_notification.default.exception({message:"No cancel button found"})}registerEventListeners(){super.registerEventListeners(),this.registerCloseOnSave(),this.registerCloseOnCancel()}setFooter(){_notification.default.exception({message:"Can not change the footer of a save cancel modal"})}setSaveButtonText(value){return this.setButtonText("save",value)}}return _exports.default=ModalSaveCancel,_defineProperty(ModalSaveCancel,"TYPE","SAVE_CANCEL"),_defineProperty(ModalSaveCancel,"TEMPLATE","core/modal_save_cancel"),ModalSaveCancel.registerModalType(),_exports.default})); define("core/moodlenet/authorize",["exports","core/notification","core/moodlenet/service","core/moodlenet/send_resource"],(function(_exports,_notification,MoodleNetService,_send_resource){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.handleAuthorization=void 0,MoodleNetService=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj} /** * MoodleNet authorization. * * @module core/moodlenet/authorize * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.3 */(MoodleNetService);const handleAuthorization=(issuerId,courseId,resourceId,shareFormat)=>MoodleNetService.authorizationCheck(issuerId,courseId).then((async data=>data.status?(0,_send_resource.sendToMoodleNet)(issuerId,resourceId,shareFormat):(window.moodleNetAuthorize=(error,errorDescription)=>{""===error?handleAuthorization(issuerId,courseId,resourceId,shareFormat):"access_denied"!==error&&(0,_notification.alert)("Authorization error","Error: "+error+"

Error description: "+errorDescription,"Cancel")},window.open(data.loginurl,"moodlenet_auth","location=0,status=0,width=".concat(550,",height=").concat(550,",scrollbars=yes"))))).catch(_notification.exception);_exports.handleAuthorization=handleAuthorization})); define("core/moodlenet/events",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={MOODLENET_SHARE_STARTED:"moodlenet-share-started"},_exports.default})); define("core/moodlenet/mutations",["exports","core_courseformat/local/courseeditor/mutations","core_courseformat/courseeditor","core_courseformat/local/content/actions","core/pubsub","core/moodlenet/send_resource","core/moodlenet/events"],(function(_exports,_mutations,_courseeditor,_actions,_pubsub,_send_resource,_events){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_mutations=_interopRequireDefault(_mutations),_actions=_interopRequireDefault(_actions),_events=_interopRequireDefault(_events);class MoodleNetMutations extends _mutations.default{constructor(){var obj,key,value;super(...arguments),value=async function(stateManager,cmIds){0!=cmIds.length&&(this.cmLock(stateManager,cmIds,!0),(0,_send_resource.handleModal)("partial",cmIds),this.cmLock(stateManager,cmIds,!1),(0,_pubsub.subscribe)(_events.default.MOODLENET_SHARE_STARTED,(()=>{this.bulkReset(stateManager)})))},(key="shareToMoodleNet")in(obj=this)?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}}_exports.init=()=>{(0,_courseeditor.getCurrentCourseEditor)().addMutations(new MoodleNetMutations),_actions.default.addActions({cmShareToMoodleNet:"shareToMoodleNet"})}})); define("core/moodlenet/oauth2callback",["exports","core/prefetch","core/notification","core/str"],(function(_exports,_prefetch,_notification,_str){var obj; /** * A module to handle the OAuth2 callback for MoodleNet. * * @module core/moodlenet/oauth2callback * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.2 */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_prefetch=(obj=_prefetch)&&obj.__esModule?obj:{default:obj};_exports.init=(error,errorDescription)=>{_prefetch.default.prefetchStrings("moodle",["moodlenet:sharefailtitle","error"]),((error,errorDescription)=>{window.opener?(window.opener.moodleNetAuthorize(error,errorDescription),setTimeout((()=>{window.close()}),300)):(0,_notification.alert)((0,_str.getString)("error","moodle"),(0,_str.getString)("moodlenet:sharefailtitle","moodle"))})(error,errorDescription)}})); define("core/moodlenet/send_activity_modal",["exports","core/modal"],(function(_exports,_modal){var obj;function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_modal=(obj=_modal)&&obj.__esModule?obj:{default:obj};class SendActivityModal extends _modal.default{registerEventListeners(){super.registerEventListeners(),this.registerCloseOnSave(),this.registerCloseOnCancel()}configure(modalConfig){modalConfig.show=!0,modalConfig.large=!0,super.configure(modalConfig)}}return _exports.default=SendActivityModal,_defineProperty(SendActivityModal,"TYPE","core/moodlenet/send_activity_modal"),_defineProperty(SendActivityModal,"TEMPLATE","core/moodlenet/send_activity_modal_base"),SendActivityModal.registerModalType(),_exports.default})); define("core/moodlenet/send_resource",["exports","core/config","core/notification","core/str","core/prefetch","core/templates","core/pubsub","core/moodlenet/service","core/moodlenet/send_activity_modal","core/moodlenet/authorize","core/moodlenet/events"],(function(_exports,_config,_notification,_str,_prefetch,Templates,_pubsub,MoodleNetService,_send_activity_modal,MoodleNetAuthorize,_events){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * A module to handle Share operations of the MoodleNet. * * @module core/moodlenet/send_resource * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.2 */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.sendToMoodleNet=_exports.init=_exports.handleModal=void 0,_config=_interopRequireDefault(_config),_prefetch=_interopRequireDefault(_prefetch),Templates=_interopRequireWildcard(Templates),MoodleNetService=_interopRequireWildcard(MoodleNetService),_send_activity_modal=_interopRequireDefault(_send_activity_modal),MoodleNetAuthorize=_interopRequireWildcard(MoodleNetAuthorize),_events=_interopRequireDefault(_events);let currentModal,siteSupportUrl,issuerId,courseId,resourceId,shareFormat,type,selectedCmIds,listenersRegistered=!1;_exports.sendToMoodleNet=(issuerId,resourceId,shareFormat)=>{const modal=currentModal.getModal()[0];let infoPromise;modal.querySelector(".modal-header").classList.remove("no-border"),modal.querySelector(".modal-header").classList.add("no-header-text"),currentModal.setBody(Templates.render("core/moodlenet/send_activity_modal_packaging",{})),currentModal.hideFooter(),"activity"===type?infoPromise=MoodleNetService.sendActivity(issuerId,resourceId,shareFormat):"course"===type?infoPromise=MoodleNetService.sendCourse(issuerId,resourceId,shareFormat):"partial"===type&&(infoPromise=selectedCmIds.length>1?MoodleNetService.sendPartialCourse(issuerId,resourceId,selectedCmIds,shareFormat):MoodleNetService.sendActivity(issuerId,selectedCmIds[0],shareFormat)),infoPromise.then((async data=>{const status=data.status,resourceUrl=data.resourceurl;return responseFromMoodleNet(status,resourceUrl)})).catch(_notification.exception)};const responseFromMoodleNet=function(status){let resourceUrl=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const $modal=currentModal.getModal(),modal=$modal[0];modal.querySelector(".modal-header").classList.add("no-border"),currentModal.setBody(Templates.render("core/moodlenet/send_activity_modal_done",{success:status,sitesupporturl:siteSupportUrl})),status&&(currentModal.setFooter(Templates.render("core/moodlenet/send_activity_modal_footer_view",{resourceurl:resourceUrl})),currentModal.showFooter())},renderModal=async(data,selectedActivities)=>{if(data.status){siteSupportUrl=data.supportpageurl,issuerId=data.issuerid;let modalConfig={templateContext:{activitytype:data.type,activityname:data.name,server:data.server}};return selectedActivities.length>0&&(selectedCmIds=selectedActivities),selectedActivities.length>1?(modalConfig.templateContext.fullsharing=!1,modalConfig.templateContext.selectedactivitiesnotice=await(0,_str.getString)("moodlenet:sharenoticepartialactivitynumber","moodle",selectedActivities.length),modalConfig.templateContext.sharenotice=await(0,_str.getString)("moodlenet:sharenoticepartial","moodle")):(modalConfig.templateContext.fullsharing=!0,"activity"===type||"partial"===type&&1==selectedActivities.length?modalConfig.templateContext.sharenotice=await(0,_str.getString)("moodlenet:sharenoticeactivity","moodle"):modalConfig.templateContext.sharenotice=await(0,_str.getString)("moodlenet:sharenoticecourse","moodle")),_send_activity_modal.default.create(modalConfig)}return(0,_notification.addNotification)({message:data.warnings[0].message,type:"error"})},handleModal=function(shareActionType){let selectedActivities=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const resourceId=_config.default.contextInstanceId;type=shareActionType,Promise.resolve(type).then((type=>{if("activity"===type)return MoodleNetService.getActivityInformation(resourceId);if("course"===type)return MoodleNetService.getCourseInformation(resourceId);if("partial"===type)return selectedActivities.length>1?MoodleNetService.getCourseInformation(resourceId):MoodleNetService.getActivityInformation(selectedActivities[0]);throw new Error("Unknown type ".concat(type))})).then((data=>renderModal(data,selectedActivities))).then((modal=>(currentModal=modal,currentModal))).catch(_notification.exception)};_exports.handleModal=handleModal;_exports.init=()=>{listenersRegistered||(_prefetch.default.prefetchTemplates(["core/moodlenet/send_activity_modal_base","core/moodlenet/send_activity_modal_packaging","core/moodlenet/send_activity_modal_done","core/moodlenet/send_activity_modal_footer_view","core/moodlenet/send_activity_modal_footer_share"]),document.addEventListener("click",(e=>{const shareAction=e.target.closest('[data-action="sendtomoodlenet"]'),sendAction=e.target.closest('.moodlenet-action-buttons [data-action="share"]');shareAction&&(e.preventDefault(),type=shareAction.getAttribute("data-type"),handleModal(shareAction.getAttribute("data-type"))),sendAction&&(e.preventDefault(),(0,_pubsub.publish)(_events.default.MOODLENET_SHARE_STARTED,{}),courseId=_config.default.courseId,resourceId=_config.default.contextInstanceId,shareFormat=0,MoodleNetAuthorize.handleAuthorization(issuerId,courseId,resourceId,0))})),listenersRegistered=!0)}})); define("core/moodlenet/service",["exports","core/ajax"],(function(_exports,_ajax){var obj; /** * A javascript module to handle MoodleNet ajax actions. * * @module core/moodlenet/service * @copyright 2023 Huong Nguyen * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 4.2 */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.sendPartialCourse=_exports.sendCourse=_exports.sendActivity=_exports.getCourseInformation=_exports.getActivityInformation=_exports.authorizationCheck=void 0,_ajax=(obj=_ajax)&&obj.__esModule?obj:{default:obj};_exports.getActivityInformation=cmId=>{const request={methodname:"core_moodlenet_get_share_info_activity",args:{cmid:cmId}};return _ajax.default.call([request])[0]};_exports.getCourseInformation=courseID=>{const request={methodname:"core_moodlenet_get_shared_course_info",args:{courseid:courseID}};return _ajax.default.call([request])[0]};_exports.sendCourse=(issuerId,courseId,shareFormat)=>{const request={methodname:"core_moodlenet_send_course",args:{issuerid:issuerId,courseid:courseId,shareformat:shareFormat}};return _ajax.default.call([request])[0]};_exports.sendActivity=(issuerId,cmId,shareFormat)=>{const request={methodname:"core_moodlenet_send_activity",args:{issuerid:issuerId,cmid:cmId,shareformat:shareFormat}};return _ajax.default.call([request])[0]};_exports.sendPartialCourse=(issuerId,courseId,selectedCmIds,shareFormat)=>{const request={methodname:"core_moodlenet_send_course",args:{issuerid:issuerId,courseid:courseId,shareformat:shareFormat,cmids:selectedCmIds}};return _ajax.default.call([request])[0]};_exports.authorizationCheck=(issuerId,courseId)=>{const request={methodname:"core_moodlenet_auth_check",args:{issuerid:issuerId,courseid:courseId}};return _ajax.default.call([request])[0]}})); define("core/moremenu",["exports","core/menu_navigation"],(function(_exports,_menu_navigation){var obj; /** * Moves wrapping navigation items into a more menu. * * @module core/moremenu * @copyright 2021 Moodle * @author Bas Brands * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_menu_navigation=(obj=_menu_navigation)&&obj.__esModule?obj:{default:obj};const Selectors_regions={moredropdown:'[data-region="moredropdown"]',morebutton:'[data-region="morebutton"]'},Selectors_classes={dropdownitem:"dropdown-item",dropdownmoremenu:"dropdownmoremenu",hidden:"d-none",active:"active",nav:"nav",navlink:"nav-link",observed:"observed"},Selectors_attributes={menu:'[role="menu"]',dropdowntoggle:'[data-bs-toggle="dropdown"]'};let isTabListMenu=!1;const autoCollapse=menu=>{const maxHeight=menu.parentNode.offsetHeight+1,moreDropdown=menu.querySelector(Selectors_regions.moredropdown),moreButton=menu.querySelector(Selectors_regions.morebutton);if(menu.offsetHeight>maxHeight){moreButton.classList.remove(Selectors_classes.hidden);let menuHeight=0;Array.from(menu.children).reverse().forEach((item=>{item.classList.contains(Selectors_classes.dropdownmoremenu)?menu.offsetHeight>maxHeight&&(menuHeight=menu.offsetHeight):menu.offsetHeight>maxHeight?moveIntoMoreDropdown(menu,item,!0):menuHeight>maxHeight&&(moveIntoMoreDropdown(menu,item,!0),menuHeight=0)}))}else"children"in moreDropdown&&(Array.from(moreDropdown.children).forEach((item=>{if(menu.offsetHeightmaxHeight&&autoCollapse(menu);menu.parentNode.classList.add(Selectors_classes.observed)},moveIntoMoreDropdown=function(menu,navNode){let prepend=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const moreDropdown=menu.querySelector(Selectors_regions.moredropdown),dropdownToggle=menu.querySelector(Selectors_attributes.dropdowntoggle),navLink=navNode.querySelector("."+Selectors_classes.navlink);navLink.classList.contains(Selectors_classes.active)&&(dropdownToggle.classList.add(Selectors_classes.active),dropdownToggle.setAttribute("tabindex","0"),navLink.setAttribute("tabindex","-1"),isTabListMenu&&navLink.removeAttribute("aria-selected"),navLink.setAttribute("aria-current","true")),navLink.setAttribute("role","menuitem"),navLink.classList.remove(Selectors_classes.navlink),navLink.classList.add(Selectors_classes.dropdownitem),prepend?moreDropdown.prepend(navNode):moreDropdown.append(navNode)},moveOutOfMoreDropdown=(menu,navNode)=>{const moreButton=menu.querySelector(Selectors_regions.morebutton),dropdownToggle=menu.querySelector(Selectors_attributes.dropdowntoggle),navLink=navNode.querySelector("."+Selectors_classes.dropdownitem);isTabListMenu&&navLink.setAttribute("role","tab"),navLink.classList.contains(Selectors_classes.active)&&(dropdownToggle.classList.remove(Selectors_classes.active),dropdownToggle.setAttribute("tabindex","-1"),navLink.setAttribute("tabindex","0"),isTabListMenu&&(navLink.removeAttribute("aria-current"),navLink.setAttribute("aria-selected","true"))),navLink.classList.remove(Selectors_classes.dropdownitem),navLink.classList.add(Selectors_classes.navlink),menu.insertBefore(navNode,moreButton)};return _exports.default=menu=>{isTabListMenu="tablist"===menu.getAttribute("role");if(!window.location.hash){const itemRole=isTabListMenu?"tab":"menuitem",menuListItem=menu.firstElementChild,roleSelector="[role=".concat(itemRole,"]"),menuItem=menuListItem.querySelector(roleSelector),ariaAttribute=isTabListMenu?"aria-selected":"aria-current";menu.querySelector("[".concat(ariaAttribute,"='true']"))||(menuItem.setAttribute(ariaAttribute,"true"),menuItem.setAttribute("tabindex","0"))}if("children"in menu){const moreButton=menu.querySelector(Selectors_regions.morebutton);Array.from(menu.children).forEach((item=>{item.classList.contains(Selectors_classes.dropdownmoremenu)||"true"!==item.dataset.forceintomoremenu||(moveIntoMoreDropdown(menu,item,!1),moreButton.classList.contains(Selectors_classes.hidden)&&moreButton.classList.remove(Selectors_classes.hidden))}))}autoCollapse(menu),(0,_menu_navigation.default)(menu),window.addEventListener("resize",(()=>{autoCollapse(menu),(0,_menu_navigation.default)(menu)}));const toggledropdown=e=>e.stopPropagation();document.querySelector("."+Selectors_classes.dropdownmoremenu).addEventListener("show.bs.dropdown",(()=>{menu.querySelector(Selectors_regions.moredropdown).querySelectorAll(".dropdown").forEach((dropdown=>{dropdown.removeEventListener("click",toggledropdown,!0),dropdown.addEventListener("click",toggledropdown,!0)}))}))},_exports.default})); define("core/mustache",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var objectToString=Object.prototype.toString,isArray=Array.isArray||function(object){return"[object Array]"===objectToString.call(object)};function isFunction(object){return"function"==typeof object}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return null!=obj&&"object"==typeof obj&&propName in obj}var regExpTest=RegExp.prototype.test;var nonSpaceRe=/\S/;function isWhitespace(string){return!function(re,string){return regExpTest.call(re,string)}(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var whiteRe=/\s*/,spaceRe=/\s+/,equalsRe=/\s*=/,curlyRe=/\s*\}/,tagRe=/#|\^|\/|>|\{|&|=|!|\$|0)for(intermediateValue=context.view,names=name.split("."),index=0;null!=intermediateValue&&index0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}return nestedTokens}(function(tokens){for(var token,lastToken,squashedTokens=[],i=0,numTokens=tokens.length;i"===symbol?value=this.renderPartial(token,context,partials,config):"<"===symbol?value=this.renderBlock(token,context,partials,originalTemplate,config):"$"===symbol?value=this.renderBlockVariable(token,context,partials,originalTemplate,config):"&"===symbol?value=this.unescapedValue(token,context):"name"===symbol?value=this.escapedValue(token,context,config):"text"===symbol&&(value=this.rawValue(token)),void 0!==value&&(buffer+=value);return buffer},Writer.prototype.renderSection=function(token,context,partials,originalTemplate,config){var self=this,buffer="",lambdaArgs=context.parseNameAndArgs(token[1]),name=lambdaArgs.shift(),value=context.lookup(name);if(value){if(isArray(value))for(var j=0,valueLength=value.length;j0||!lineHasNonSpace)&&(partialByNl[i]=filteredIndentation+partialByNl[i]);return partialByNl.join("\n")},Writer.prototype.renderPartial=function(token,context,partials,config){if(partials){var tags=this.getConfigTags(config),value=isFunction(partials)?partials(token[1]):partials[token[1]];if(null!=value){var lineHasNonSpace=token[6],tagIndex=token[5],indentation=token[4],indentedValue=value;0==tagIndex&&indentation&&(indentedValue=this.indentPartial(value,indentation,lineHasNonSpace));var tokens=this.parse(indentedValue,tags);return this.renderTokens(tokens,context,partials,indentedValue,config)}}},Writer.prototype.renderBlock=function(token,context,partials,originalTemplate,config){if(partials){var value=isFunction(partials)?partials(token[1]):partials[token[1]];null!=value&&context.clearBlockVars(),this.renderTokens(token[4],context,partials,originalTemplate,config);var result=this.renderTokens(this.parse(value),context,partials,value,config);return context.clearBlockVars(),result}},Writer.prototype.renderBlockVariable=function(token,context,partials,originalTemplate,config){var value=token[1],exists=context.getBlockVar(value);return exists?this.renderTokens(this.parse(exists),context,partials,exists,config):(context.setBlockVar(value,originalTemplate.slice(token[3],token[5])),this.renderTokens(token[4],context,partials,originalTemplate,config))},Writer.prototype.unescapedValue=function(token,context){var value=context.lookup(token[1]);if(null!=value)return value},Writer.prototype.escapedValue=function(token,context,config){var escape=this.getConfigEscape(config)||mustache.escape,value=context.lookup(token[1]);if(null!=value)return"number"==typeof value&&escape===mustache.escape?String(value):escape(value)},Writer.prototype.rawValue=function(token){return token[1]},Writer.prototype.getConfigTags=function(config){return isArray(config)?config:config&&"object"==typeof config?config.tags:void 0},Writer.prototype.getConfigEscape=function(config){return config&&"object"==typeof config&&!isArray(config)?config.escape:void 0};var mustache={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(cache){defaultWriter.templateCache=cache},get templateCache(){return defaultWriter.templateCache}},defaultWriter=new Writer;mustache.clearCache=function(){return defaultWriter.clearCache()},mustache.parse=function(template,tags){return defaultWriter.parse(template,tags)},mustache.render=function(template,view,partials,config){if("string"!=typeof template)throw new TypeError('Invalid template! Template should be a "string" but "'+((isArray(obj=template)?"array":typeof obj)+'" was given as the first argument for mustache#render(template, view, partials)'));var obj;return defaultWriter.render(template,view,partials,config)},mustache.escape=function(string){return String(string).replace(/[&<>"'`=\/]/g,(function(s){return entityMap[s]}))},mustache.Scanner=Scanner,mustache.Context=Context,mustache.Writer=Writer;var _default=mustache;return _exports.default=_default,_exports.default})); /** * Poll the server to keep the session alive. * * @module core/network * @copyright 2019 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/network",["jquery","core/ajax","core/config","core/notification","core/str"],(function($,Ajax,Config,Notification,Str){var started=!1,warningDisplayed=!1,keepAliveFrequency=0,requestTimeout=0,keepAliveMessage=!1,sessionTimeout=!1,checkFrequency=1e3*Math.min(Config.sessiontimeout/10,600),warningLimit=Config.sessiontimeoutwarning>0?1e3*Config.sessiontimeoutwarning:2*checkFrequency,firstWait=Config.sessiontimeoutwarning>0?Math.min(1e3*(Config.sessiontimeout-Config.sessiontimeoutwarning),5*checkFrequency):5*checkFrequency,timeoutSessionExpired=function(modal){sessionTimeout=!0,warningDisplayed=!1,closeModal(modal),displaySessionExpired()},closeModal=function(modal){modal.destroy()},displaySessionExpired=function(){return Ajax.call([{methodname:"core_session_time_remaining",args:{}}],!0,!0,!0)[0].then((function(args){return!(1e3*args.timeremaining>warningLimit)&&Str.get_strings([{key:"sessionexpired",component:"error"},{key:"sessionerroruser",component:"error"},{key:"loginagain",component:"moodle"},{key:"cancel",component:"moodle"}]).then((function(strings){return Notification.confirm(strings[0],strings[1],strings[2],strings[3],(function(){return location.reload(),!0})),!0})).catch(Notification.exception)}))},touchSession=function(){return sessionTimeout?displaySessionExpired():Ajax.call([{methodname:"core_session_touch",args:{}}],!0,!0,!1,requestTimeout)[0].then((function(){return keepAliveFrequency>0&&setTimeout(touchSession,keepAliveFrequency),!0})).catch((function(){Notification.alert("",keepAliveMessage)}))},checkSession=function(){return sessionTimeout=!1,Ajax.call([{methodname:"core_session_time_remaining",args:{}}],!0,!0,!0)[0].then((function(args){return!(args.userid<=0)&&(args.timeremaining<=0?displaySessionExpired():(1e3*args.timeremaining<=warningLimit&&!warningDisplayed?(warningDisplayed=!0,Str.get_strings([{key:"norecentactivity",component:"moodle"},{key:"sessiontimeoutsoon",component:"moodle"},{key:"extendsession",component:"moodle"},{key:"cancel",component:"moodle"}]).then((function(strings){return Notification.confirm(strings[0],strings[1],strings[2],strings[3],(function(){return touchSession(),warningDisplayed=!1,setTimeout(checkSession,firstWait),!0}),(function(){setTimeout(checkSession,checkFrequency)}))})).then((modal=>{setTimeout(timeoutSessionExpired,1e3*args.timeremaining,modal)})).catch(Notification.exception)):setTimeout(checkSession,checkFrequency),!0))}))},start=function(){keepAliveFrequency>0?setTimeout(touchSession,keepAliveFrequency):setTimeout(checkSession,firstWait)};const isMoodleIframe=function(){if(window.parent===window)return!1;let parentUrl;try{parentUrl=window.parent.location.href}catch(e){return!1}return parentUrl.startsWith(M.cfg.wwwroot)};return{keepalive:async function(freq,timeout,identifier,component){started?window.console.warn("Ignoring session keep-alive. The core/network module was already initialised."):(started=!0,isMoodleIframe()?window.console.warn("Ignoring session keep-alive in this iframe inside another Moodle page."):(window.console.log("Starting Moodle session keep-alive."),keepAliveFrequency=1e3*freq,keepAliveMessage=await Str.get_string(identifier,component),requestTimeout=1e3*timeout,start()))},init:function(){started||(started=!0,isMoodleIframe()?window.console.log("Not starting Moodle session timeout warning in this iframe."):(window.console.log("Starting Moodle session timeout warning."),start()))}}})); define("core/normalise",["exports","jquery"],(function(_exports,_jquery){var obj; /** * Normalisation helpers. * * @module core/normalise * @copyright 2020 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.getList=_exports.getFirst=_exports.getElement=void 0,_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj};const getList=nodes=>nodes instanceof HTMLElement?[nodes]:nodes instanceof Array?nodes:nodes instanceof NodeList?Array.from(nodes):nodes instanceof _jquery.default?nodes.get():Array.from(nodes);_exports.getList=getList;_exports.getFirst=nodes=>getList(nodes)[0];_exports.getElement=node=>node instanceof HTMLElement?node:null!=node&&node._node?node._node:node instanceof _jquery.default&&node.length>0?node.get(0):null})); define("core/notification",["exports","core/pending","core/modal_events","core/log"],(function(_exports,_pending,_modal_events,_log){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.saveCancelPromise=_exports.saveCancel=_exports.init=_exports.fetchNotifications=_exports.exception=_exports.deleteCancelPromise=_exports.deleteCancel=_exports.default=_exports.confirm=_exports.alert=_exports.addNotification=void 0,_pending=_interopRequireDefault(_pending),_modal_events=_interopRequireDefault(_modal_events),_log=_interopRequireDefault(_log);var _systemImportTransformerGlobalIdentifier="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}let currentContextId=M.cfg.contextid;const notificationTypes={success:"core/notification_success",info:"core/notification_info",warning:"core/notification_warning",error:"core/notification_error"},Selectors={notificationRegion:"#".concat("user-notifications"),fallbackRegionParents:["#region-main",'[role="main"]',"body"]},fetchNotifications=async()=>(await("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/ajax"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/ajax")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/ajax"]))).call([{methodname:"core_fetch_notifications",args:{contextid:currentContextId}}])[0].then(addNotifications);_exports.fetchNotifications=fetchNotifications;const addNotifications=notifications=>{if(!notifications.length)return Promise.resolve();const pendingPromise=new _pending.default("core/notification:addNotifications");return notifications.forEach((notification=>renderNotification(notification.template,notification.variables))),pendingPromise.resolve()},addNotification=notification=>{const pendingPromise=new _pending.default("core/notification:addNotifications");let template=notificationTypes.error;return(notification={closebutton:!0,announce:!0,type:"error",...notification}).template?(template=notification.template,delete notification.template):notification.type&&(void 0!==notificationTypes[notification.type]&&(template=notificationTypes[notification.type]),delete notification.type),renderNotification(template,notification).then(pendingPromise.resolve)};_exports.addNotification=addNotification;const renderNotification=async(template,variables)=>{if(void 0===variables.message||!variables.message)return void _log.default.debug("Notification received without content. Skipping.");const pendingPromise=new _pending.default("core/notification:renderNotification"),Templates=await("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/templates"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/templates")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/templates"]));Templates.renderForPromise(template,variables).then((_ref=>{let{html:html,js:js=""}=_ref;Templates.prependNodeContents(getNotificationRegion(),html,js)})).then(pendingPromise.resolve).catch(exception)},getNotificationRegion=()=>document.querySelector(Selectors.notificationRegion),alert=async(title,message,cancelText)=>{var pendingPromise=new _pending.default("core/notification:alert");const AlertModal=await("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/local/modal/alert"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/local/modal/alert")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/local/modal/alert"])),modal=await AlertModal.create({body:message,title:title,buttons:{cancel:cancelText},removeOnClose:!0,show:!0});return pendingPromise.resolve(),modal};_exports.alert=alert;const confirm=(title,question,saveLabel,noLabel,saveCallback,cancelCallback)=>saveCancel(title,question,saveLabel,saveCallback,cancelCallback);_exports.confirm=confirm;const saveCancel=async function(title,question,saveLabel,saveCallback,cancelCallback){let{triggerElement:triggerElement=null}=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const pendingPromise=new _pending.default("core/notification:confirm"),[SaveCancelModal]=await Promise.all(["function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/modal_save_cancel"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/modal_save_cancel")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/modal_save_cancel"])]),modal=await SaveCancelModal.create({title:title,body:question,buttons:{save:saveLabel},removeOnClose:!0,show:!0});return modal.getRoot().on(_modal_events.default.save,saveCallback),modal.getRoot().on(_modal_events.default.cancel,cancelCallback),modal.getRoot().on(_modal_events.default.hidden,(()=>null==triggerElement?void 0:triggerElement.focus())),pendingPromise.resolve(),modal};_exports.saveCancel=saveCancel;const deleteCancel=async function(title,question,deleteLabel,deleteCallback,cancelCallback){let{triggerElement:triggerElement=null}=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const pendingPromise=new _pending.default("core/notification:confirm"),[DeleteCancelModal]=await Promise.all(["function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/modal_delete_cancel"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/modal_delete_cancel")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/modal_delete_cancel"])]),modal=await DeleteCancelModal.create({title:title,body:question,buttons:{delete:deleteLabel},removeOnClose:!0,show:!0});return modal.getRoot().on(_modal_events.default.delete,deleteCallback),modal.getRoot().on(_modal_events.default.cancel,cancelCallback),modal.getRoot().on(_modal_events.default.hidden,(()=>null==triggerElement?void 0:triggerElement.focus())),pendingPromise.resolve(),modal};_exports.deleteCancel=deleteCancel;const saveCancelPromise=function(title,question,saveLabel){let{triggerElement:triggerElement=null}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(((resolve,reject)=>{saveCancel(title,question,saveLabel,resolve,reject,{triggerElement:triggerElement}).then((modal=>modal.getRoot().on(_modal_events.default.hidden,reject)))}))};_exports.saveCancelPromise=saveCancelPromise;const deleteCancelPromise=function(title,question,deleteLabel){let{triggerElement:triggerElement=null}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(((resolve,reject)=>{deleteCancel(title,question,deleteLabel,resolve,reject,{triggerElement:triggerElement})}))};_exports.deleteCancelPromise=deleteCancelPromise;const exception=async ex=>{const pendingPromise=new _pending.default("core/notification:displayException");if(ex.stack||(ex.stack=""),ex.debuginfo&&(ex.stack+=ex.debuginfo+"\n"),!ex.backtrace&&ex.stacktrace&&(ex.backtrace=ex.stacktrace),ex.backtrace){ex.stack+=ex.backtrace;const ln=ex.backtrace.match(/line ([^ ]*) of/),fn=ex.backtrace.match(/ of ([^:]*): /);ln&&ln[1]&&(ex.lineNumber=ln[1]),fn&&fn[1]&&(ex.fileName=fn[1],ex.fileName.length>30&&(ex.fileName="..."+ex.fileName.substr(ex.fileName.length-27)))}void 0===ex.name&&ex.errorcode&&(ex.name=ex.errorcode);(await("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/yui"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/yui")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/yui"]))).use("moodle-core-notification-exception",(function(){new M.core.exception(ex).show(),pendingPromise.resolve()}))};_exports.exception=exception;const init=(contextId,notificationList)=>{currentContextId=contextId,(()=>{if(getNotificationRegion())return!1;const newRegion=document.createElement("span");newRegion.id="user-notifications",Selectors.fallbackRegionParents.some((selector=>{const targetRegion=document.querySelector(selector);return!!targetRegion&&(targetRegion.prepend(newRegion),!0)}))})(),addNotifications(notificationList)};_exports.init=init;var _default={init:init,fetchNotifications:fetchNotifications,addNotification:addNotification,alert:alert,confirm:confirm,saveCancel:saveCancel,deleteCancel:deleteCancel,saveCancelPromise:saveCancelPromise,deleteCancelPromise:deleteCancelPromise,exception:exception};return _exports.default=_default,_exports.default})); /** * Provide global helper code to enhance page elements. * * @module core/page_global * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/page_global",["jquery","core/custom_interaction_events","core/str","core/network"],(function($,CustomEvents,Str,Network){return{init:function(){var body;(body=$("body")).find(".dropdown-menu").each((function(){$(this).find('[aria-current="true"]').addClass("dropdown-item-active")})),CustomEvents.define(body,[CustomEvents.events.activate]),body.on(CustomEvents.events.activate,"[data-show-active-item]",(function(e){var option=$(e.target).closest(".dropdown-item"),menuContainer=option.closest("[data-show-active-item]");if(option.hasClass("dropdown-item")&&!option.hasClass("active")){var dropdownItems=menuContainer.find(".dropdown-item");dropdownItems.removeClass(["active","dropdown-item-active"]),dropdownItems.removeAttr("aria-current"),menuContainer.attr("data-skip-active-class")||option.addClass("active"),option.addClass("dropdown-item-active"),option.attr("aria-current",!0);var activeOptionText=option.text(),dropdownToggle=menuContainer.parent().find('[data-bs-toggle="dropdown"]'),dropdownToggleText=dropdownToggle.find("[data-active-item-text]");dropdownToggleText.length?dropdownToggleText.html(activeOptionText):dropdownToggle.html(activeOptionText);var activeItemAriaLabelComponent=menuContainer.attr("data-active-item-button-aria-label-components");if(activeItemAriaLabelComponent){var strParams=activeItemAriaLabelComponent.split(",");strParams.push(activeOptionText),Str.get_string(strParams[0].trim(),strParams[1].trim(),strParams[2].trim()).then((function(string){return dropdownToggle.attr("aria-label",string),string})).catch((function(){return!1}))}}})),Network.init()}}})); define("core/page_title",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.setPageTitleSeparator=_exports.setPageTitleRoot=_exports.setPageTitle=_exports.prependPageTitle=void 0; /** * Helper module for manipulating the current page title * * @module core/page_title * @copyright 2025 Paul Holden * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ let pageTitleRoot=document.title,pageTitleSeparator="|";const setPageTitle=pageTitle=>{document.title=pageTitle};_exports.setPageTitle=setPageTitle;_exports.prependPageTitle=pageTitlePrepend=>setPageTitle("".concat(pageTitlePrepend," ").concat(pageTitleSeparator," ").concat(pageTitleRoot));_exports.setPageTitleRoot=titleRoot=>{pageTitleRoot=titleRoot};_exports.setPageTitleSeparator=titleSeparator=>{pageTitleSeparator=titleSeparator}})); /** * Javascript to load and render a paged content section. * * @module core/paged_content * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content",["jquery","core/paged_content_pages","core/paged_content_paging_bar","core/paged_content_paging_bar_limit_selector","core/paged_content_paging_dropdown"],(function($,Pages,PagingBar,PagingBarLimitSelector,Dropdown){return{init:function(root,renderPagesContentCallback,namespaceOverride){var pagesContainer=(root=$(root)).find(Pages.rootSelector),pagingBarContainer=root.find(PagingBar.rootSelector),dropdownContainer=root.find(Dropdown.rootSelector),pagingBarLimitSelectorContainer=root.find(PagingBarLimitSelector.rootSelector),id=root.attr("id");namespaceOverride&&(id=namespaceOverride),Pages.init(pagesContainer,id,renderPagesContentCallback),pagingBarContainer.length&&PagingBar.init(pagingBarContainer,id),pagingBarLimitSelectorContainer.length&&PagingBarLimitSelector.init(pagingBarLimitSelectorContainer,id),dropdownContainer.length&&Dropdown.init(dropdownContainer,id)},rootSelector:'[data-region="paged-content-container"]'}})); /** * Events for the paged content element. * * @module core/paged_content_events * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content_events",[],(function(){return{SHOW_PAGES:"core-paged-content-show-pages",PAGES_SHOWN:"core-paged-content-pages-shown",ALL_ITEMS_LOADED:"core-paged-content-all-items-loaded",SET_ITEMS_PER_PAGE_LIMIT:"core-paged-content-set-items-per-page-limit"}})); /** * Factory to create a paged content widget. * * @module core/paged_content_factory * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content_factory",["jquery","core/templates","core/notification","core/paged_content","core/paged_content_events","core/pubsub","core_user/repository"],(function($,Templates,Notification,PagedContent,PagedContentEvents,PubSub,UserRepository){var TEMPLATES_PAGED_CONTENT="core/paged_content",DEFAULT_ITEMS_PER_PAGE_SINGLE=25,DEFAULT_ITEMS_PER_PAGE_ARRAY=[25,50,100,0],DEFAULT_MAX_PAGES=3,buildItemsPerPagePagingBarContext=function(itemsPerPage){var context=[];$.isArray(itemsPerPage)?(context=itemsPerPage.map((function(num){return"number"==typeof num?{value:num,active:!1}:num}))).filter((function(item){return item.active})).length||(context[0].active=!0):context=[{value:itemsPerPage,active:!0}];return context},buildPagingBarTemplateContext=function(numberOfItems,itemsPerPage){return numberOfItems?function(numberOfItems,itemsPerPage){null===itemsPerPage&&(itemsPerPage=DEFAULT_ITEMS_PER_PAGE_SINGLE),$.isArray(itemsPerPage)&&(itemsPerPage=itemsPerPage[0]);var context={showitemsperpageselector:!1,itemsperpage:[{value:35,active:!0}],previous:!0,next:!0,activepagenumber:1,hidecontrolonsinglepage:!0,pages:[]};context.itemsperpage=buildItemsPerPagePagingBarContext(itemsPerPage);for(var numberOfPages=function(numberOfItems,itemsPerPage){var numberOfPages=1;if(numberOfItems>0){var partial=numberOfItems%itemsPerPage;numberOfPages=partial?(numberOfItems-=partial)/itemsPerPage+1:numberOfItems/itemsPerPage}return numberOfPages}(numberOfItems,itemsPerPage),i=1;i<=numberOfPages;i++){var page={number:i,page:""+i};1===i&&(page.active=!0),context.pages.push(page)}return context.barsize=10,context}(numberOfItems,itemsPerPage):function(itemsPerPage){null===itemsPerPage&&(itemsPerPage=DEFAULT_ITEMS_PER_PAGE_ARRAY);var context={showitemsperpageselector:!1,itemsperpage:[{value:35,active:!0}],previous:!0,next:!0,activepagenumber:1,hidecontrolonsinglepage:!0,pages:[]};return context.itemsperpage=buildItemsPerPagePagingBarContext(itemsPerPage),context.showitemsperpageselector=$.isArray(itemsPerPage)&&itemsPerPage.length>1,context}(itemsPerPage)},buildTemplateContext=function(numberOfItems,itemsPerPage,config){var context={pagingbar:!1,pagingdropdown:!1,skipjs:!0,ignorecontrolwhileloading:!0,controlplacementbottom:!1};return config.hasOwnProperty("ignoreControlWhileLoading")&&(context.ignorecontrolwhileloading=config.ignoreControlWhileLoading),config.hasOwnProperty("controlPlacementBottom")&&(context.controlplacementbottom=config.controlPlacementBottom),config.hasOwnProperty("hideControlOnSinglePage")&&(context.hidecontrolonsinglepage=config.hideControlOnSinglePage),config.hasOwnProperty("ariaLabels")&&(context.arialabels=config.ariaLabels),config.hasOwnProperty("dropdown")&&config.dropdown?context.pagingdropdown=function(itemsPerPage,config){if(null===itemsPerPage&&(itemsPerPage=DEFAULT_ITEMS_PER_PAGE_SINGLE),$.isArray(itemsPerPage))return{options:itemsPerPage};var context={options:[]},totalItems=0,lastIncrease=0,maxPages=DEFAULT_MAX_PAGES;config.hasOwnProperty("maxPages")&&(maxPages=config.maxPages);for(var i=1;i<=maxPages;i++){var itemCount=0;i<=2?(itemCount=itemsPerPage,lastIncrease=itemsPerPage):itemCount=lastIncrease*=2;var option={itemcount:itemCount,content:totalItems+=itemCount};1===i&&(option.active=!0),context.options.push(option)}return context}(itemsPerPage,config):(context.pagingbar=buildPagingBarTemplateContext(numberOfItems,itemsPerPage),config.hasOwnProperty("showFirstLast")&&config.showFirstLast&&(context.pagingbar.first=!0,context.pagingbar.last=!0)),context},createWithTotalAndLimit=function(numberOfItems,itemsPerPage,renderPagesContentCallback,config){config=config||{};var deferred=$.Deferred(),templateContext=buildTemplateContext(numberOfItems,itemsPerPage,config);return Templates.render(TEMPLATES_PAGED_CONTENT,templateContext).then((function(html,js){var id=(html=$(html)).attr("id");config.hasOwnProperty("eventNamespace")&&(id=config.eventNamespace);var container=html;PagedContent.init(container,renderPagesContentCallback,id),registerEvents(id,config),deferred.resolve(html,js)})).fail((function(exception){deferred.reject(exception)})).fail(Notification.exception),deferred.promise()},registerEvents=function(namespace,config){var persistentLimitKey;config.hasOwnProperty("persistentLimitKey")&&PubSub.subscribe(namespace+PagedContentEvents.SET_ITEMS_PER_PAGE_LIMIT,(persistentLimitKey=config.persistentLimitKey,function(limit){UserRepository.setUserPreference(persistentLimitKey,limit)}))};return{create:function(renderPagesContentCallback,config){return createWithTotalAndLimit(null,null,renderPagesContentCallback,config)},createWithLimit:function(itemsPerPage,renderPagesContentCallback,config){return createWithTotalAndLimit(null,itemsPerPage,renderPagesContentCallback,config)},createWithTotalAndLimit:createWithTotalAndLimit,createFromStaticList:function(contentItems,itemsPerPage,renderContentCallback,config){void 0===config&&(config={});var numberOfItems=contentItems.length;return createWithTotalAndLimit(numberOfItems,itemsPerPage,(function(pagesData){var contentToRender=[];return pagesData.forEach((function(pageData){var begin=pageData.offset,end=pageData.limit?begin+pageData.limit:numberOfItems,items=contentItems.slice(begin,end);contentToRender.push(items)})),renderContentCallback(contentToRender)}),config)},createFromAjax:createWithTotalAndLimit,resetLastPageNumber:function(id,lastPageNumber){PubSub.publish(id+PagedContentEvents.ALL_ITEMS_LOADED,lastPageNumber)}}})); /** * Javascript for showing/hiding pages of content. * * @module core/paged_content_pages * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content_pages",["jquery","core/templates","core/notification","core/pubsub","core/paged_content_events","core/pending"],(function($,Templates,Notification,PubSub,PagedContentEvents,Pending){var SELECTORS_PAGE_REGION='[data-region="paged-content-page"]',TEMPLATES_PAGING_CONTENT_ITEM="core/paged_content_page",TEMPLATES_LOADING="core/overlay_loading",findPage=function(root,pageNumber){return root.find('[data-page="'+pageNumber+'"]')},showPages=function(root,pagesData,id,renderPagesContentCallback){var pendingPromise=new Pending("core/paged_content_pages:showPages"),existingPages=[],newPageData=[],newPagesPromise=$.Deferred();if(pagesData.forEach((function(pageData){var pageNumber=pageData.pageNumber,existingPage=findPage(root,pageNumber);existingPage.length?existingPages.push(existingPage):newPageData.push(pageData)})),newPageData.length&&"function"==typeof renderPagesContentCallback){var renderPagePromises=renderPagesContentCallback(newPageData,{allItemsLoaded:function(lastPageNumber){PubSub.publish(id+PagedContentEvents.ALL_ITEMS_LOADED,lastPageNumber)}}).map((function(promise,index){return function(root,pagePromise,pageNumber){var deferred=$.Deferred();return pagePromise.then((function(html,pageJS){pageJS=pageJS||"",Templates.render(TEMPLATES_PAGING_CONTENT_ITEM,{page:pageNumber,content:html}).then((function(html){Templates.appendNodeContents(root,html,pageJS);var page=findPage(root,pageNumber);deferred.resolve(page)})).fail((function(exception){deferred.reject(exception)})).fail(Notification.exception)})).fail((function(exception){deferred.reject(exception)})).fail(Notification.exception),deferred.promise()}(root,promise,newPageData[index].pageNumber)}));$.when.apply($,renderPagePromises).then((function(){var newPages=Array.prototype.slice.call(arguments);newPagesPromise.resolve(newPages)})).fail((function(exception){newPagesPromise.reject(exception)})).fail(Notification.exception)}else newPagesPromise.resolve([]);var loadingPromise=function(root){var deferred=$.Deferred();root.attr("aria-busy",!0);var pendingPromise=new Pending("core/paged_content_pages:startLoading");return Templates.render(TEMPLATES_LOADING,{visible:!0}).then((function(html){var loadingSpinner=$(html),timerId=setTimeout((function(){root.css("position","relative"),loadingSpinner.appendTo(root)}),300);deferred.always((function(){clearTimeout(timerId),loadingSpinner.remove(),root.css("position",""),root.removeAttr("aria-busy"),pendingPromise.resolve()}))})).fail(Notification.exception),deferred}(root);newPagesPromise.then((function(newPages){var pagesToShow=existingPages.concat(newPages);root.find(SELECTORS_PAGE_REGION).addClass("hidden"),pagesToShow.forEach((function(page){page.removeClass("hidden")}))})).then((function(){PubSub.publish(id+PagedContentEvents.PAGES_SHOWN,pagesData)})).fail(Notification.exception).always((function(){loadingPromise.resolve(),pendingPromise.resolve()})).catch()};return{init:function(root,id,renderPagesContentCallback){root=$(root),PubSub.subscribe(id+PagedContentEvents.SHOW_PAGES,(function(pagesData){showPages(root,pagesData,id,renderPagesContentCallback)})),PubSub.subscribe(id+PagedContentEvents.SET_ITEMS_PER_PAGE_LIMIT,(function(){root.empty()}))},rootSelector:'[data-region="page-container"]'}})); /** * Javascript to enhance the paged content paging bar. * * @module core/paged_content_paging_bar * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content_paging_bar",["jquery","core/custom_interaction_events","core/paged_content_events","core/str","core/pubsub","core/pending"],(function($,CustomEvents,PagedContentEvents,Str,PubSub,Pending){var SELECTORS_PAGE="[data-page]",SELECTORS_PAGE_ITEM='[data-region="page-item"]',SELECTORS_PAGE_LINK='[data-region="page-link"]',SELECTORS_FIRST_BUTTON='[data-control="first"]',SELECTORS_LAST_BUTTON='[data-control="last"]',SELECTORS_NEXT_BUTTON='[data-control="next"]',SELECTORS_PREVIOUS_BUTTON='[data-control="previous"]',SELECTORS_DOTS_BUTTONS="[data-dots]",SELECTORS_BEGINNING_DOTS_BUTTON='[data-dots="beginning"]',SELECTORS_ENDING_DOTS_BUTTON='[data-dots="ending"]',getPageByNumber=function(root,pageNumber){return root.find(SELECTORS_PAGE_ITEM+'[data-page-number="'+pageNumber+'"]')},setLastPageNumber=function(root,number){root.attr("data-last-page-number",number)},getLastPageNumber=function(root){return parseInt(root.attr("data-last-page-number"),10)},getActivePageNumber=function(root){return parseInt(root.attr("data-active-page-number"),10)},setActivePageNumber=function(root,number){root.attr("data-active-page-number",number)},getPageNumber=function(root,page){if(null!=page.attr("data-page"))return parseInt(page.attr("data-page-number"),10);var pageNumber=1,activePageNumber=null;switch(page.attr("data-control")){case"first":default:pageNumber=1;break;case"last":pageNumber=getLastPageNumber(root);break;case"next":activePageNumber=getActivePageNumber(root);var lastPage=getLastPageNumber(root);pageNumber=lastPage?activePageNumber&&activePageNumber1?activePageNumber-1:1}return parseInt(pageNumber,10)},show=function(root){root.removeClass("hidden")},hide=function(root){root.addClass("hidden")},disableNextControlButtons=function(root){var nextButton=root.find(SELECTORS_NEXT_BUTTON),lastButton=root.find(SELECTORS_LAST_BUTTON);nextButton.addClass("disabled"),nextButton.attr("aria-disabled",!0),lastButton.addClass("disabled"),lastButton.attr("aria-disabled",!0)},enableNextControlButtons=function(root){var nextButton=root.find(SELECTORS_NEXT_BUTTON),lastButton=root.find(SELECTORS_LAST_BUTTON);nextButton.removeClass("disabled"),nextButton.removeAttr("aria-disabled"),lastButton.removeClass("disabled"),lastButton.removeAttr("aria-disabled")},disablePreviousControlButtons=function(root){var previousButton=root.find(SELECTORS_PREVIOUS_BUTTON),firstButton=root.find(SELECTORS_FIRST_BUTTON);previousButton.addClass("disabled"),previousButton.attr("aria-disabled",!0),firstButton.addClass("disabled"),firstButton.attr("aria-disabled",!0)},adjustPagingBarSize=function(root){var activePageNumber=getActivePageNumber(root),lastPageNumber=getLastPageNumber(root),dotsButtons=root.find(SELECTORS_DOTS_BUTTONS),beginningDotsButton=root.find(SELECTORS_BEGINNING_DOTS_BUTTON),endingDotsButton=root.find(SELECTORS_ENDING_DOTS_BUTTON),pages=root.find(SELECTORS_PAGE),barSize=parseInt(root.attr("data-bar-size"),10);if(barSize&&lastPageNumber>barSize){var minpage=Math.max(activePageNumber-Math.round(barSize/2),1),maxpage=minpage+barSize-1;maxpage>=lastPageNumber&&(minpage=(maxpage=lastPageNumber)-barSize+1),minpage>1?(show(beginningDotsButton),minpage++):hide(beginningDotsButton),maxpage=minpage&&index+1<=maxpage&&show(page)}))}else hide(dotsButtons)},enablePreviousControlButtons=function(root){var previousButton=root.find(SELECTORS_PREVIOUS_BUTTON),firstButton=root.find(SELECTORS_FIRST_BUTTON);previousButton.removeClass("disabled"),previousButton.removeAttr("aria-disabled"),firstButton.removeClass("disabled"),firstButton.removeAttr("aria-disabled")},showPage=function(root,pageNumber,id){var pendingPromise=new Pending("core/paged_content_paging_bar:showPage"),lastPageNumber=getLastPageNumber(root),isSamePage=pageNumber==getActivePageNumber(root),limit=function(root){return parseInt(root.attr("data-items-per-page"),10)}(root),offset=(pageNumber-1)*limit;if(!isSamePage){root.find(SELECTORS_PAGE_ITEM).removeClass("active").removeAttr("aria-current");var page=getPageByNumber(root,pageNumber);page.addClass("active"),page.attr("aria-current",!0),setActivePageNumber(root,pageNumber),adjustPagingBarSize(root)}lastPageNumber&&pageNumber>=lastPageNumber?disableNextControlButtons(root):enableNextControlButtons(root),pageNumber>1?enablePreviousControlButtons(root):disablePreviousControlButtons(root),function(root){var pageAriaLabelComponents=function(root){return root.attr("data-aria-label-components-pagination-item").split(",").map((function(component){return component.trim()}))}(root),activePageAriaLabelComponents=function(root){return root.attr("data-aria-label-components-pagination-active-item").split(",").map((function(component){return component.trim()}))}(root),activePageNumber=getActivePageNumber(root),pageItems=root.find(SELECTORS_PAGE_ITEM),stringRequests=pageItems.toArray().map((function(index,page){page=$(page);var pageNumber=getPageNumber(root,page);return pageNumber===activePageNumber?{key:activePageAriaLabelComponents[0],component:activePageAriaLabelComponents[1],param:pageNumber}:{key:pageAriaLabelComponents[0],component:pageAriaLabelComponents[1],param:pageNumber}}));Str.get_strings(stringRequests).then((function(strings){return pageItems.each((function(index,page){page=$(page);var string=strings[index];page.attr("aria-label",string),page.find(SELECTORS_PAGE_LINK).attr("aria-label",string)})),strings})).catch((function(){}))}(root),PubSub.publish(id+PagedContentEvents.SHOW_PAGES,[{pageNumber:pageNumber,limit:limit,offset:offset}]),pendingPromise.resolve()};return{init:function(root,id){var pages=(root=$(root)).find(SELECTORS_PAGE);if(function(root,items){var lastPageNumber=0;setActivePageNumber(root,0),items.each((function(index,item){var pageNumber=index+1;(item=$(item)).attr("data-page-number",pageNumber),lastPageNumber++,item.hasClass("active")&&setActivePageNumber(root,pageNumber)})),setLastPageNumber(root,lastPageNumber)}(root,pages),function(root,id){var ignoreControlWhileLoading=root.attr("data-ignore-control-while-loading"),loading=!1;""==ignoreControlWhileLoading&&(ignoreControlWhileLoading=!0),CustomEvents.define(root,[CustomEvents.events.activate]),root.on(CustomEvents.events.activate,SELECTORS_PAGE_ITEM,(function(e,data){if(data.originalEvent.preventDefault(),data.originalEvent.stopPropagation(),!ignoreControlWhileLoading||!loading){var page=$(e.target).closest(SELECTORS_PAGE_ITEM);if(!page.hasClass("disabled")){var pageNumber=getPageNumber(root,page);showPage(root,pageNumber,id),loading=!0}}})),PubSub.subscribe(id+PagedContentEvents.ALL_ITEMS_LOADED,(function(pageNumber){loading=!1;var currentLastPage=getLastPageNumber(root);(!currentLastPage||pageNumber * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content_paging_bar_limit_selector",["jquery","core/custom_interaction_events","core/paged_content_events","core/pubsub"],(function($,CustomEvents,PagedContentEvents,PubSub){var SELECTORS_LIMIT_OPTION="[data-limit]";return{init:function(root,id){root=$(root),CustomEvents.define(root,[CustomEvents.events.activate]),root.on(CustomEvents.events.activate,SELECTORS_LIMIT_OPTION,(function(e,data){var optionElement=$(e.target).closest(SELECTORS_LIMIT_OPTION);if(!optionElement.hasClass("active")){var limit=parseInt(optionElement.attr("data-limit"),10);PubSub.publish(id+PagedContentEvents.SET_ITEMS_PER_PAGE_LIMIT,limit),data.originalEvent.preventDefault()}}))},rootSelector:'[data-region="paging-control-limit-container"]'}})); /** * Javascript to manage the paging dropdown control. * * @module core/paged_content_paging_dropdown * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/paged_content_paging_dropdown",["jquery","core/custom_interaction_events","core/paged_content_events","core/pubsub"],(function($,CustomEvents,PagedContentEvents,PubSub){var SELECTORS_DROPDOWN_ITEM='[data-region="dropdown-item"]',SELECTORS_DROPDOWN_TOGGLE='[data-region="dropdown-toggle"]',SELECTORS_ACTIVE_DROPDOWN_ITEM='[data-region="dropdown-item"].active',SELECTORS_CARET='[data-region="caret"]',getPageNumber=function(item){return parseInt(item.attr("data-page-number"),10)},getAllItems=function(root){return root.find(SELECTORS_DROPDOWN_ITEM)},getPreviousItems=function(root,item){var pageNumber=getPageNumber(item);return getAllItems(root).filter((function(index,element){return getPageNumber($(element)) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const Sizes_small=576,Sizes_medium=991,Sizes_large=1400,Selectors_focusable='a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])',Classes_behatSite="behat-site";_exports.isBehatSite=()=>document.body.classList.contains(Classes_behatSite);const getCurrentWidth=()=>{const DomRect=document.body.getBoundingClientRect();return DomRect.x+DomRect.width};_exports.getCurrentWidth=getCurrentWidth;_exports.isExtraSmall=()=>getCurrentWidth()getCurrentWidth()getCurrentWidth()>=Sizes_large;_exports.firstFocusableElement=container=>(container||document).querySelector(Selectors_focusable);_exports.lastFocusableElement=container=>{var _focusableElements;const focusableElements=(container||document).querySelectorAll(Selectors_focusable);return null!==(_focusableElements=focusableElements[focusableElements.length-1])&&void 0!==_focusableElements?_focusableElements:null};const focusableElements=container=>(container||document).querySelectorAll(Selectors_focusable);_exports.focusableElements=focusableElements;_exports.previousFocusableElement=(container,loopSelection)=>getRelativeFocusableElement(container,loopSelection,-1);_exports.nextFocusableElement=(container,loopSelection)=>getRelativeFocusableElement(container,loopSelection,1);const getRelativeFocusableElement=(container,loopSelection,direction)=>{var _focusables;const focusedElement=document.activeElement,focusables=[...focusableElements(container)],focusedIndex=focusables.indexOf(focusedElement);if(-1===focusedIndex)return null;const newIndex=focusedIndex+direction;return void 0!==focusables[newIndex]?focusables[newIndex]:1!=loopSelection?null:direction>0?null!==(_focusables$=focusables[0])&&void 0!==_focusables$?_focusables$:null:null!==(_focusables=focusables[focusables.length-1])&&void 0!==_focusables?_focusables:null;var _focusables$}})); define("core/pending",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default= /** * A helper used to inform Behat that an operation is in progress and that Behat must wait for it to complete. * * @module core/pending * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.6 */ class{static request(pendingKey){return window.console.error("The core/pending::request method has been deprecated. "+"Please use one of the alternative calls to core/pending, for example \"new Pending('".concat(pendingKey,"')\". ")+"Called with ".concat(pendingKey)),new this(pendingKey)}constructor(){let resolver,rejector,pendingKey=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pendingPromise";const pendingPromise=this.constructor.Promise(((resolve,reject)=>{resolver=resolve,rejector=reject}),pendingKey);return pendingPromise.resolve=resolver,pendingPromise.reject=rejector,pendingPromise}static Promise(fn){let pendingKey=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pendingPromise";const resolver=new Promise(((resolve,reject)=>{M.util.js_pending(pendingKey),fn(resolve,reject)}));return resolver.then((()=>{M.util.js_complete(pendingKey)})).catch(),resolver}},_exports.default})); /** * @copyright 2015 Martin Mastny * @since 3.0 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/permissionmanager",["jquery","core/config","core/notification","core/templates","core/yui"],(function($,config,notification,templates,Y){var contextid,contextname,adminurl,overideableroles,SELECTORS_ADDROLE="a.allowlink, a.prohibitlink",SELECTORS_REMOVEROLE="a.preventlink, a.unprohibitlink",SELECTORS_UNPROHIBIT="a.unprohibitlink",rolesloadedevent=$.Event("rolesloaded"),panel=null,loadOverideableRoles=function(){var params={contextid:contextid,getroles:1,sesskey:config.sesskey};$.post(adminurl+"roles/ajax.php",params,null,"json").done((function(data){try{overideableroles=data,(loadOverideableRoles=function(){$("body").trigger(rolesloadedevent)})()}catch(err){notification.exception(err)}})).fail((function(jqXHR,status,error){notification.exception(error)}))},changePermissions=function(row,roleid,action){var params={contextid:contextid,roleid:roleid,sesskey:M.cfg.sesskey,action:action,capability:row.data("name")};$.post(adminurl+"roles/ajax.php",params,null,"json").done((function(data){var action=data;try{var templatedata={rolename:overideableroles[roleid],roleid:roleid,adminurl:adminurl,imageurl:M.util.image_url("t/delete","moodle")};switch(action){case"allow":templatedata.spanclass="allowed",templatedata.linkclass="preventlink",templatedata.action="prevent",templatedata.icon="t/delete",templatedata.iconalt=M.util.get_string("deletexrole","core_role",overideableroles[roleid]);break;case"prohibit":templatedata.spanclass="forbidden",templatedata.linkclass="unprohibitlink",templatedata.action="unprohibit",templatedata.icon="t/delete",templatedata.iconalt=M.util.get_string("deletexrole","core_role",overideableroles[roleid]);break;case"prevent":return void row.find('a[data-role-id="'+roleid+'"]').first().closest(".allowed").remove();case"unprohibit":return void row.find('a[data-role-id="'+roleid+'"]').first().closest(".forbidden").remove();default:return}templates.render("core/permissionmanager_role",templatedata).done((function(content){if("allow"==action)$(content).insertBefore(row.find(".allowmore").first());else if("prohibit"==action){$(content).insertBefore(row.find(".prohibitmore").first());var allowedLink=row.find(".allowedroles").first().find('a[data-role-id="'+roleid+'"]');allowedLink&&allowedLink.first().closest(".allowed").remove()}panel.hide()})).fail(notification.exception)}catch(err){notification.exception(err)}})).fail((function(jqXHR,status,error){notification.exception(error)}))},handleAddRole=function(e){e.preventDefault();var link=$(e.currentTarget);$("body").one("rolesloaded",(function(){Y.use("moodle-core-notification-dialogue",(function(){var i,existingrolelinks,action=link.data("action"),row=link.closest("tr.rolecap"),confirmationDetails={cap:row.data("humanname"),context:contextname},message=M.util.get_string("role"+action+"info","core_role",confirmationDetails);null===panel&&(panel=new M.core.dialogue({draggable:!0,modal:!0,closeButton:!0,width:"450px"})),panel.set("headerContent",M.util.get_string("role"+action+"header","core_role"));var roles=[];switch(action){case"allow":existingrolelinks=row.find(SELECTORS_REMOVEROLE);break;case"prohibit":existingrolelinks=row.find(SELECTORS_UNPROHIBIT)}for(i in overideableroles){var disabled="";existingrolelinks.filter("[data-role-id='"+i+"']").length&&(disabled="disabled");var roledetails={roleid:i,rolename:overideableroles[i],disabled:disabled};roles.push(roledetails)}templates.render("core/permissionmanager_panelcontent",{message:message,roles:roles}).done((function(content){panel.set("bodyContent",content),panel.show(),$("div.role_buttons").on("click","button",(function(e){var roleid=$(e.currentTarget).data("role-id");changePermissions(row,roleid,action)}))})).fail(notification.exception)}))})),loadOverideableRoles()},handleRemoveRole=function(e){e.preventDefault();var link=$(e.currentTarget);$("body").one("rolesloaded",(function(){var action=link.data("action"),roleid=link.data("role-id"),row=link.closest("tr.rolecap"),questionDetails={role:overideableroles[roleid],cap:row.data("humanname"),context:contextname};notification.confirm(M.util.get_string("confirmunassigntitle","core_role"),M.util.get_string("confirmrole"+action,"core_role",questionDetails),M.util.get_string("confirmunassignyes","core_role"),M.util.get_string("confirmunassignno","core_role"),(function(){changePermissions(row,roleid,action)}))})),loadOverideableRoles()};return{initialize:function(args){contextid=args.contextid,contextname=args.contextname,adminurl=args.adminurl;var body=$("body");body.on("click",SELECTORS_ADDROLE,handleAddRole),body.on("click",SELECTORS_REMOVEROLE,handleRemoveRole)}}})); /** * Controls the popover region element. * * See template: core/popover_region * * @module core/popover_region_controller * @copyright 2015 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 3.2 */ define("core/popover_region_controller",["jquery","core/str","core/custom_interaction_events"],(function($,str,customEvents){var SELECTORS_CONTENT=".popover-region-content",SELECTORS_CONTENT_CONTAINER=".popover-region-content-container",SELECTORS_MENU_CONTAINER=".popover-region-container",SELECTORS_MENU_TOGGLE=".popover-region-toggle",SELECTORS_CAN_RECEIVE_FOCUS='input:not([type="hidden"]), a[href], button, textarea, select, [tabindex]',PopoverRegionController=function(element){this.root=$(element),this.content=this.root.find(SELECTORS_CONTENT),this.contentContainer=this.root.find(SELECTORS_CONTENT_CONTAINER),this.menuContainer=this.root.find(SELECTORS_MENU_CONTAINER),this.menuToggle=this.root.find(SELECTORS_MENU_TOGGLE),this.isLoading=!1,this.promises={closeHandlers:$.Deferred(),navigationHandlers:$.Deferred()},this.registerBaseEventListeners()};return PopoverRegionController.prototype.events=function(){return{menuOpened:"popoverregion:menuopened",menuClosed:"popoverregion:menuclosed",startLoading:"popoverregion:startLoading",stopLoading:"popoverregion:stopLoading"}},PopoverRegionController.prototype.getContentContainer=function(){return this.contentContainer},PopoverRegionController.prototype.getContent=function(){return this.content},PopoverRegionController.prototype.isMenuOpen=function(){return!this.root.hasClass("collapsed")},PopoverRegionController.prototype.toggleMenu=function(){this.isMenuOpen()?this.closeMenu():this.openMenu()},PopoverRegionController.prototype.closeMenu=function(){this.isMenuOpen()&&(this.root.addClass("collapsed"),this.menuToggle.attr("aria-expanded","false"),this.menuContainer.attr("aria-hidden","true"),this.updateButtonAriaLabel(),this.updateFocusItemTabIndex(),this.root.trigger(this.events().menuClosed))},PopoverRegionController.prototype.openMenu=function(){this.isMenuOpen()||(this.root.removeClass("collapsed"),this.menuToggle.attr("aria-expanded","true"),this.menuContainer.attr("aria-hidden","false"),this.updateButtonAriaLabel(),this.updateFocusItemTabIndex(),this.promises.closeHandlers.resolve(),this.promises.navigationHandlers.resolve(),this.root.trigger(this.events().menuOpened))},PopoverRegionController.prototype.updateButtonAriaLabel=function(){this.isMenuOpen()?str.get_string("hidepopoverwindow").done(function(string){this.menuToggle.attr("aria-label",string)}.bind(this)):str.get_string("showpopoverwindow").done(function(string){this.menuToggle.attr("aria-label",string)}.bind(this))},PopoverRegionController.prototype.startLoading=function(){this.isLoading=!0,this.getContentContainer().addClass("loading"),this.getContentContainer().attr("aria-busy","true"),this.root.trigger(this.events().startLoading)},PopoverRegionController.prototype.stopLoading=function(){this.isLoading=!1,this.getContentContainer().removeClass("loading"),this.getContentContainer().attr("aria-busy","false"),this.root.trigger(this.events().stopLoading)},PopoverRegionController.prototype.focusMenuToggle=function(){this.menuToggle.focus()},PopoverRegionController.prototype.contentItemHasFocus=function(){return this.getContentItemWithFocus().length>0},PopoverRegionController.prototype.getContentItemWithFocus=function(){var currentFocus=$(document.activeElement),items=this.getContent().children(),currentItem=items.filter(currentFocus);return currentItem.length||(currentItem=items.has(currentFocus)),currentItem},PopoverRegionController.prototype.focusContentItem=function(item){item.is(SELECTORS_CAN_RECEIVE_FOCUS)?item.focus():item.find(SELECTORS_CAN_RECEIVE_FOCUS).first().focus()},PopoverRegionController.prototype.focusFirstContentItem=function(){this.focusContentItem(this.getContent().children().first())},PopoverRegionController.prototype.focusLastContentItem=function(){this.focusContentItem(this.getContent().children().last())},PopoverRegionController.prototype.focusNextContentItem=function(){var currentItem=this.getContentItemWithFocus();currentItem.length&¤tItem.next()&&this.focusContentItem(currentItem.next())},PopoverRegionController.prototype.focusPreviousContentItem=function(){var currentItem=this.getContentItemWithFocus();currentItem.length&¤tItem.prev()&&this.focusContentItem(currentItem.prev())},PopoverRegionController.prototype.registerBaseEventListeners=function(){customEvents.define(this.root,[customEvents.events.activate,customEvents.events.escape]),this.root.on(customEvents.events.activate,SELECTORS_MENU_TOGGLE,function(){this.toggleMenu()}.bind(this)),this.promises.closeHandlers.done(function(){this.root.on(customEvents.events.escape,function(){this.closeMenu(),this.focusMenuToggle()}.bind(this)),document.addEventListener("click",(e=>{const target=e.target;this.root.is(target)||this.root.has(target).length||this.closeMenu()}),!0),customEvents.define(this.getContentContainer(),[customEvents.events.scrollBottom])}.bind(this))},PopoverRegionController.prototype.registerListNavigationEventListeners=function(){customEvents.define(this.root,[customEvents.events.down]),this.root.on(customEvents.events.down,function(e,data){this.isMenuOpen()?this.contentItemHasFocus()?this.focusNextContentItem():this.focusFirstContentItem():(this.openMenu(),this.focusFirstContentItem()),data.originalEvent.preventDefault()}.bind(this)),this.promises.navigationHandlers.done(function(){customEvents.define(this.root,[customEvents.events.up,customEvents.events.home,customEvents.events.end]),this.root.on(customEvents.events.up,function(e,data){this.focusPreviousContentItem(),data.originalEvent.preventDefault()}.bind(this)),this.root.on(customEvents.events.home,function(e,data){this.focusFirstContentItem(),data.originalEvent.preventDefault()}.bind(this)),this.root.on(customEvents.events.end,function(e,data){this.focusLastContentItem(),data.originalEvent.preventDefault()}.bind(this))}.bind(this))},PopoverRegionController.prototype.updateFocusItemTabIndex=function(){this.isMenuOpen()?this.menuContainer.find(SELECTORS_CAN_RECEIVE_FOCUS).removeAttr("tabindex"):this.menuContainer.find(SELECTORS_CAN_RECEIVE_FOCUS).attr("tabindex","-1")},PopoverRegionController})); /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.12.6 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ !function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define("core/popper",factory):global.Popper=factory()}(window,(function(){for(var isBrowser="undefined"!=typeof window&&void 0!==window.document,longerTimeoutBrowsers=["Edge","Trident","Firefox"],timeoutDuration=0,i=0;i=0){timeoutDuration=1;break}var debounce=isBrowser&&window.Promise?function(fn){var called=!1;return function(){called||(called=!0,Promise.resolve().then((function(){called=!1,fn()})))}}:function(fn){var scheduled=!1;return function(){scheduled||(scheduled=!0,setTimeout((function(){scheduled=!1,fn()}),timeoutDuration))}};function isFunction(functionToCheck){return functionToCheck&&"[object Function]"==={}.toString.call(functionToCheck)}function getStyleComputedProperty(element,property){if(1!==element.nodeType)return[];var css=window.getComputedStyle(element,null);return property?css[property]:css}function getParentNode(element){return"HTML"===element.nodeName?element:element.parentNode||element.host}function getScrollParent(element){if(!element)return window.document.body;switch(element.nodeName){case"HTML":case"BODY":return element.ownerDocument.body;case"#document":return element.body}var _getStyleComputedProp=getStyleComputedProperty(element),overflow=_getStyleComputedProp.overflow,overflowX=_getStyleComputedProp.overflowX,overflowY=_getStyleComputedProp.overflowY;return/(auto|scroll)/.test(overflow+overflowY+overflowX)?element:getScrollParent(getParentNode(element))}function getOffsetParent(element){var offsetParent=element&&element.offsetParent,nodeName=offsetParent&&offsetParent.nodeName;return nodeName&&"BODY"!==nodeName&&"HTML"!==nodeName?-1!==["TD","TABLE"].indexOf(offsetParent.nodeName)&&"static"===getStyleComputedProperty(offsetParent,"position")?getOffsetParent(offsetParent):offsetParent:element?element.ownerDocument.documentElement:window.document.documentElement}function getRoot(node){return null!==node.parentNode?getRoot(node.parentNode):node}function findCommonOffsetParent(element1,element2){if(!(element1&&element1.nodeType&&element2&&element2.nodeType))return window.document.documentElement;var order=element1.compareDocumentPosition(element2)&Node.DOCUMENT_POSITION_FOLLOWING,start=order?element1:element2,end=order?element2:element1,range=document.createRange();range.setStart(start,0),range.setEnd(end,0);var element,nodeName,commonAncestorContainer=range.commonAncestorContainer;if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end))return"BODY"===(nodeName=(element=commonAncestorContainer).nodeName)||"HTML"!==nodeName&&getOffsetParent(element.firstElementChild)!==element?getOffsetParent(commonAncestorContainer):commonAncestorContainer;var element1root=getRoot(element1);return element1root.host?findCommonOffsetParent(element1root.host,element2):findCommonOffsetParent(element1,getRoot(element2).host)}function getScroll(element){var side=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",upperSide="top"===side?"scrollTop":"scrollLeft",nodeName=element.nodeName;if("BODY"===nodeName||"HTML"===nodeName){var html=element.ownerDocument.documentElement,scrollingElement=element.ownerDocument.scrollingElement||html;return scrollingElement[upperSide]}return element[upperSide]}function getBordersSize(styles,axis){var sideA="x"===axis?"Left":"Top",sideB="Left"===sideA?"Right":"Bottom";return+styles["border"+sideA+"Width"].split("px")[0]+ +styles["border"+sideB+"Width"].split("px")[0]}var isIE10=void 0,isIE10$1=function(){return void 0===isIE10&&(isIE10=-1!==navigator.appVersion.indexOf("MSIE 10")),isIE10};function getSize(axis,body,html,computedStyle){return Math.max(body["offset"+axis],body["scroll"+axis],html["client"+axis],html["offset"+axis],html["scroll"+axis],isIE10$1()?html["offset"+axis]+computedStyle["margin"+("Height"===axis?"Top":"Left")]+computedStyle["margin"+("Height"===axis?"Bottom":"Right")]:0)}function getWindowSizes(){var body=window.document.body,html=window.document.documentElement,computedStyle=isIE10$1()&&window.getComputedStyle(html);return{height:getSize("Height",body,html,computedStyle),width:getSize("Width",body,html,computedStyle)}}var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")},createClass=function(){function defineProperties(target,props){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],scrollTop=getScroll(element,"top"),scrollLeft=getScroll(element,"left"),modifier=subtract?-1:1;return rect.top+=scrollTop*modifier,rect.bottom+=scrollTop*modifier,rect.left+=scrollLeft*modifier,rect.right+=scrollLeft*modifier,rect}(offsets,parent)),offsets}function isFixed(element){var nodeName=element.nodeName;return"BODY"!==nodeName&&"HTML"!==nodeName&&("fixed"===getStyleComputedProperty(element,"position")||isFixed(getParentNode(element)))}function getBoundaries(popper,reference,padding,boundariesElement){var boundaries={top:0,left:0},offsetParent=findCommonOffsetParent(popper,reference);if("viewport"===boundariesElement)boundaries=function(element){var html=element.ownerDocument.documentElement,relativeOffset=getOffsetRectRelativeToArbitraryNode(element,html),width=Math.max(html.clientWidth,window.innerWidth||0),height=Math.max(html.clientHeight,window.innerHeight||0),scrollTop=getScroll(html),scrollLeft=getScroll(html,"left");return getClientRect({top:scrollTop-relativeOffset.top+relativeOffset.marginTop,left:scrollLeft-relativeOffset.left+relativeOffset.marginLeft,width:width,height:height})}(offsetParent);else{var boundariesNode=void 0;"scrollParent"===boundariesElement?"BODY"===(boundariesNode=getScrollParent(getParentNode(popper))).nodeName&&(boundariesNode=popper.ownerDocument.documentElement):boundariesNode="window"===boundariesElement?popper.ownerDocument.documentElement:boundariesElement;var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode,offsetParent);if("HTML"!==boundariesNode.nodeName||isFixed(offsetParent))boundaries=offsets;else{var _getWindowSizes=getWindowSizes(),height=_getWindowSizes.height,width=_getWindowSizes.width;boundaries.top+=offsets.top-offsets.marginTop,boundaries.bottom=height+offsets.top,boundaries.left+=offsets.left-offsets.marginLeft,boundaries.right=width+offsets.left}}return boundaries.left+=padding,boundaries.top+=padding,boundaries.right-=padding,boundaries.bottom-=padding,boundaries}function getArea(_ref){return _ref.width*_ref.height}function computeAutoPlacement(placement,refRect,popper,reference,boundariesElement){var padding=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===placement.indexOf("auto"))return placement;var boundaries=getBoundaries(popper,reference,padding,boundariesElement),rects={top:{width:boundaries.width,height:refRect.top-boundaries.top},right:{width:boundaries.right-refRect.right,height:boundaries.height},bottom:{width:boundaries.width,height:boundaries.bottom-refRect.bottom},left:{width:refRect.left-boundaries.left,height:boundaries.height}},sortedAreas=Object.keys(rects).map((function(key){return _extends({key:key},rects[key],{area:getArea(rects[key])})})).sort((function(a,b){return b.area-a.area})),filteredAreas=sortedAreas.filter((function(_ref2){var width=_ref2.width,height=_ref2.height;return width>=popper.clientWidth&&height>=popper.clientHeight})),computedPlacement=filteredAreas.length>0?filteredAreas[0].key:sortedAreas[0].key,variation=placement.split("-")[1];return computedPlacement+(variation?"-"+variation:"")}function getReferenceOffsets(state,popper,reference){return getOffsetRectRelativeToArbitraryNode(reference,findCommonOffsetParent(popper,reference))}function getOuterSizes(element){var styles=window.getComputedStyle(element),x=parseFloat(styles.marginTop)+parseFloat(styles.marginBottom),y=parseFloat(styles.marginLeft)+parseFloat(styles.marginRight);return{width:element.offsetWidth+y,height:element.offsetHeight+x}}function getOppositePlacement(placement){var hash={left:"right",right:"left",bottom:"top",top:"bottom"};return placement.replace(/left|right|bottom|top/g,(function(matched){return hash[matched]}))}function getPopperOffsets(popper,referenceOffsets,placement){placement=placement.split("-")[0];var popperRect=getOuterSizes(popper),popperOffsets={width:popperRect.width,height:popperRect.height},isHoriz=-1!==["right","left"].indexOf(placement),mainSide=isHoriz?"top":"left",secondarySide=isHoriz?"left":"top",measurement=isHoriz?"height":"width",secondaryMeasurement=isHoriz?"width":"height";return popperOffsets[mainSide]=referenceOffsets[mainSide]+referenceOffsets[measurement]/2-popperRect[measurement]/2,popperOffsets[secondarySide]=placement===secondarySide?referenceOffsets[secondarySide]-popperRect[secondaryMeasurement]:referenceOffsets[getOppositePlacement(secondarySide)],popperOffsets}function find(arr,check){return Array.prototype.find?arr.find(check):arr.filter(check)[0]}function runModifiers(modifiers,data,ends){return(void 0===ends?modifiers:modifiers.slice(0,function(arr,prop,value){if(Array.prototype.findIndex)return arr.findIndex((function(cur){return cur[prop]===value}));var match=find(arr,(function(obj){return obj[prop]===value}));return arr.indexOf(match)}(modifiers,"name",ends))).forEach((function(modifier){modifier.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var fn=modifier.function||modifier.fn;modifier.enabled&&isFunction(fn)&&(data.offsets.popper=getClientRect(data.offsets.popper),data.offsets.reference=getClientRect(data.offsets.reference),data=fn(data,modifier))})),data}function update(){if(!this.state.isDestroyed){var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};data.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference),data.placement=computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),data.originalPlacement=data.placement,data.offsets.popper=getPopperOffsets(this.popper,data.offsets.reference,data.placement),data.offsets.popper.position="absolute",data=runModifiers(this.modifiers,data),this.state.isCreated?this.options.onUpdate(data):(this.state.isCreated=!0,this.options.onCreate(data))}}function isModifierEnabled(modifiers,modifierName){return modifiers.some((function(_ref){var name=_ref.name;return _ref.enabled&&name===modifierName}))}function getSupportedPropertyName(property){for(var prefixes=[!1,"ms","Webkit","Moz","O"],upperProp=property.charAt(0).toUpperCase()+property.slice(1),i=0;i1&&void 0!==arguments[1]&&arguments[1],index=validPlacements.indexOf(placement),arr=validPlacements.slice(index+1).concat(validPlacements.slice(0,index));return counter?arr.reverse():arr}var BEHAVIORS_FLIP="flip",BEHAVIORS_CLOCKWISE="clockwise",BEHAVIORS_COUNTERCLOCKWISE="counterclockwise";function parseOffset(offset,popperOffsets,referenceOffsets,basePlacement){var offsets=[0,0],useHeight=-1!==["right","left"].indexOf(basePlacement),fragments=offset.split(/(\+|\-)/).map((function(frag){return frag.trim()})),divider=fragments.indexOf(find(fragments,(function(frag){return-1!==frag.search(/,|\s/)})));fragments[divider]&&-1===fragments[divider].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var splitRegex=/\s*,\s*|\s+/,ops=-1!==divider?[fragments.slice(0,divider).concat([fragments[divider].split(splitRegex)[0]]),[fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider+1))]:[fragments];return ops=ops.map((function(op,index){var measurement=(1===index?!useHeight:useHeight)?"height":"width",mergeWithPrevious=!1;return op.reduce((function(a,b){return""===a[a.length-1]&&-1!==["+","-"].indexOf(b)?(a[a.length-1]=b,mergeWithPrevious=!0,a):mergeWithPrevious?(a[a.length-1]+=b,mergeWithPrevious=!1,a):a.concat(b)}),[]).map((function(str){return function(str,measurement,popperOffsets,referenceOffsets){var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),value=+split[1],unit=split[2];if(!value)return str;if(0===unit.indexOf("%")){return getClientRect("%p"===unit?popperOffsets:referenceOffsets)[measurement]/100*value}if("vh"===unit||"vw"===unit)return("vh"===unit?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*value;return value}(str,measurement,popperOffsets,referenceOffsets)}))})),ops.forEach((function(op,index){op.forEach((function(frag,index2){isNumeric(frag)&&(offsets[index]+=frag*("-"===op[index2-1]?-1:1))}))})),offsets}var modifiers={shift:{order:100,enabled:!0,fn:function(data){var placement=data.placement,basePlacement=placement.split("-")[0],shiftvariation=placement.split("-")[1];if(shiftvariation){var _data$offsets=data.offsets,reference=_data$offsets.reference,popper=_data$offsets.popper,isVertical=-1!==["bottom","top"].indexOf(basePlacement),side=isVertical?"left":"top",measurement=isVertical?"width":"height",shiftOffsets={start:defineProperty({},side,reference[side]),end:defineProperty({},side,reference[side]+reference[measurement]-popper[measurement])};data.offsets.popper=_extends({},popper,shiftOffsets[shiftvariation])}return data}},offset:{order:200,enabled:!0,fn:function(data,_ref){var offset=_ref.offset,placement=data.placement,_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference,basePlacement=placement.split("-")[0],offsets=void 0;return offsets=isNumeric(+offset)?[+offset,0]:parseOffset(offset,popper,reference,basePlacement),"left"===basePlacement?(popper.top+=offsets[0],popper.left-=offsets[1]):"right"===basePlacement?(popper.top+=offsets[0],popper.left+=offsets[1]):"top"===basePlacement?(popper.left+=offsets[0],popper.top-=offsets[1]):"bottom"===basePlacement&&(popper.left+=offsets[0],popper.top+=offsets[1]),data.popper=popper,data},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(data,options){var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper);data.instance.reference===boundariesElement&&(boundariesElement=getOffsetParent(boundariesElement));var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,boundariesElement);options.boundaries=boundaries;var order=options.priority,popper=data.offsets.popper,check={primary:function(placement){var value=popper[placement];return popper[placement]boundaries[placement]&&!options.escapeWithReference&&(value=Math.min(popper[mainSide],boundaries[placement]-("right"===placement?popper.width:popper.height))),defineProperty({},mainSide,value)}};return order.forEach((function(placement){var side=-1!==["left","top"].indexOf(placement)?"primary":"secondary";popper=_extends({},popper,check[side](placement))})),data.offsets.popper=popper,data},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(data){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference,placement=data.placement.split("-")[0],floor=Math.floor,isVertical=-1!==["top","bottom"].indexOf(placement),side=isVertical?"right":"bottom",opSide=isVertical?"left":"top",measurement=isVertical?"width":"height";return popper[side]floor(reference[side])&&(data.offsets.popper[opSide]=floor(reference[side])),data}},arrow:{order:500,enabled:!0,fn:function(data,options){if(!isModifierRequired(data.instance.modifiers,"arrow","keepTogether"))return data;var arrowElement=options.element;if("string"==typeof arrowElement){if(!(arrowElement=data.instance.popper.querySelector(arrowElement)))return data}else if(!data.instance.popper.contains(arrowElement))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),data;var placement=data.placement.split("-")[0],_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference,isVertical=-1!==["left","right"].indexOf(placement),len=isVertical?"height":"width",sideCapitalized=isVertical?"Top":"Left",side=sideCapitalized.toLowerCase(),altSide=isVertical?"left":"top",opSide=isVertical?"bottom":"right",arrowElementSize=getOuterSizes(arrowElement)[len];reference[opSide]-arrowElementSizepopper[opSide]&&(data.offsets.popper[side]+=reference[side]+arrowElementSize-popper[opSide]);var center=reference[side]+reference[len]/2-arrowElementSize/2,popperMarginSide=getStyleComputedProperty(data.instance.popper,"margin"+sideCapitalized).replace("px",""),sideValue=center-getClientRect(data.offsets.popper)[side]-popperMarginSide;return sideValue=Math.max(Math.min(popper[len]-arrowElementSize,sideValue),0),data.arrowElement=arrowElement,data.offsets.arrow={},data.offsets.arrow[side]=Math.round(sideValue),data.offsets.arrow[altSide]="",data},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(data,options){if(isModifierEnabled(data.instance.modifiers,"inner"))return data;if(data.flipped&&data.placement===data.originalPlacement)return data;var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,options.boundariesElement),placement=data.placement.split("-")[0],placementOpposite=getOppositePlacement(placement),variation=data.placement.split("-")[1]||"",flipOrder=[];switch(options.behavior){case BEHAVIORS_FLIP:flipOrder=[placement,placementOpposite];break;case BEHAVIORS_CLOCKWISE:flipOrder=clockwise(placement);break;case BEHAVIORS_COUNTERCLOCKWISE:flipOrder=clockwise(placement,!0);break;default:flipOrder=options.behavior}return flipOrder.forEach((function(step,index){if(placement!==step||flipOrder.length===index+1)return data;placement=data.placement.split("-")[0],placementOpposite=getOppositePlacement(placement);var popperOffsets=data.offsets.popper,refOffsets=data.offsets.reference,floor=Math.floor,overlapsRef="left"===placement&&floor(popperOffsets.right)>floor(refOffsets.left)||"right"===placement&&floor(popperOffsets.left)floor(refOffsets.top)||"bottom"===placement&&floor(popperOffsets.top)floor(boundaries.right),overflowsTop=floor(popperOffsets.top)floor(boundaries.bottom),overflowsBoundaries="left"===placement&&overflowsLeft||"right"===placement&&overflowsRight||"top"===placement&&overflowsTop||"bottom"===placement&&overflowsBottom,isVertical=-1!==["top","bottom"].indexOf(placement),flippedVariation=!!options.flipVariations&&(isVertical&&"start"===variation&&overflowsLeft||isVertical&&"end"===variation&&overflowsRight||!isVertical&&"start"===variation&&overflowsTop||!isVertical&&"end"===variation&&overflowsBottom);(overlapsRef||overflowsBoundaries||flippedVariation)&&(data.flipped=!0,(overlapsRef||overflowsBoundaries)&&(placement=flipOrder[index+1]),flippedVariation&&(variation=function(variation){return"end"===variation?"start":"start"===variation?"end":variation}(variation)),data.placement=placement+(variation?"-"+variation:""),data.offsets.popper=_extends({},data.offsets.popper,getPopperOffsets(data.instance.popper,data.offsets.reference,data.placement)),data=runModifiers(data.instance.modifiers,data,"flip"))})),data},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(data){var placement=data.placement,basePlacement=placement.split("-")[0],_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference,isHoriz=-1!==["left","right"].indexOf(basePlacement),subtractLength=-1===["top","left"].indexOf(basePlacement);return popper[isHoriz?"left":"top"]=reference[basePlacement]-(subtractLength?popper[isHoriz?"width":"height"]:0),data.placement=getOppositePlacement(placement),data.offsets.popper=getClientRect(popper),data}},hide:{order:800,enabled:!0,fn:function(data){if(!isModifierRequired(data.instance.modifiers,"hide","preventOverflow"))return data;var refRect=data.offsets.reference,bound=find(data.instance.modifiers,(function(modifier){return"preventOverflow"===modifier.name})).boundaries;if(refRect.bottombound.right||refRect.top>bound.bottom||refRect.right2&&void 0!==arguments[2]?arguments[2]:{};classCallCheck(this,Popper),this.scheduleUpdate=function(){return requestAnimationFrame(_this.update)},this.update=debounce(this.update.bind(this)),this.options=_extends({},Popper.Defaults,options),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=reference&&reference.jquery?reference[0]:reference,this.popper=popper&&popper.jquery?popper[0]:popper,this.options.modifiers={},Object.keys(_extends({},Popper.Defaults.modifiers,options.modifiers)).forEach((function(name){_this.options.modifiers[name]=_extends({},Popper.Defaults.modifiers[name]||{},options.modifiers?options.modifiers[name]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(name){return _extends({name:name},_this.options.modifiers[name])})).sort((function(a,b){return a.order-b.order})),this.modifiers.forEach((function(modifierOptions){modifierOptions.enabled&&isFunction(modifierOptions.onLoad)&&modifierOptions.onLoad(_this.reference,_this.popper,_this.options,modifierOptions,_this.state)})),this.update();var eventsEnabled=this.options.eventsEnabled;eventsEnabled&&this.enableEventListeners(),this.state.eventsEnabled=eventsEnabled}return createClass(Popper,[{key:"update",value:function(){return update.call(this)}},{key:"destroy",value:function(){return destroy.call(this)}},{key:"enableEventListeners",value:function(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function(){return disableEventListeners.call(this)}}]),Popper}();return Popper.Utils=("undefined"!=typeof window?window:global).PopperUtils,Popper.placements=placements,Popper.Defaults=Defaults,Popper})); var global,factory;global=window,factory=function(exports){function getWindow(node){if(null==node)return window;if("[object Window]"!==node.toString()){var ownerDocument=node.ownerDocument;return ownerDocument&&ownerDocument.defaultView||window}return node}function isElement(node){return node instanceof getWindow(node).Element||node instanceof Element}function isHTMLElement(node){return node instanceof getWindow(node).HTMLElement||node instanceof HTMLElement}function isShadowRoot(node){return"undefined"!=typeof ShadowRoot&&(node instanceof getWindow(node).ShadowRoot||node instanceof ShadowRoot)}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var uaData=navigator.userAgentData;return null!=uaData&&uaData.brands&&Array.isArray(uaData.brands)?uaData.brands.map((function(item){return item.brand+"/"+item.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(element,includeScale,isFixedStrategy){void 0===includeScale&&(includeScale=!1),void 0===isFixedStrategy&&(isFixedStrategy=!1);var clientRect=element.getBoundingClientRect(),scaleX=1,scaleY=1;includeScale&&isHTMLElement(element)&&(scaleX=element.offsetWidth>0&&round(clientRect.width)/element.offsetWidth||1,scaleY=element.offsetHeight>0&&round(clientRect.height)/element.offsetHeight||1);var visualViewport=(isElement(element)?getWindow(element):window).visualViewport,addVisualOffsets=!isLayoutViewport()&&isFixedStrategy,x=(clientRect.left+(addVisualOffsets&&visualViewport?visualViewport.offsetLeft:0))/scaleX,y=(clientRect.top+(addVisualOffsets&&visualViewport?visualViewport.offsetTop:0))/scaleY,width=clientRect.width/scaleX,height=clientRect.height/scaleY;return{width:width,height:height,top:y,right:x+width,bottom:y+height,left:x,x:x,y:y}}function getWindowScroll(node){var win=getWindow(node);return{scrollLeft:win.pageXOffset,scrollTop:win.pageYOffset}}function getNodeName(element){return element?(element.nodeName||"").toLowerCase():null}function getDocumentElement(element){return((isElement(element)?element.ownerDocument:element.document)||window.document).documentElement}function getWindowScrollBarX(element){return getBoundingClientRect(getDocumentElement(element)).left+getWindowScroll(element).scrollLeft}function getComputedStyle(element){return getWindow(element).getComputedStyle(element)}function isScrollParent(element){var _getComputedStyle=getComputedStyle(element),overflow=_getComputedStyle.overflow,overflowX=_getComputedStyle.overflowX,overflowY=_getComputedStyle.overflowY;return/auto|scroll|overlay|hidden/.test(overflow+overflowY+overflowX)}function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){void 0===isFixed&&(isFixed=!1);var node,element,isOffsetParentAnElement=isHTMLElement(offsetParent),offsetParentIsScaled=isHTMLElement(offsetParent)&&function(element){var rect=element.getBoundingClientRect(),scaleX=round(rect.width)/element.offsetWidth||1,scaleY=round(rect.height)/element.offsetHeight||1;return 1!==scaleX||1!==scaleY}(offsetParent),documentElement=getDocumentElement(offsetParent),rect=getBoundingClientRect(elementOrVirtualElement,offsetParentIsScaled,isFixed),scroll={scrollLeft:0,scrollTop:0},offsets={x:0,y:0};return(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&(("body"!==getNodeName(offsetParent)||isScrollParent(documentElement))&&(scroll=(node=offsetParent)!==getWindow(node)&&isHTMLElement(node)?{scrollLeft:(element=node).scrollLeft,scrollTop:element.scrollTop}:getWindowScroll(node)),isHTMLElement(offsetParent)?((offsets=getBoundingClientRect(offsetParent,!0)).x+=offsetParent.clientLeft,offsets.y+=offsetParent.clientTop):documentElement&&(offsets.x=getWindowScrollBarX(documentElement))),{x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height}}function getLayoutRect(element){var clientRect=getBoundingClientRect(element),width=element.offsetWidth,height=element.offsetHeight;return Math.abs(clientRect.width-width)<=1&&(width=clientRect.width),Math.abs(clientRect.height-height)<=1&&(height=clientRect.height),{x:element.offsetLeft,y:element.offsetTop,width:width,height:height}}function getParentNode(element){return"html"===getNodeName(element)?element:element.assignedSlot||element.parentNode||(isShadowRoot(element)?element.host:null)||getDocumentElement(element)}function getScrollParent(node){return["html","body","#document"].indexOf(getNodeName(node))>=0?node.ownerDocument.body:isHTMLElement(node)&&isScrollParent(node)?node:getScrollParent(getParentNode(node))}function listScrollParents(element,list){var _element$ownerDocumen;void 0===list&&(list=[]);var scrollParent=getScrollParent(element),isBody=scrollParent===(null==(_element$ownerDocumen=element.ownerDocument)?void 0:_element$ownerDocumen.body),win=getWindow(scrollParent),target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent,updatedList=list.concat(target);return isBody?updatedList:updatedList.concat(listScrollParents(getParentNode(target)))}function isTableElement(element){return["table","td","th"].indexOf(getNodeName(element))>=0}function getTrueOffsetParent(element){return isHTMLElement(element)&&"fixed"!==getComputedStyle(element).position?element.offsetParent:null}function getOffsetParent(element){for(var window=getWindow(element),offsetParent=getTrueOffsetParent(element);offsetParent&&isTableElement(offsetParent)&&"static"===getComputedStyle(offsetParent).position;)offsetParent=getTrueOffsetParent(offsetParent);return offsetParent&&("html"===getNodeName(offsetParent)||"body"===getNodeName(offsetParent)&&"static"===getComputedStyle(offsetParent).position)?window:offsetParent||function(element){var isFirefox=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(element)&&"fixed"===getComputedStyle(element).position)return null;var currentNode=getParentNode(element);for(isShadowRoot(currentNode)&&(currentNode=currentNode.host);isHTMLElement(currentNode)&&["html","body"].indexOf(getNodeName(currentNode))<0;){var css=getComputedStyle(currentNode);if("none"!==css.transform||"none"!==css.perspective||"paint"===css.contain||-1!==["transform","perspective"].indexOf(css.willChange)||isFirefox&&"filter"===css.willChange||isFirefox&&css.filter&&"none"!==css.filter)return currentNode;currentNode=currentNode.parentNode}return null}(element)||window}var top="top",bottom="bottom",right="right",left="left",basePlacements=[top,bottom,right,left],variationPlacements=basePlacements.reduce((function(acc,placement){return acc.concat([placement+"-start",placement+"-end"])}),[]),placements=[].concat(basePlacements,["auto"]).reduce((function(acc,placement){return acc.concat([placement,placement+"-start",placement+"-end"])}),[]),modifierPhases=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function order(modifiers){var map=new Map,visited=new Set,result=[];function sort(modifier){visited.add(modifier.name),[].concat(modifier.requires||[],modifier.requiresIfExists||[]).forEach((function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);depModifier&&sort(depModifier)}})),result.push(modifier)}return modifiers.forEach((function(modifier){map.set(modifier.name,modifier)})),modifiers.forEach((function(modifier){visited.has(modifier.name)||sort(modifier)})),result}function contains(parent,child){var rootNode=child.getRootNode&&child.getRootNode();if(parent.contains(child))return!0;if(rootNode&&isShadowRoot(rootNode)){var next=child;do{if(next&&parent.isSameNode(next))return!0;next=next.parentNode||next.host}while(next)}return!1}function rectToClientRect(rect){return Object.assign({},rect,{left:rect.x,top:rect.y,right:rect.x+rect.width,bottom:rect.y+rect.height})}function getClientRectFromMixedType(element,clippingParent,strategy){return"viewport"===clippingParent?rectToClientRect(function(element,strategy){var win=getWindow(element),html=getDocumentElement(element),visualViewport=win.visualViewport,width=html.clientWidth,height=html.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;var layoutViewport=isLayoutViewport();(layoutViewport||!layoutViewport&&"fixed"===strategy)&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width:width,height:height,x:x+getWindowScrollBarX(element),y:y}}(element,strategy)):isElement(clippingParent)?function(element,strategy){var rect=getBoundingClientRect(element,!1,"fixed"===strategy);return rect.top=rect.top+element.clientTop,rect.left=rect.left+element.clientLeft,rect.bottom=rect.top+element.clientHeight,rect.right=rect.left+element.clientWidth,rect.width=element.clientWidth,rect.height=element.clientHeight,rect.x=rect.left,rect.y=rect.top,rect}(clippingParent,strategy):rectToClientRect(function(element){var _element$ownerDocumen,html=getDocumentElement(element),winScroll=getWindowScroll(element),body=null==(_element$ownerDocumen=element.ownerDocument)?void 0:_element$ownerDocumen.body,width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0),height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0),x=-winScroll.scrollLeft+getWindowScrollBarX(element),y=-winScroll.scrollTop;return"rtl"===getComputedStyle(body||html).direction&&(x+=max(html.clientWidth,body?body.clientWidth:0)-width),{width:width,height:height,x:x,y:y}}(getDocumentElement(element)))}function getClippingRect(element,boundary,rootBoundary,strategy){var mainClippingParents="clippingParents"===boundary?function(element){var clippingParents=listScrollParents(getParentNode(element)),clipperElement=["absolute","fixed"].indexOf(getComputedStyle(element).position)>=0&&isHTMLElement(element)?getOffsetParent(element):element;return isElement(clipperElement)?clippingParents.filter((function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&"body"!==getNodeName(clippingParent)})):[]}(element):[].concat(boundary),clippingParents=[].concat(mainClippingParents,[rootBoundary]),firstClippingParent=clippingParents[0],clippingRect=clippingParents.reduce((function(accRect,clippingParent){var rect=getClientRectFromMixedType(element,clippingParent,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect}),getClientRectFromMixedType(element,firstClippingParent,strategy));return clippingRect.width=clippingRect.right-clippingRect.left,clippingRect.height=clippingRect.bottom-clippingRect.top,clippingRect.x=clippingRect.left,clippingRect.y=clippingRect.top,clippingRect}function getBasePlacement(placement){return placement.split("-")[0]}function getVariation(placement){return placement.split("-")[1]}function getMainAxisFromPlacement(placement){return["top","bottom"].indexOf(placement)>=0?"x":"y"}function computeOffsets(_ref){var offsets,reference=_ref.reference,element=_ref.element,placement=_ref.placement,basePlacement=placement?getBasePlacement(placement):null,variation=placement?getVariation(placement):null,commonX=reference.x+reference.width/2-element.width/2,commonY=reference.y+reference.height/2-element.height/2;switch(basePlacement){case top:offsets={x:commonX,y:reference.y-element.height};break;case bottom:offsets={x:commonX,y:reference.y+reference.height};break;case right:offsets={x:reference.x+reference.width,y:commonY};break;case left:offsets={x:reference.x-element.width,y:commonY};break;default:offsets={x:reference.x,y:reference.y}}var mainAxis=basePlacement?getMainAxisFromPlacement(basePlacement):null;if(null!=mainAxis){var len="y"===mainAxis?"height":"width";switch(variation){case"start":offsets[mainAxis]=offsets[mainAxis]-(reference[len]/2-element[len]/2);break;case"end":offsets[mainAxis]=offsets[mainAxis]+(reference[len]/2-element[len]/2)}}return offsets}function mergePaddingObject(paddingObject){return Object.assign({},{top:0,right:0,bottom:0,left:0},paddingObject)}function expandToHashMap(value,keys){return keys.reduce((function(hashMap,key){return hashMap[key]=value,hashMap}),{})}function detectOverflow(state,options){void 0===options&&(options={});var _options=options,_options$placement=_options.placement,placement=void 0===_options$placement?state.placement:_options$placement,_options$strategy=_options.strategy,strategy=void 0===_options$strategy?state.strategy:_options$strategy,_options$boundary=_options.boundary,boundary=void 0===_options$boundary?"clippingParents":_options$boundary,_options$rootBoundary=_options.rootBoundary,rootBoundary=void 0===_options$rootBoundary?"viewport":_options$rootBoundary,_options$elementConte=_options.elementContext,elementContext=void 0===_options$elementConte?"popper":_options$elementConte,_options$altBoundary=_options.altBoundary,altBoundary=void 0!==_options$altBoundary&&_options$altBoundary,_options$padding=_options.padding,padding=void 0===_options$padding?0:_options$padding,paddingObject=mergePaddingObject("number"!=typeof padding?padding:expandToHashMap(padding,basePlacements)),altContext="popper"===elementContext?"reference":"popper",popperRect=state.rects.popper,element=state.elements[altBoundary?altContext:elementContext],clippingClientRect=getClippingRect(isElement(element)?element:element.contextElement||getDocumentElement(state.elements.popper),boundary,rootBoundary,strategy),referenceClientRect=getBoundingClientRect(state.elements.reference),popperOffsets=computeOffsets({reference:referenceClientRect,element:popperRect,strategy:"absolute",placement:placement}),popperClientRect=rectToClientRect(Object.assign({},popperRect,popperOffsets)),elementClientRect="popper"===elementContext?popperClientRect:referenceClientRect,overflowOffsets={top:clippingClientRect.top-elementClientRect.top+paddingObject.top,bottom:elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom,left:clippingClientRect.left-elementClientRect.left+paddingObject.left,right:elementClientRect.right-clippingClientRect.right+paddingObject.right},offsetData=state.modifiersData.offset;if("popper"===elementContext&&offsetData){var offset=offsetData[placement];Object.keys(overflowOffsets).forEach((function(key){var multiply=[right,bottom].indexOf(key)>=0?1:-1,axis=[top,bottom].indexOf(key)>=0?"y":"x";overflowOffsets[key]+=offset[axis]*multiply}))}return overflowOffsets}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return!args.some((function(element){return!(element&&"function"==typeof element.getBoundingClientRect)}))}function popperGenerator(generatorOptions){void 0===generatorOptions&&(generatorOptions={});var _generatorOptions=generatorOptions,_generatorOptions$def=_generatorOptions.defaultModifiers,defaultModifiers=void 0===_generatorOptions$def?[]:_generatorOptions$def,_generatorOptions$def2=_generatorOptions.defaultOptions,defaultOptions=void 0===_generatorOptions$def2?DEFAULT_OPTIONS:_generatorOptions$def2;return function(reference,popper,options){void 0===options&&(options=defaultOptions);var fn,pending,state={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,defaultOptions),modifiersData:{},elements:{reference:reference,popper:popper},attributes:{},styles:{}},effectCleanupFns=[],isDestroyed=!1,instance={state:state,setOptions:function(setOptionsAction){var options="function"==typeof setOptionsAction?setOptionsAction(state.options):setOptionsAction;cleanupModifierEffects(),state.options=Object.assign({},defaultOptions,state.options,options),state.scrollParents={reference:isElement(reference)?listScrollParents(reference):reference.contextElement?listScrollParents(reference.contextElement):[],popper:listScrollParents(popper)};var modifiers,merged,orderedModifiers=function(modifiers){var orderedModifiers=order(modifiers);return modifierPhases.reduce((function(acc,phase){return acc.concat(orderedModifiers.filter((function(modifier){return modifier.phase===phase})))}),[])}((modifiers=[].concat(defaultModifiers,state.options.modifiers),merged=modifiers.reduce((function(merged,current){var existing=merged[current.name];return merged[current.name]=existing?Object.assign({},existing,current,{options:Object.assign({},existing.options,current.options),data:Object.assign({},existing.data,current.data)}):current,merged}),{}),Object.keys(merged).map((function(key){return merged[key]}))));return state.orderedModifiers=orderedModifiers.filter((function(m){return m.enabled})),state.orderedModifiers.forEach((function(_ref){var name=_ref.name,_ref$options=_ref.options,options=void 0===_ref$options?{}:_ref$options,effect=_ref.effect;if("function"==typeof effect){var cleanupFn=effect({state:state,name:name,instance:instance,options:options}),noopFn=function(){};effectCleanupFns.push(cleanupFn||noopFn)}})),instance.update()},forceUpdate:function(){if(!isDestroyed){var _state$elements=state.elements,reference=_state$elements.reference,popper=_state$elements.popper;if(areValidElements(reference,popper)){state.rects={reference:getCompositeRect(reference,getOffsetParent(popper),"fixed"===state.options.strategy),popper:getLayoutRect(popper)},state.reset=!1,state.placement=state.options.placement,state.orderedModifiers.forEach((function(modifier){return state.modifiersData[modifier.name]=Object.assign({},modifier.data)}));for(var index=0;index=0?-1:1,_ref="function"==typeof offset?offset(Object.assign({},rects,{placement:placement})):offset,skidding=_ref[0],distance=_ref[1];return skidding=skidding||0,distance=(distance||0)*invertDistance,[left,right].indexOf(basePlacement)>=0?{x:distance,y:skidding}:{x:skidding,y:distance}}(placement,state.rects,offset),acc}),{}),_data$state$placement=data[state.placement],x=_data$state$placement.x,y=_data$state$placement.y;null!=state.modifiersData.popperOffsets&&(state.modifiersData.popperOffsets.x+=x,state.modifiersData.popperOffsets.y+=y),state.modifiersData[name]=data}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,(function(matched){return hash$1[matched]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(placement){return placement.replace(/start|end/g,(function(matched){return hash[matched]}))}function computeAutoPlacement(state,options){void 0===options&&(options={});var _options=options,placement=_options.placement,boundary=_options.boundary,rootBoundary=_options.rootBoundary,padding=_options.padding,flipVariations=_options.flipVariations,_options$allowedAutoP=_options.allowedAutoPlacements,allowedAutoPlacements=void 0===_options$allowedAutoP?placements:_options$allowedAutoP,variation=getVariation(placement),placements$1=variation?flipVariations?variationPlacements:variationPlacements.filter((function(placement){return getVariation(placement)===variation})):basePlacements,allowedPlacements=placements$1.filter((function(placement){return allowedAutoPlacements.indexOf(placement)>=0}));0===allowedPlacements.length&&(allowedPlacements=placements$1);var overflows=allowedPlacements.reduce((function(acc,placement){return acc[placement]=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,padding:padding})[getBasePlacement(placement)],acc}),{});return Object.keys(overflows).sort((function(a,b){return overflows[a]-overflows[b]}))}var flip$1={name:"flip",enabled:!0,phase:"main",fn:function(_ref){var state=_ref.state,options=_ref.options,name=_ref.name;if(!state.modifiersData[name]._skip){for(var _options$mainAxis=options.mainAxis,checkMainAxis=void 0===_options$mainAxis||_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=void 0===_options$altAxis||_options$altAxis,specifiedFallbackPlacements=options.fallbackPlacements,padding=options.padding,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,_options$flipVariatio=options.flipVariations,flipVariations=void 0===_options$flipVariatio||_options$flipVariatio,allowedAutoPlacements=options.allowedAutoPlacements,preferredPlacement=state.options.placement,basePlacement=getBasePlacement(preferredPlacement),fallbackPlacements=specifiedFallbackPlacements||(basePlacement!==preferredPlacement&&flipVariations?function(placement){if("auto"===getBasePlacement(placement))return[];var oppositePlacement=getOppositePlacement(placement);return[getOppositeVariationPlacement(placement),oppositePlacement,getOppositeVariationPlacement(oppositePlacement)]}(preferredPlacement):[getOppositePlacement(preferredPlacement)]),placements=[preferredPlacement].concat(fallbackPlacements).reduce((function(acc,placement){return acc.concat("auto"===getBasePlacement(placement)?computeAutoPlacement(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,padding:padding,flipVariations:flipVariations,allowedAutoPlacements:allowedAutoPlacements}):placement)}),[]),referenceRect=state.rects.reference,popperRect=state.rects.popper,checksMap=new Map,makeFallbackChecks=!0,firstFittingPlacement=placements[0],i=0;i=0,len=isVertical?"width":"height",overflow=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,altBoundary:altBoundary,padding:padding}),mainVariationSide=isVertical?isStartVariation?right:left:isStartVariation?bottom:top;referenceRect[len]>popperRect[len]&&(mainVariationSide=getOppositePlacement(mainVariationSide));var altVariationSide=getOppositePlacement(mainVariationSide),checks=[];if(checkMainAxis&&checks.push(overflow[_basePlacement]<=0),checkAltAxis&&checks.push(overflow[mainVariationSide]<=0,overflow[altVariationSide]<=0),checks.every((function(check){return check}))){firstFittingPlacement=placement,makeFallbackChecks=!1;break}checksMap.set(placement,checks)}if(makeFallbackChecks)for(var _loop=function(_i){var fittingPlacement=placements.find((function(placement){var checks=checksMap.get(placement);if(checks)return checks.slice(0,_i).every((function(check){return check}))}));if(fittingPlacement)return firstFittingPlacement=fittingPlacement,"break"},_i=flipVariations?3:1;_i>0&&"break"!==_loop(_i);_i--);state.placement!==firstFittingPlacement&&(state.modifiersData[name]._skip=!0,state.placement=firstFittingPlacement,state.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function within(min$1,value,max$1){return max(min$1,min(value,max$1))}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:function(_ref){var state=_ref.state,options=_ref.options,name=_ref.name,_options$mainAxis=options.mainAxis,checkMainAxis=void 0===_options$mainAxis||_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=void 0!==_options$altAxis&&_options$altAxis,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,padding=options.padding,_options$tether=options.tether,tether=void 0===_options$tether||_options$tether,_options$tetherOffset=options.tetherOffset,tetherOffset=void 0===_options$tetherOffset?0:_options$tetherOffset,overflow=detectOverflow(state,{boundary:boundary,rootBoundary:rootBoundary,padding:padding,altBoundary:altBoundary}),basePlacement=getBasePlacement(state.placement),variation=getVariation(state.placement),isBasePlacement=!variation,mainAxis=getMainAxisFromPlacement(basePlacement),altAxis="x"===mainAxis?"y":"x",popperOffsets=state.modifiersData.popperOffsets,referenceRect=state.rects.reference,popperRect=state.rects.popper,tetherOffsetValue="function"==typeof tetherOffset?tetherOffset(Object.assign({},state.rects,{placement:state.placement})):tetherOffset,normalizedTetherOffsetValue="number"==typeof tetherOffsetValue?{mainAxis:tetherOffsetValue,altAxis:tetherOffsetValue}:Object.assign({mainAxis:0,altAxis:0},tetherOffsetValue),offsetModifierState=state.modifiersData.offset?state.modifiersData.offset[state.placement]:null,data={x:0,y:0};if(popperOffsets){if(checkMainAxis){var _offsetModifierState$,mainSide="y"===mainAxis?top:left,altSide="y"===mainAxis?bottom:right,len="y"===mainAxis?"height":"width",offset=popperOffsets[mainAxis],min$1=offset+overflow[mainSide],max$1=offset-overflow[altSide],additive=tether?-popperRect[len]/2:0,minLen="start"===variation?referenceRect[len]:popperRect[len],maxLen="start"===variation?-popperRect[len]:-referenceRect[len],arrowElement=state.elements.arrow,arrowRect=tether&&arrowElement?getLayoutRect(arrowElement):{width:0,height:0},arrowPaddingObject=state.modifiersData["arrow#persistent"]?state.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},arrowPaddingMin=arrowPaddingObject[mainSide],arrowPaddingMax=arrowPaddingObject[altSide],arrowLen=within(0,referenceRect[len],arrowRect[len]),minOffset=isBasePlacement?referenceRect[len]/2-additive-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis:minLen-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis,maxOffset=isBasePlacement?-referenceRect[len]/2+additive+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis:maxLen+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis,arrowOffsetParent=state.elements.arrow&&getOffsetParent(state.elements.arrow),clientOffset=arrowOffsetParent?"y"===mainAxis?arrowOffsetParent.clientTop||0:arrowOffsetParent.clientLeft||0:0,offsetModifierValue=null!=(_offsetModifierState$=null==offsetModifierState?void 0:offsetModifierState[mainAxis])?_offsetModifierState$:0,tetherMax=offset+maxOffset-offsetModifierValue,preventedOffset=within(tether?min(min$1,offset+minOffset-offsetModifierValue-clientOffset):min$1,offset,tether?max(max$1,tetherMax):max$1);popperOffsets[mainAxis]=preventedOffset,data[mainAxis]=preventedOffset-offset}if(checkAltAxis){var _offsetModifierState$2,_mainSide="x"===mainAxis?top:left,_altSide="x"===mainAxis?bottom:right,_offset=popperOffsets[altAxis],_len="y"===altAxis?"height":"width",_min=_offset+overflow[_mainSide],_max=_offset-overflow[_altSide],isOriginSide=-1!==[top,left].indexOf(basePlacement),_offsetModifierValue=null!=(_offsetModifierState$2=null==offsetModifierState?void 0:offsetModifierState[altAxis])?_offsetModifierState$2:0,_tetherMin=isOriginSide?_min:_offset-referenceRect[_len]-popperRect[_len]-_offsetModifierValue+normalizedTetherOffsetValue.altAxis,_tetherMax=isOriginSide?_offset+referenceRect[_len]+popperRect[_len]-_offsetModifierValue-normalizedTetherOffsetValue.altAxis:_max,_preventedOffset=tether&&isOriginSide?function(min,value,max){var v=within(min,value,max);return v>max?max:v}(_tetherMin,_offset,_tetherMax):within(tether?_tetherMin:_min,_offset,tether?_tetherMax:_max);popperOffsets[altAxis]=_preventedOffset,data[altAxis]=_preventedOffset-_offset}state.modifiersData[name]=data}},requiresIfExists:["offset"]},arrow$1={name:"arrow",enabled:!0,phase:"main",fn:function(_ref){var _state$modifiersData$,state=_ref.state,name=_ref.name,options=_ref.options,arrowElement=state.elements.arrow,popperOffsets=state.modifiersData.popperOffsets,basePlacement=getBasePlacement(state.placement),axis=getMainAxisFromPlacement(basePlacement),len=[left,right].indexOf(basePlacement)>=0?"height":"width";if(arrowElement&&popperOffsets){var paddingObject=function(padding,state){return mergePaddingObject("number"!=typeof(padding="function"==typeof padding?padding(Object.assign({},state.rects,{placement:state.placement})):padding)?padding:expandToHashMap(padding,basePlacements))}(options.padding,state),arrowRect=getLayoutRect(arrowElement),minProp="y"===axis?top:left,maxProp="y"===axis?bottom:right,endDiff=state.rects.reference[len]+state.rects.reference[axis]-popperOffsets[axis]-state.rects.popper[len],startDiff=popperOffsets[axis]-state.rects.reference[axis],arrowOffsetParent=getOffsetParent(arrowElement),clientSize=arrowOffsetParent?"y"===axis?arrowOffsetParent.clientHeight||0:arrowOffsetParent.clientWidth||0:0,centerToReference=endDiff/2-startDiff/2,min=paddingObject[minProp],max=clientSize-arrowRect[len]-paddingObject[maxProp],center=clientSize/2-arrowRect[len]/2+centerToReference,offset=within(min,center,max),axisProp=axis;state.modifiersData[name]=((_state$modifiersData$={})[axisProp]=offset,_state$modifiersData$.centerOffset=offset-center,_state$modifiersData$)}},effect:function(_ref2){var state=_ref2.state,_options$element=_ref2.options.element,arrowElement=void 0===_options$element?"[data-popper-arrow]":_options$element;null!=arrowElement&&("string"!=typeof arrowElement||(arrowElement=state.elements.popper.querySelector(arrowElement)))&&contains(state.elements.popper,arrowElement)&&(state.elements.arrow=arrowElement)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getSideOffsets(overflow,rect,preventedOffsets){return void 0===preventedOffsets&&(preventedOffsets={x:0,y:0}),{top:overflow.top-rect.height-preventedOffsets.y,right:overflow.right-rect.width+preventedOffsets.x,bottom:overflow.bottom-rect.height+preventedOffsets.y,left:overflow.left-rect.width-preventedOffsets.x}}function isAnySideFullyClipped(overflow){return[top,right,bottom,left].some((function(side){return overflow[side]>=0}))}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(_ref){var state=_ref.state,name=_ref.name,referenceRect=state.rects.reference,popperRect=state.rects.popper,preventedOffsets=state.modifiersData.preventOverflow,referenceOverflow=detectOverflow(state,{elementContext:"reference"}),popperAltOverflow=detectOverflow(state,{altBoundary:!0}),referenceClippingOffsets=getSideOffsets(referenceOverflow,referenceRect),popperEscapeOffsets=getSideOffsets(popperAltOverflow,popperRect,preventedOffsets),isReferenceHidden=isAnySideFullyClipped(referenceClippingOffsets),hasPopperEscaped=isAnySideFullyClipped(popperEscapeOffsets);state.modifiersData[name]={referenceClippingOffsets:referenceClippingOffsets,popperEscapeOffsets:popperEscapeOffsets,isReferenceHidden:isReferenceHidden,hasPopperEscaped:hasPopperEscaped},state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-reference-hidden":isReferenceHidden,"data-popper-escaped":hasPopperEscaped})}},createPopper$1=popperGenerator({defaultModifiers:[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1]}),defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers});exports.applyStyles=applyStyles$1,exports.arrow=arrow$1,exports.computeStyles=computeStyles$1,exports.createPopper=createPopper,exports.createPopperLite=createPopper$1,exports.defaultModifiers=defaultModifiers,exports.detectOverflow=detectOverflow,exports.eventListeners=eventListeners,exports.flip=flip$1,exports.hide=hide$1,exports.offset=offset$1,exports.popperGenerator=popperGenerator,exports.popperOffsets=popperOffsets$1,exports.preventOverflow=preventOverflow$1,Object.defineProperty(exports,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define("core/popper2",["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).Popper={}); define("core/prefetch",["exports","core/config"],(function(_exports,_config){var obj;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_config=(obj=_config)&&obj.__esModule?obj:{default:obj};var _systemImportTransformerGlobalIdentifier="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};let prefetchTimer,initialPrefetchComplete=!1,templateList=[],stringList={};const fetchQueue=()=>{if(templateList){const templatesToLoad=templateList.slice();templateList=[],("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/templates"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/templates")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/templates"])).then((Templates=>Templates.prefetchTemplates(templatesToLoad))).catch()}const mappedStringsToFetch=stringList;stringList={};const stringsToFetch=[];Object.keys(mappedStringsToFetch).forEach((component=>{stringsToFetch.push(...mappedStringsToFetch[component].map((key=>({component:component,key:key}))))})),stringsToFetch&&("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require(["core/str"],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require("core/str")):Promise.resolve(_systemImportTransformerGlobalIdentifier["core/str"])).then((Str=>Str.get_strings(stringsToFetch))).catch()},processQueue=()=>{prefetchTimer||(initialPrefetchComplete?fetchQueue():prefetchTimer=setTimeout((()=>{initialPrefetchComplete=!0,prefetchTimer=null,("function"==typeof _systemImportTransformerGlobalIdentifier.define&&_systemImportTransformerGlobalIdentifier.define.amd?new Promise((function(resolve,reject){_systemImportTransformerGlobalIdentifier.require([_config.default.iconsystemmodule],resolve,reject)})):"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require||"undefined"!=typeof module&&module.component&&_systemImportTransformerGlobalIdentifier.require&&"component"===_systemImportTransformerGlobalIdentifier.require.loader?Promise.resolve(require(_config.default.iconsystemmodule)):Promise.resolve(_systemImportTransformerGlobalIdentifier[_config.default.iconsystemmodule])).then((IconSystem=>{const iconSystem=new IconSystem;return prefetchTemplate(iconSystem.getTemplateName()),iconSystem})).then((iconSystem=>{fetchQueue(),iconSystem.init()})).catch()}),500))},prefetchTemplates=templatesNames=>{templateList=templateList.concat(templatesNames),processQueue()},prefetchTemplate=templateName=>{prefetchTemplates([templateName])},prefetchStrings=(component,keys)=>{stringList[component]||(stringList[component]=[]),stringList[component]=stringList[component].concat(keys),processQueue()};prefetchTemplates([].concat(["core/loading"],["core/modal"],["core/modal_backdrop"])),prefetchStrings("core",["cancel","closebuttontitle","loading","savechanges"]),prefetchStrings("core_form",["showless","showmore"]);var _default={prefetchTemplate:prefetchTemplate,prefetchTemplates:prefetchTemplates,prefetchString:(component,key)=>{stringList[component]||(stringList[component]=[]),stringList[component].push(key),processQueue()},prefetchStrings:prefetchStrings};return _exports.default=_default,_exports.default})); define("core/process_monitor",["exports","core/log","core/local/process_monitor/manager","core/local/process_monitor/loadingprocess","core/local/process_monitor/processqueue","core/templates"],(function(_exports,_log,_manager,_loadingprocess,_processqueue,_templates){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}} /** * Process monitor includer. * * @module core/process_monitor * @copyright 2022 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.processMonitor=void 0,_log=_interopRequireDefault(_log),_templates=_interopRequireDefault(_templates);let initialized=!1;const processMonitor={addLoadingProcess:function(definition){this.initProcessMonitor();return new _loadingprocess.LoadingProcess(_manager.manager,definition)},removeAllProcesses:function(){_manager.manager.getInitialStatePromise().then((()=>{_manager.manager.dispatch("removeAllProcesses")})).catch((()=>{_log.default.error("Cannot update process monitor.")}))},initProcessMonitor:async function(){if(initialized)return;initialized=!0;const container=null!==(_document$querySelect=document.querySelector("#page"))&&void 0!==_document$querySelect?_document$querySelect:document.body;var _document$querySelect;if(!document.getElementById("#processMonitor"))try{const{html:html,js:js}=await _templates.default.renderForPromise("core/local/process_monitor/monitor",{});_templates.default.appendNodeContents(container,html,js)}catch(error){_log.default.error("Cannot load the process monitor")}},getInitialStatePromise:function(){return _manager.manager.getInitialStatePromise()},createProcessQueue:async function(){processMonitor.initProcessMonitor();const processQueue=new _processqueue.ProcessQueue(_manager.manager);return await processMonitor.getInitialStatePromise(),processQueue}};_exports.processMonitor=processMonitor})); define("core/pubsub",["exports","core/pending"],(function(_exports,_pending){var obj; /** * A simple Javascript PubSub implementation. * * @module core/pubsub * @copyright 2018 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.unsubscribe=_exports.subscribe=_exports.publish=void 0,_pending=(obj=_pending)&&obj.__esModule?obj:{default:obj};const events={};_exports.subscribe=function(eventName,callback){events[eventName]=events[eventName]||[],events[eventName].push(callback)};_exports.unsubscribe=function(eventName,callback){if(events[eventName])for(var i=0;i * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */let debug;if(Object.defineProperty(_exports,"__esModule",{value:!0}),Object.defineProperty(_exports,"BaseComponent",{enumerable:!0,get:function(){return _basecomponent.default}}),Object.defineProperty(_exports,"DragDrop",{enumerable:!0,get:function(){return _dragdrop.default}}),Object.defineProperty(_exports,"Reactive",{enumerable:!0,get:function(){return _reactive.default}}),_exports.debug=void 0,_basecomponent=_interopRequireDefault(_basecomponent),_reactive=_interopRequireDefault(_reactive),_dragdrop=_interopRequireDefault(_dragdrop),_exports.debug=debug,M.cfg.developerdebug&&void 0===M.reactive){const debugOBject=(0,_debug.initDebug)();M.reactive=debugOBject.debuggers,_exports.debug=debug=debugOBject.debug}})); define("core/scroll_manager",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.watchScrollButtonSaves=_exports.scrollToSavedPosition=_exports.saveScrollPositionToForm=_exports.saveScrollPos=_exports.initLinksScrollPos=void 0; /** * Scroll manager is a class that help with saving the scroll positing when you * click on an action icon, and then when the page is reloaded after processing * the action, it scrolls you to exactly where you were. This is much nicer for * the user. * * To use this in your code, you need to ensure that: * 1. The button that triggers the action has to have a click event handler that * calls saveScrollPos() * 2. After doing the processing, the redirect() function will add 'mdlscrollto' * parameter into the redirect url automatically. * 3. Finally, on the page that is reloaded (which should be the same as the one * the user started on) you need to call scrollToSavedPosition() * on page load. * * @module core/scroll_manager * @copyright 2021 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ let scrollingElement=null;const getScrollingElement=()=>{if(null===scrollingElement){const page=document.getElementById("page");scrollingElement=(element=>{const hasScrollableContent=element.scrollHeight>element.clientHeight,isOverflowHidden=-1!==window.getComputedStyle(element).overflowY.indexOf("hidden");return hasScrollableContent&&!isOverflowHidden})(page)?page:document.scrollingElement}return scrollingElement},getScrollPos=()=>getScrollingElement().scrollTop;_exports.saveScrollPos=elementId=>{const form=document.getElementById(elementId).closest("form");form&&saveScrollPositionToForm(form)};_exports.watchScrollButtonSaves=()=>{document.addEventListener("click",(e=>{const button=e.target.closest('[data-savescrollposition="true"]');button&&saveScrollPositionToForm(button.form)}))};const saveScrollPositionToForm=form=>{(form=>{const element=form.querySelector("input[name=mdlscrollto]");if(element)return element;const scrollPos=document.createElement("input");return scrollPos.type="hidden",scrollPos.name="mdlscrollto",form.appendChild(scrollPos),scrollPos})(form).value=getScrollPos()};_exports.saveScrollPositionToForm=saveScrollPositionToForm;_exports.initLinksScrollPos=()=>{document.addEventListener("click",(e=>{if(!e.target.closest("a[data-save-scroll=true]"))return;e.preventDefault();const url=new URL(e.target.href);url.searchParams.set("mdlscrollto",getScrollPos()),window.location=url}))};_exports.scrollToSavedPosition=()=>{const url=new URL(window.location.href);if(!url.searchParams.has("mdlscrollto"))return;const scrollPosition=url.searchParams.get("mdlscrollto"),scrollingElement=getScrollingElement();scrollingElement.scrollTo(0,scrollPosition),document.addEventListener("DOMContentLoaded",(()=>{scrollingElement.scrollTo(0,scrollPosition)}))}})); /** * Simple API for set/get to sessionstorage, with cacherev expiration. * * Session storage will only persist for as long as the browser window * stays open. * * See: * https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage * * @module core/sessionstorage * @copyright 2017 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/sessionstorage",["core/config","core/storagewrapper"],(function(config,StorageWrapper){var storage=new StorageWrapper(window.sessionStorage);return{get:function(key){return storage.get(key)},set:function(key,value){return storage.set(key,value)}}})); /** * Show/hide admin settings based on other settings selected * * @copyright 2018 Davo Smith, Synergy Learning * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/showhidesettings",["jquery"],(function($){var dependencies;function isCheckboxHiddenElement($el){return $el.is("input[type=hidden]")&&$el.siblings('input[type=checkbox][name="'+$el.attr("name")+'"]').length}function isCheckedRelevant($el,value){return!isCheckboxHiddenElement($el)&&!function($el,value){return $el.is("input[type=radio]")&&$el.attr("value")!==value}($el,value)}function isUncheckedRadioButton($el){return $el.is("input[type=radio]")&&!$el.prop("checked")}function isUncheckedCheckbox($el){return $el.is("input[type=checkbox]")&&!$el.prop("checked")}function isMultiSelect($el){return $el.is("select")&&$el.prop("multiple")}function multiSelectMatches($el,values){var selected=$el.val()||[];if(1===values.length&&""===values[0])return 0===selected.length;if(selected.length!==values.length)return!1;for(var i in selected)if(selected.hasOwnProperty(i)&&-1===values.indexOf(selected[i]))return!1;return!0}var depFns={notchecked:function($dependon,value){var hide=!1;return value=String(value),$dependon.each((function(idx,el){var $el=$(el);isCheckedRelevant($el,value)&&(hide=hide||!$el.prop("checked"))})),hide},checked:function($dependon,value){var hide=!1;return value=String(value),$dependon.each((function(idx,el){var $el=$(el);isCheckedRelevant($el,value)&&(hide=hide||$el.prop("checked"))})),hide},noitemselected:function($dependon){var hide=!1;return $dependon.each((function(idx,el){var $el=$(el);hide=hide||-1===$el.prop("selectedIndex")})),hide},eq:function($dependon,value){var hide=!1,hiddenVal=!1;return value=String(value),$dependon.each((function(idx,el){var $el=$(el);if(!isUncheckedRadioButton($el))if(isCheckboxHiddenElement($el))hiddenVal=$el.val()===value;else if(isUncheckedCheckbox($el))hide=hide||hiddenVal;else if(isMultiSelect($el)){var values=value.split("|");hide=multiSelectMatches($el,values)}else hide=hide||$el.val()===value})),hide},in:function($dependon,value){var hide=!1,hiddenVal=!1,values=value.split("|");return $dependon.each((function(idx,el){var $el=$(el);isUncheckedRadioButton($el)||(isCheckboxHiddenElement($el)?hiddenVal=values.indexOf($el.val())>-1:hide=isUncheckedCheckbox($el)?hide||hiddenVal:isMultiSelect($el)?function($el,values){let selected=$el.val()||[];return 0==selected.length&&selected.push(""),selected.every((element=>values.includes(element)))}($el,values):hide||values.indexOf($el.val())>-1)})),hide},defaultCondition:function($dependon,value){var hide=!1,hiddenVal=!1;return value=String(value),$dependon.each((function(idx,el){var $el=$(el);if(!isUncheckedRadioButton($el))if(isCheckboxHiddenElement($el))hiddenVal=$el.val()!==value;else if(isUncheckedCheckbox($el))hide=hide||hiddenVal;else if(isMultiSelect($el)){var values=value.split("|");hide=!multiSelectMatches($el,values)}else hide=hide||$el.val()!==value})),hide}};function getElementsByName(name){return $('[name="'+name+'"],[name^="'+name+'["]')}function updateDependencies(){var toHide={};$.each(dependencies,(function(dependonname){var dependon=getElementsByName(dependonname);$.each(dependencies[dependonname],(function(condition,values){$.each(values,(function(value,elements){var hide=function($dependon,condition,value){return"function"==typeof depFns[condition]?depFns[condition]($dependon,value):depFns.defaultCondition($dependon,value)}(dependon,condition,value);$.each(elements,(function(idx,elToHide){toHide.hasOwnProperty(elToHide)?toHide[elToHide]=toHide[elToHide]||hide:toHide[elToHide]=hide}))}))}))})),$.each(toHide,(function(elToHide,hide){getElementsByName(elToHide).each((function(idx,el){var $parent=$(el).closest(".form-item");$parent.length&&(hide?$parent.hide():$parent.show())}))}))}return{init:function(opts){dependencies=opts.dependencies,$.each(dependencies,(function(depname){var $el=getElementsByName(depname);$el.length&&$el.on("change",updateDependencies)})),updateDependencies(),$(".form-dependenton").hide()}}})); define("core/showmore",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0; /** * Initializes and handles events fow 'showmore' components. * * @module core/showmore * @copyright 2023 Mikel Martín * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ const Selectors_actions={toggleContent:'[data-action="toggle-content"]'},Selectors_regions={main:'[data-region="showmore"]'};let initialized=!1;_exports.init=()=>{initialized||(document.addEventListener("click",(event=>{const toggleContent=event.target.closest(Selectors_actions.toggleContent);if(toggleContent){const region=toggleContent.closest(Selectors_regions.main);region.classList.toggle("collapsed");region.querySelector(Selectors_actions.toggleContent).setAttribute("aria-expanded",!region.classList.contains("collapsed"))}})),initialized=!0)}})); /** * A javascript module to handle list items drag and drop * * Example of usage: * * Create a list (for example `
    ` or `
`) where each draggable element has a drag handle. * The best practice is to use the template core/drag_handle: * $OUTPUT->render_from_template('core/drag_handle', ['movetitle' => get_string('movecontent', 'moodle', ELEMENTNAME)]); * * Attach this JS module to this list: * * Space between define and ( critical in comment but not allowed in code in order to function * correctly with Moodle's requirejs.php * * For the full list of possible parameters see var defaultParameters below. * * The following jQuery events are fired: * - SortableList.EVENTS.DRAGSTART : when user started dragging a list element * - SortableList.EVENTS.DRAG : when user dragged a list element to a new position * - SortableList.EVENTS.DROP : when user dropped a list element * - SortableList.EVENTS.DROPEND : when user finished dragging - either fired right after dropping or * if "Esc" was pressed during dragging * * @example * define (['jquery', 'core/sortable_list'], function($, SortableList) { * var list = new SortableList('ul.my-awesome-list'); // source list (usually
    or
) - selector or element * * // Listen to the events when element is dragged. * $('ul.my-awesome-list > *').on(SortableList.EVENTS.DROP, function(evt, info) { * console.log(info); * }); * * // Advanced usage. Overwrite methods getElementName, getDestinationName, moveDialogueTitle, for example: * list.getElementName = function(element) { * return $.Deferred().resolve(element.attr('data-name')); * } * }); * * @module core/sortable_list * @class core/sortable_list * @copyright 2018 Marina Glancy * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/sortable_list",["jquery","core/log","core/autoscroll","core/event_dispatcher","core/str","core/modal_cancel","core/modal_events","core/notification"],(function($,log,autoScroll,EventDispatcher,str,ModalCancel,ModalEvents,Notification){var defaultParameters={targetListSelector:null,moveHandlerSelector:"[data-drag-type=move]",isHorizontal:!1,autoScroll:!0},CSS_keyboardDragClass="dragdrop-keyboard-drag",CSS_isDraggedClass="sortable-list-is-dragged",CSS_isDroppedClass="sortable-list-is-dropped",CSS_currentPositionClass="sortable-list-current-position",CSS_targetListClass="sortable-list-target",CSS_overElementClass="sortable-list-over-element",registerNotPassiveListeners=function(eventname){return{setup:function(x,ns,handle){return!!ns.includes("notPassive")&&(this.addEventListener(eventname,handle,{passive:!1}),!0)}}};(function(){var options,passivesupported=!1;try{options=Object.defineProperty({},"passive",{get:function(){passivesupported=!0}}),document.addEventListener("testpassiveeventoptions",options,options),document.removeEventListener("testpassiveeventoptions",options,options)}catch(err){passivesupported=!1}return passivesupported})&&($.event.special.touchstart=registerNotPassiveListeners("touchstart"),$.event.special.touchmove=registerNotPassiveListeners("touchmove"),$.event.special.touchend=registerNotPassiveListeners("touchend"));var SortableList=function(root,config){this.info=null,this.proxy=null,this.proxyDelta=null,this.dragCounter=0,this.lastEvent=null,this.config=$.extend({},defaultParameters,config||{}),this.config.listSelector=root,this.config.targetListSelector||(this.config.targetListSelector=root),"object"==typeof this.config.listSelector?$(this.config.listSelector).on("mousedown touchstart.notPassive",$.proxy(this.dragStartHandler,this)):$("body").on("mousedown touchstart.notPassive",this.config.listSelector,$.proxy(this.dragStartHandler,this)),null!==this.config.moveHandlerSelector&&$("body").on("click keypress",this.config.moveHandlerSelector,$.proxy(this.clickHandler,this))};return SortableList.EVENTS={DRAGSTART:"sortablelist-dragstart",DRAG:"sortablelist-drag",DROP:"sortablelist-drop",DRAGEND:"sortablelist-dragend",elementDragStart:"core/sortable_list:dragStart",elementDrag:"core/sortable_list:drag",elementDrop:"core/sortable_list:drop",elementDragEnd:"core/sortable_list:dragEnd"},SortableList.prototype.resetDraggedClasses=function(){var classes=[CSS_isDraggedClass,CSS_currentPositionClass,CSS_overElementClass,CSS_targetListClass];for(var i in classes)$("."+classes[i]).removeClass(classes[i]);this.proxy&&(this.proxy.remove(),this.proxy=$())},SortableList.prototype.calculatePositionOnPage=function(evt){if(evt.originalEvent&&evt.originalEvent.touches&&void 0!==evt.originalEvent.touches[0]){var touch=evt.originalEvent.touches[0];evt.pageX=touch.pageX,evt.pageY=touch.pageY}void 0===evt.pageX?(evt.pageX=this.lastEvent.pageX,evt.pageY=this.lastEvent.pageY):this.lastEvent=evt,void 0===evt.clientX&&(evt.clientX=Math.round(evt.pageX-$(window).scrollLeft()),evt.clientY=Math.round(evt.pageY-$(window).scrollTop()))},SortableList.prototype.dragStartHandler=function(evt){if(null!==this.info){if("click"===this.info.type||"touchend"===this.info.type)return;this.moveElement(this.info.sourceList,this.info.sourceNextElement),this.finishDragging()}if("mousedown"!==evt.type||1===evt.which){this.calculatePositionOnPage(evt);var movedElement=$(evt.target).closest($(evt.currentTarget).children());if(movedElement.length&&(null===this.config.moveHandlerSelector||$(evt.target).closest(this.config.moveHandlerSelector,movedElement).length)){evt.stopPropagation(),evt.preventDefault(),this.dragCounter++,this.info={element:movedElement,sourceNextElement:movedElement.next(),sourceList:movedElement.parent(),targetNextElement:movedElement.next(),targetList:movedElement.parent(),type:evt.type,dropped:!1,startX:evt.pageX,startY:evt.pageY,startTime:(new Date).getTime()},$(this.config.targetListSelector).addClass(CSS_targetListClass);var offset=movedElement.offset();movedElement.addClass(CSS_currentPositionClass),this.proxyDelta={x:offset.left-evt.pageX,y:offset.top-evt.pageY},this.proxy=$();var thisDragCounter=this.dragCounter;setTimeout($.proxy((function(){null!==this.info&&"click"!==this.info.type&&"keypress"!==this.info.type&&this.dragCounter===thisDragCounter&&this.createProxy()}),this),500),$(window).on("mousemove touchmove.notPassive mouseup touchend.notPassive",$.proxy(this.dragHandler,this)),$(window).on("keypress",$.proxy(this.dragcancelHandler,this)),this.config.autoScroll&&autoScroll.start((function(){$(window).trigger("mousemove")})),this.executeCallback(SortableList.EVENTS.elementDragStart)}}},SortableList.prototype.createProxy=function(){this.proxy=this.info.element.clone(),this.info.sourceList.append(this.proxy),this.proxy.removeAttr("id").removeClass(CSS_currentPositionClass).addClass(CSS_isDraggedClass).css({position:"fixed"}),this.proxy.offset({top:this.proxyDelta.y+this.lastEvent.pageY,left:this.proxyDelta.x+this.lastEvent.pageX})},SortableList.prototype.clickHandler=function(evt){if(("keypress"!==evt.type||13===evt.originalEvent.keyCode||32===evt.originalEvent.keyCode)&&null===this.info){var clickedElement=$(evt.target).closest(this.config.moveHandlerSelector),sourceList=clickedElement.closest(this.config.listSelector),movedElement=clickedElement.closest(sourceList.children());movedElement.length&&(evt.preventDefault(),evt.stopPropagation(),this.dragCounter++,this.info={element:movedElement,sourceNextElement:movedElement.next(),sourceList:sourceList,targetNextElement:movedElement.next(),targetList:sourceList,dropped:!1,type:evt.type,startTime:(new Date).getTime()},this.executeCallback(SortableList.EVENTS.elementDragStart),this.displayMoveDialogue(clickedElement))}},SortableList.prototype.getPositionInNode=function(pageX,pageY,element){if(!element.length)return null;var rect=element[0].getBoundingClientRect(),y=pageY-(rect.top+window.scrollY),x=pageX-(rect.left+window.scrollX);return x>=-0&&x<=rect.width+0&&y>=-0&&y<=rect.height+0?{x:x,y:y,xRatio:rect.width?x/rect.width:0,yRatio:rect.height?y/rect.height:0}:null},SortableList.prototype.isListHorizontal=function(element){var isHorizontal=this.config.isHorizontal;return!0===isHorizontal||!1===isHorizontal?isHorizontal:isHorizontal(element)},SortableList.prototype.dragHandler=function(evt){evt.preventDefault(),evt.stopPropagation(),this.calculatePositionOnPage(evt),this.proxy.offset({top:-1e3,left:-1e3});var element=$(document.elementFromPoint(evt.clientX,evt.clientY)),mainElement=this.info.element[0],isNotSelf=function(){return this!==mainElement},current=element.closest("."+CSS_targetListClass+" > :not(."+CSS_isDraggedClass+")").filter(isNotSelf),currentList=element.closest("."+CSS_targetListClass),proxy=this.proxy,isNotProxy=function(){return!proxy||!proxy.length||this!==proxy[0]};if($("."+CSS_overElementClass).removeClass(CSS_overElementClass),current.addClass(CSS_overElementClass),this.proxy.offset({top:this.proxyDelta.y+evt.pageY,left:this.proxyDelta.x+evt.pageX}),currentList.length&&!currentList.children().filter(isNotProxy).length)this.moveElement(currentList,$());else if(1===current.length&&!this.info.element.find(current[0]).length){var coordinates=this.getPositionInNode(evt.pageX,evt.pageY,current);if(coordinates){var parent=current.parent(),ratio=this.isListHorizontal(parent)?coordinates.xRatio:coordinates.yRatio,subList=current.find("."+CSS_targetListClass),subListEmpty=!subList.children().filter(isNotProxy).filter(isNotSelf).length;subList.length&&subListEmpty&&ratio>.2&&ratio<.8?this.moveElement(subList,$()):ratio>.5?this.moveElement(parent,current.next().filter(isNotProxy)):this.moveElement(parent,current)}}if("mouseup"===evt.type||"touchend"===evt.type){this.info.endX=evt.pageX,this.info.endY=evt.pageY,this.info.endTime=(new Date).getTime(),this.info.dropped=!0,this.info.positionChanged=this.hasPositionChanged(this.info);var oldinfo=this.info;this.executeCallback(SortableList.EVENTS.elementDrop),this.finishDragging(),"touchend"===evt.type&&null!==this.config.moveHandlerSelector&&oldinfo.endTime-oldinfo.startTime<500&&!oldinfo.positionChanged?this.clickHandler(evt):oldinfo.positionChanged&&mainElement.classList.add(CSS_isDroppedClass)}},SortableList.prototype.hasPositionChanged=function(info){return info.sourceList[0]!==info.targetList[0]||info.sourceNextElement.length!==info.targetNextElement.length||info.sourceNextElement.length&&info.sourceNextElement[0]!==info.targetNextElement[0]},SortableList.prototype.moveElement=function(parentElement,beforeElement){var dragEl=this.info.element;beforeElement.length&&beforeElement[0]===dragEl[0]||parentElement[0]===this.info.targetList[0]&&beforeElement.length===this.info.targetNextElement.length&&beforeElement[0]===this.info.targetNextElement[0]||(beforeElement.length?parentElement[0].insertBefore(dragEl[0],beforeElement[0]):this.proxy&&this.proxy.parent().length&&this.proxy.parent()[0]===parentElement[0]?parentElement[0].insertBefore(dragEl[0],this.proxy[0]):parentElement[0].appendChild(dragEl[0]),this.info.targetList=parentElement,this.info.targetNextElement=beforeElement,this.executeCallback(SortableList.EVENTS.elementDrag))},SortableList.prototype.finishDragging=function(){this.resetDraggedClasses(),this.config.autoScroll&&autoScroll.stop(),$(window).off("mousemove touchmove.notPassive mouseup touchend.notPassive",$.proxy(this.dragHandler,this)),$(window).off("keypress",$.proxy(this.dragcancelHandler,this)),this.executeCallback(SortableList.EVENTS.elementDragEnd),this.info=null},SortableList.prototype.executeCallback=function(eventName){EventDispatcher.dispatchEvent(eventName,this.info,this.info.element[0]);const legacyEventNamesMap=new Map([[SortableList.EVENTS.elementDragStart,SortableList.EVENTS.DRAGSTART],[SortableList.EVENTS.elementDrag,SortableList.EVENTS.DRAG],[SortableList.EVENTS.elementDrop,SortableList.EVENTS.DROP],[SortableList.EVENTS.elementDragEnd,SortableList.EVENTS.DRAGEND]]);this.info.element.trigger(legacyEventNamesMap.get(eventName),this.info)},SortableList.prototype.dragcancelHandler=function(evt){"keypress"===evt.type&&27===evt.originalEvent.keyCode&&(this.moveElement(this.info.sourceList,this.info.sourceNextElement),this.finishDragging())},SortableList.prototype.getElementName=function(element){return $.Deferred().resolve(element.text())},SortableList.prototype.getDestinationName=function(parentElement,afterElement){return afterElement.length?this.getElementName(afterElement).then((function(name){return str.get_string("movecontentafter","moodle",name)})):str.get_string("movecontenttothetop","moodle")},SortableList.prototype.getMoveDialogueTitle=function(element,handler){return handler.attr("title")?$.Deferred().resolve(handler.attr("title")):this.getElementName(element).then((function(name){return str.get_string("movecontent","moodle",name)}))},SortableList.prototype.getDestinationsList=function(){var addedLists=[],targets=$(this.config.targetListSelector),destinations=$("
").text(c.getTitle())),node=$("
")),series.forEach((function(serie){node.append($("").text(serie.getLabel()).attr("scope","col"))})),tbl.append(node);for(var rowId=0;rowId"),labels.length>0&&node.append($("").text(labels[rowId]).attr("scope","row"));for(var serieId=0;serieId").text(value));tbl.append(node)}return tbl},Output.prototype.update=function(){this._build()},Output})); /** * Chart pie. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_pie */ define("core/chart_pie",["core/chart_base"],(function(Base){function Pie(){Base.prototype.constructor.apply(this,arguments)}return Pie.prototype=Object.create(Base.prototype),Pie.prototype.TYPE="pie",Pie.prototype._doughnut=null,Pie.prototype.create=function(Klass,data){var chart=Base.prototype.create.apply(this,arguments);return chart.setDoughnut(data.doughnut),chart},Pie.prototype.addSeries=function(series){if(null===series.getColor()){for(var colors=[],configColorSet=this.getConfigColorSet()||Base.prototype.COLORSET,i=0;i=1)throw new Error("Pie charts only support one serie.");return Base.prototype._validateSeries.apply(this,arguments)},Pie})); /** * Chart series. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @module core/chart_series */ define("core/chart_series",[],(function(){function Series(label,values){if("string"!=typeof label)throw new Error("Invalid label for series.");if("object"!=typeof values)throw new Error("Values for a series must be an array.");if(values.length<1)throw new Error("Invalid values received for series.");this._colors=[],this._label=label,this._values=values}return Series.prototype.TYPE_DEFAULT=null,Series.prototype.TYPE_LINE="line",Series.prototype._colors=null,Series.prototype._fill=!1,Series.prototype._label=null,Series.prototype._labels=null,Series.prototype._smooth=!1,Series.prototype._type=Series.prototype.TYPE_DEFAULT,Series.prototype._values=null,Series.prototype._xaxis=null,Series.prototype._yaxis=null,Series.prototype.create=function(obj){var s=new Series(obj.label,obj.values);return s.setType(obj.type),s.setXAxis(obj.axes.x),s.setYAxis(obj.axes.y),s.setLabels(obj.labels),obj.colors&&obj.colors.length>1?s.setColors(obj.colors):s.setColor(obj.colors[0]),s.setFill(obj.fill),s.setSmooth(obj.smooth),s},Series.prototype.getColor=function(){return this._colors[0]||null},Series.prototype.getColors=function(){return this._colors},Series.prototype.getCount=function(){return this._values.length},Series.prototype.getFill=function(){return this._fill},Series.prototype.getLabel=function(){return this._label},Series.prototype.getLabels=function(){return this._labels},Series.prototype.getSmooth=function(){return this._smooth},Series.prototype.getType=function(){return this._type},Series.prototype.getValues=function(){return this._values},Series.prototype.getXAxis=function(){return this._xaxis},Series.prototype.getYAxis=function(){return this._yaxis},Series.prototype.hasColoredValues=function(){return this._colors.length==this.getCount()},Series.prototype.setColor=function(color){this._colors=[color]},Series.prototype.setColors=function(colors){if(colors&&colors.length!=this.getCount())throw new Error("When setting multiple colors there must be one per value.");this._colors=colors||[]},Series.prototype.setFill=function(fill){this._fill=void 0===fill?null:fill},Series.prototype.setLabels=function(labels){this._validateLabels(labels),labels=void 0===labels?null:labels,this._labels=labels},Series.prototype.setSmooth=function(smooth){smooth=void 0===smooth?null:smooth,this._smooth=smooth},Series.prototype.setType=function(type){if(type!=this.TYPE_DEFAULT&&type!=this.TYPE_LINE)throw new Error("Invalid serie type.");this._type=type||null},Series.prototype.setXAxis=function(index){this._xaxis=index||null},Series.prototype.setYAxis=function(index){this._yaxis=index||null},Series.prototype._validateLabels=function(labels){if(labels&&labels.length>0&&labels.length!=this.getCount())throw new Error("Series labels must match series values.")},Series})); /** * Chart.js loader. * * @copyright 2016 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/chartjs",["core/chartjs-lazy"],(function(ChartJS){return ChartJS})); define("core/check/check_result",["exports","./repository","core/str","core/templates"],(function(_exports,_repository,_str,Templates){function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.getAndRender= /** * Check API result functions * * @module core/check * @author Matthew Hilton * @copyright Catalyst IT, 2023 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ async function(domSelector,adminTreeId,settingName,includeDetails){const element=document.querySelector(domSelector);if(!element)return void window.console.error("Check selector not found");try{const result=await(0,_repository.getCheckResult)(adminTreeId,settingName,includeDetails),decoded=(new DOMParser).parseFromString(result.html,"text/html").documentElement.textContent;element.innerHTML=decoded}catch(e){window.console.error(e),element.innerHTML=await Templates.render("core/notification",{iserror:!0,closebutton:!1,announce:0,extraclasses:"",message:await(0,_str.getString)("checkerror","core",adminTreeId)})}},Templates=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(Templates)})); define("core/check/repository",["exports","core/ajax"],(function(_exports,_ajax){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.getCheckResult=void 0;_exports.getCheckResult=(adminTreeId,settingName,includeDetails)=>(0,_ajax.call)([{methodname:"core_check_get_result_admintree",args:{admintreeid:adminTreeId,settingname:settingName,includedetails:includeDetails}}])[0]})); /** * A module to help with toggle select/deselect all. * * @module core/checkbox-toggleall * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ define("core/checkbox-toggleall",["jquery","core/pubsub"],(function($,PubSub){var registered=!1,events={checkboxToggled:"core/checkbox-toggleall:checkboxToggled"},getToggleGroupElements=function(root,toggleGroup,exactMatch){return exactMatch?root.find('[data-action="toggle"][data-togglegroup="'+toggleGroup+'"]'):root.find('[data-action="toggle"][data-togglegroup^="'+toggleGroup+'"]')},getAllSlaveCheckboxes=function(root,toggleGroup){return getToggleGroupElements(root,toggleGroup,!1).filter('[data-toggle="slave"]')},getControlCheckboxes=function(root,toggleGroup,exactMatch){return getToggleGroupElements(root,toggleGroup,exactMatch).filter('[data-toggle="master"]')},toggleSlavesFromMasters=function(e){var targetState,root=e.data.root,target=$(e.target),toggleGroupName=target.data("togglegroup");targetState=target.is(":checkbox")?target.is(":checked"):1===target.data("checkall"),toggleSlavesToState(root,toggleGroupName,targetState)},toggleMastersAndActionElements=function(root,toggleGroupName){var toggleGroupSlaves=getAllSlaveCheckboxes(root,toggleGroupName);if(toggleGroupSlaves.length>0){var toggleGroupCheckedSlaves=toggleGroupSlaves.filter(":checked"),targetState=toggleGroupSlaves.length===toggleGroupCheckedSlaves.length;setMasterStates(root,toggleGroupName,targetState,!0),setActionElementStates(root,toggleGroupName,!toggleGroupCheckedSlaves.length)}},getToggleGroupLevels=function(toggleGroupName){var toggleGroups=toggleGroupName.split(" "),toggleGroupLevels=[],toggleGroupLevel="";return toggleGroups.forEach((function(toggleGroupName){toggleGroupLevel+=" "+toggleGroupName,toggleGroupLevels.push(toggleGroupLevel.trim())})),toggleGroupLevels},toggleSlavesToState=function(root,toggleGroupName,targetState){var slaves=getAllSlaveCheckboxes(root,toggleGroupName);slaves.prop("checked",targetState).trigger("change");var checkedSlaves=slaves.filter(":checked");setMasterStates(root,toggleGroupName,targetState,!1),setActionElementStates(root,toggleGroupName,!checkedSlaves.length),getToggleGroupLevels(toggleGroupName).filter((toggleGroupLevel=>toggleGroupLevel!==toggleGroupName)).forEach((function(toggleGroupLevel){toggleMastersAndActionElements(root,toggleGroupLevel)})),PubSub.publish(events.checkboxToggled,{root:root,toggleGroupName:toggleGroupName,slaves:slaves,checkedSlaves:checkedSlaves,anyChecked:targetState})},toggleMastersFromSlaves=function(e){var root=e.data.root,toggleGroupName=$(e.target).data("togglegroup"),slaves=getAllSlaveCheckboxes(root,toggleGroupName),checkedSlaves=slaves.filter(":checked");getToggleGroupLevels(toggleGroupName).forEach((function(toggleGroupLevel){toggleMastersAndActionElements(root,toggleGroupLevel)})),PubSub.publish(events.checkboxToggled,{root:root,toggleGroupName:toggleGroupName,slaves:slaves,checkedSlaves:checkedSlaves,anyChecked:!!checkedSlaves.length})},setActionElementStates=function(root,toggleGroupName,disableActionElements){(function(root,toggleGroup){return getToggleGroupElements(root,toggleGroup,!0).filter('[data-toggle="action"]')})(root,toggleGroupName).prop("disabled",disableActionElements)},setMasterStates=function(root,toggleGroupName,targetState,exactMatch){var masters=getControlCheckboxes(root,toggleGroupName,exactMatch);masters.prop("checked",targetState),masters.each((function(i,masterElement){var targetString;if(masterElement=$(masterElement),targetString=targetState?masterElement.data("toggle-deselectall"):masterElement.data("toggle-selectall"),masterElement.is(":checkbox")){var masterLabel=root.find('[for="'+masterElement.attr("id")+'"]');masterLabel.length&&masterLabel.html()!==targetString&&masterLabel.html(targetString)}else masterElement.text(targetString),masterElement.data("checkall",targetState?0:1)}))};return{init:function(){!function(){if(!registered){registered=!0;var root=$(document.body);root.on("click",'[data-action="toggle"][data-toggle="master"]',{root:root},toggleSlavesFromMasters),root.on("click",'[data-action="toggle"][data-toggle="slave"]',{root:root},toggleMastersFromSlaves)}}()},events:events,setGroupState:function(root,toggleGroupName,targetState){root=$(root),setMasterStates(root,toggleGroupName,targetState,!0),toggleSlavesToState(root,toggleGroupName,targetState)},updateSlavesFromMasterState:function(root,toggleGroupName){root=$(root);var targetState,target=getControlCheckboxes(root,toggleGroupName,!1);targetState=target.is(":checkbox")?target.is(":checked"):1===target.data("checkall"),toggleSlavesToState(root,toggleGroupName,targetState)}}})); define("core/comboboxsearch/search_combobox",["exports","jquery","theme_boost/bootstrap/dropdown","core/utils","core/pending","core/str"],(function(_exports,_jquery,_dropdown,_utils,_pending,_str){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj} /** * The class that manages the state of the search within a combobox. * * @module core/comboboxsearch/search_combobox * @copyright 2023 Mathew May * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=_interopRequireDefault(_jquery),_dropdown=_interopRequireDefault(_dropdown),_pending=_interopRequireDefault(_pending);return _exports.default=class{constructor(){var _this$searchInput$val,_this$searchInput;_defineProperty(this,"selectors",{component:this.componentSelector(),toggle:'[data-bs-toggle="dropdown"]',instance:'[data-region="instance"]',input:'[data-action="search"]',clearSearch:'[data-action="clearsearch"]',dropdown:this.dropdownSelector(),resultitems:'[role="option"]',viewall:"#select-all",combobox:'[role="combobox"]'}),_defineProperty(this,"matchedResults",[]),_defineProperty(this,"searchTerm",""),_defineProperty(this,"preppedSearchTerm",null),_defineProperty(this,"resultNodes",[]),_defineProperty(this,"currentNode",null),_defineProperty(this,"currentViewAll",null),_defineProperty(this,"dataset",null),_defineProperty(this,"datasetSize",0),_defineProperty(this,"component",document.querySelector(this.selectors.component)),_defineProperty(this,"instance",this.component.dataset.instance),_defineProperty(this,"toggle",this.component.querySelector(this.selectors.toggle)),_defineProperty(this,"searchInput",this.component.querySelector(this.selectors.input)),_defineProperty(this,"searchDropdown",this.component.querySelector(this.selectors.dropdown)),_defineProperty(this,"clearSearchButton",this.component.querySelector(this.selectors.clearSearch)),_defineProperty(this,"combobox",this.component.querySelector(this.selectors.combobox)),_defineProperty(this,"$component",(0,_jquery.default)(this.component)),this.setSearchTerms(null!==(_this$searchInput$val=null===(_this$searchInput=this.searchInput)||void 0===_this$searchInput?void 0:_this$searchInput.value)&&void 0!==_this$searchInput$val?_this$searchInput$val:""),this.registerClickHandlers(),null!==this.searchInput&&(this.registerInputHandlers(),this.registerChangeHandlers()),""!==this.getSearchTerm()&&this.clearSearchButton.classList.remove("d-none")}fetchDataset(){throw new Error("fetchDataset() must be implemented in ".concat(this.constructor.name))}filterDataset(dataset){throw new Error("filterDataset(".concat(dataset,") must be implemented in ").concat(this.constructor.name))}filterMatchDataset(){throw new Error("filterMatchDataset() must be implemented in ".concat(this.constructor.name))}renderDropdown(){throw new Error("renderDropdown() must be implemented in ".concat(this.constructor.name))}componentSelector(){throw new Error("componentSelector() must be implemented in ".concat(this.constructor.name))}dropdownSelector(){throw new Error("dropdownSelector() must be implemented in ".concat(this.constructor.name))}triggerSelector(){window.console.warning("triggerSelector() is deprecated. Consider using this.selectors.toggle")}async getDataset(){return this.dataset||(this.dataset=await this.fetchDataset()),this.datasetSize=this.dataset.length,this.dataset}getDatasetSize(){return this.datasetSize}getMatchedResults(){return this.matchedResults}setMatchedResults(result){this.matchedResults=result}getSearchTerm(){return this.searchTerm}getPreppedSearchTerm(){return this.preppedSearchTerm}setSearchTerms(result){this.searchTerm=result,this.preppedSearchTerm=result.toLowerCase()}getHTMLElements(){return this.updateNodes(),{searchDropdown:this.searchDropdown,currentViewAll:this.currentViewAll,searchInput:this.searchInput,clearSearchButton:this.clearSearchButton,trigger:this.component.querySelector(this.selectors.trigger)}}closeSearch(){let clear=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.toggleDropdown(),clear&&(this.clearSearchButton.classList.add("d-none"),this.setSearchTerms(""),this.searchInput.value="")}searchResultsVisible(){const{searchDropdown:searchDropdown}=this.getHTMLElements();return null!==searchDropdown.offsetParent}toggleDropdown(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?_dropdown.default.getOrCreateInstance(this.toggle).show():_dropdown.default.getOrCreateInstance(this.toggle).hide()}updateNodes(){this.resultNodes=[...this.component.querySelectorAll(this.selectors.resultitems)],this.currentNode=this.resultNodes.find((r=>r.id===document.activeElement.id)),this.currentViewAll=this.component.querySelector(this.selectors.viewall),this.clearSearchButton=this.component.querySelector(this.selectors.clearSearch),this.searchInput=this.component.querySelector(this.selectors.input),this.searchDropdown=this.component.querySelector(this.selectors.dropdown)}registerClickHandlers(){this.component.addEventListener("click",this.clickHandler.bind(this))}registerChangeHandlers(){this.component.querySelector("#".concat(this.combobox.dataset.inputElement)).addEventListener("change",this.changeHandler.bind(this))}registerInputHandlers(){this.searchInput.addEventListener("input",(0,_utils.debounce)((async()=>{if(this.getSearchTerm()===this.searchInput.value&&this.searchResultsVisible())return void window.console.warn("Search term matches input value - skipping");this.setSearchTerms(this.searchInput.value);const pendingPromise=new _pending.default;""===this.getSearchTerm()?(this.toggleDropdown(),this.clearSearchButton.classList.add("d-none"),await this.filterrenderpipe()):(this.clearSearchButton.classList.remove("d-none"),await this.renderAndShow()),pendingPromise.resolve()}),300,{pending:!0}))}async filterrenderpipe(){this.updateNodes(),this.setMatchedResults(await this.filterDataset(await this.getDataset())),this.filterMatchDataset(),await this.renderDropdown(),await this.updateLiveRegion()}async renderAndShow(){this.setMatchedResults(await this.filterDataset(await this.getDataset())),await this.filterMatchDataset(),await this.renderDropdown(),this.toggleDropdown(!0),await this.updateLiveRegion()}async clickHandler(e){this.updateNodes(),e.target.closest(this.selectors.clearSearch)&&(this.closeSearch(!0),this.searchInput.focus(),this.searchInput.removeAttribute("aria-activedescendant")),""!==this.getSearchTerm()&&!this.getHTMLElements().searchDropdown.classList.contains("show")&&e.target.closest(this.selectors.input)&&await this.renderAndShow()}changeHandler(e){}async updateLiveRegion(){var _this$searchDropdown;if(null===(_this$searchDropdown=this.searchDropdown)||void 0===_this$searchDropdown||!_this$searchDropdown.id)return;const idParts=this.searchDropdown.id.split("-");if(idParts.length<3)return;const[,instanceId,id]=idParts,liveRegion=document.getElementById("combobox-status-".concat(instanceId,"-").concat(id));if(!liveRegion)return;const resultCount=this.getMatchedResults().length;let message;message=0===resultCount?await(0,_str.get_string)("noitemsfound","core"):1===resultCount?await(0,_str.get_string)("oneitemfound","core"):await(0,_str.get_string)("multipleitemsfound","core",resultCount),liveRegion.textContent=message,this.liveRegionTimeout&&clearTimeout(this.liveRegionTimeout),this.liveRegionTimeout=setTimeout((()=>{liveRegion.textContent="",this.liveRegionTimeout=null}),4e3)}},_exports.default})); define("core/config",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0; /** * Expose the M.cfg global variable. * * @module core/config * @copyright 2015 Damyon Wiese * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @since 2.9 */ var _default=M.cfg;return _exports.default=_default,_exports.default})); define("core/copy_to_clipboard",["core/str","core/toast","core/prefetch"],(function(_str,_toast,_prefetch){ /** * A JavaScript module that enhances a button and text container to support copy-to-clipboard functionality. * * This module needs to be loaded by pages/templates/modules that require this functionality. * * To enable copy-to-clipboard functionality, we need a trigger element (usually a button) and a copy target element * (e.g. a div, span, text input, or text area). * * In the trigger element, we need to declare the data-action="copytoclipboard" attribute and set the * data-clipboard-target attribute which is the CSS selector that points to the target element that contains the text * to be copied. * * When the text is successfully copied to the clipboard, a toast message that indicates that the copy operation was a success * will be shown. This success message can be customised by setting the data-clipboard-success-message attribute in the * trigger element. * * @module core/copy_to_clipboard * @copyright 2021 Jun Pataleta * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * * @example
Markup for the trigger and target elementsExample of controlling a collapsable section.Example of listening to a collapsable section events.