WRMCB=function(e){var c=console;if(c&&c.log&&c.error){c.log('Error running batched script.');c.error(e);}} ; try { /* module-key = 'com.atlassian.confluence.plugins.confluence-collaborative-editor-plugin:synchrony-util', location = '/js/synchrony-util.js' */ define("confluence-collaborative-editor-plugin/synchrony-util","window jquery underscore confluence/meta confluence/get-content-id confluence/performance-session ajs".split(" "),function(f,g,k,h,l,i,c){function d(a){var b=h.get(a);if(b===void 0){b=g('meta[name="ajs-'+a+'"]').attr("content");if(b!==void 0)h.set(a,b);else{console.error("Missing '"+a+"' metadata value");j()&&c.trigger("editor.error.message",{messageKey:"collaborative-editor-load-failure",message:c.I18n.getText("editor.collaborative-editing.refresh-editor.error"), close:"manual"})}}return b}function j(){return c.Rte.getEditor()&&c.Rte.getEditor().initialized}return{retrieveMetadata:d,getEntityId:function(){return"/"+d("synchrony-app-id")+"/confluence-"+l()},getServiceUrl:function(){return d("synchrony-service-uri")},getXhrFallbackFlag:function(){return d("use-xhr-fallback")},getLatestRevisionWithAttr:function(a,b){return k.last(a.filter(function(a){return a.meta&&a.meta[b]}))},hasRevisionType:function(a,b){return a.some(function(a){return a.meta&&a.meta.type=== b})},hasRevisionTrigger:function(a,b){return a.some(function(a){return a.meta&&a.meta.trigger===b})},asArray:function(){return Array.prototype.slice.call(arguments)},time:function(a){i.debugTime(a)},timeEnd:function(a){i.debugTimeEnd(a)},loadScript:function(a){var b=g.Deferred(),c=f.document.getElementsByTagName("head")[0],e=f.document.createElement("script");e.onload=b.resolve;e.onerror=b.reject;e.type="text/javascript";e.src=d("synchrony-resources-uri")+a;c.appendChild(e);return b.promise()},isEditorInitialised:j}}); }catch(e){WRMCB(e)};