retold-remote 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/css/retold-remote.css +83 -0
  3. package/html/codejar.js +511 -0
  4. package/html/index.html +23 -0
  5. package/package.json +68 -0
  6. package/server.js +43 -0
  7. package/source/Pict-Application-RetoldRemote-Configuration.json +7 -0
  8. package/source/Pict-Application-RetoldRemote.js +622 -0
  9. package/source/Pict-RetoldRemote-Bundle.js +14 -0
  10. package/source/cli/RetoldRemote-CLI-Program.js +15 -0
  11. package/source/cli/RetoldRemote-CLI-Run.js +3 -0
  12. package/source/cli/RetoldRemote-Server-Setup.js +257 -0
  13. package/source/cli/commands/RetoldRemote-Command-Serve.js +87 -0
  14. package/source/providers/Pict-Provider-GalleryFilterSort.js +597 -0
  15. package/source/providers/Pict-Provider-GalleryNavigation.js +819 -0
  16. package/source/providers/Pict-Provider-RetoldRemote.js +273 -0
  17. package/source/providers/Pict-Provider-RetoldRemoteIcons.js +640 -0
  18. package/source/providers/Pict-Provider-RetoldRemoteTheme.js +879 -0
  19. package/source/server/RetoldRemote-MediaService.js +536 -0
  20. package/source/server/RetoldRemote-PathRegistry.js +121 -0
  21. package/source/server/RetoldRemote-ThumbnailCache.js +89 -0
  22. package/source/server/RetoldRemote-ToolDetector.js +78 -0
  23. package/source/views/PictView-Remote-Gallery.js +1437 -0
  24. package/source/views/PictView-Remote-ImageViewer.js +363 -0
  25. package/source/views/PictView-Remote-Layout.js +420 -0
  26. package/source/views/PictView-Remote-MediaViewer.js +530 -0
  27. package/source/views/PictView-Remote-SettingsPanel.js +318 -0
  28. package/source/views/PictView-Remote-TopBar.js +206 -0
  29. package/web-application/codejar.js +511 -0
  30. package/web-application/css/retold-remote.css +83 -0
  31. package/web-application/index.html +23 -0
  32. package/web-application/js/pict.min.js +12 -0
  33. package/web-application/js/pict.min.js.map +1 -0
  34. package/web-application/retold-remote.compatible.js +5764 -0
  35. package/web-application/retold-remote.compatible.js.map +1 -0
  36. package/web-application/retold-remote.compatible.min.js +120 -0
  37. package/web-application/retold-remote.compatible.min.js.map +1 -0
  38. package/web-application/retold-remote.js +5763 -0
  39. package/web-application/retold-remote.js.map +1 -0
  40. package/web-application/retold-remote.min.js +120 -0
  41. package/web-application/retold-remote.min.js.map +1 -0
@@ -0,0 +1,120 @@
1
+ "use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function _superPropGet(t,e,n,i){var o=_get(_getPrototypeOf(1&i?t.prototype:t),e,n);return 2&i&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=_superPropBase(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_get.apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _callSuper(t,e,n){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,n||[],_getPrototypeOf(t).constructor):e.apply(t,n))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).retoldRemote=t()}}(function(){return function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[a]={exports:{}};e[a][0].call(d.exports,function(t){return o(e[a][1][t]||t)},d,d.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){e.exports={name:"fable-serviceproviderbase",version:"3.0.18",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.55",quackage:"^1.0.51",typescript:"^5.9.3"}}},{}],2:[function(t,e,n){var i=t("../package.json"),o=function(){return _createClass(function t(e,n,o){_classCallCheck(this,t),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(e)&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"===_typeof(n)?n:{}):(this.options="object"!==_typeof(e)||e.isFable?"object"===_typeof(n)?n:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof o?o:this.fable||"string"!=typeof n?"".concat(this.UUID):n},[{key:"connectFable",value:function(t){if("object"!==_typeof(t)||!t.isFable){var e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(t),"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(o,"isFableService",!0),e.exports=o,e.exports.CoreServiceProviderBase=o},{"../package.json":1}],3:[function(t,e,n){!function(){var t,i,o,r,a,s,l,c,d,p,u,h,f,v,m,g,y,b,w,C,x,A,k,D,P,E,S,F,T,_,R,I=function(t){var e=new I.Builder;return e.pipeline.add(I.trimmer,I.stopWordFilter,I.stemmer),e.searchPipeline.add(I.stemmer),t.call(e,e),e.build()};I.version="2.3.9",
2
+ /*!
3
+ * lunr.utils
4
+ * Copyright (C) 2020 Oliver Nightingale
5
+ */
6
+ I.utils={},I.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),I.utils.asString=function(t){return null==t?"":t.toString()},I.utils.clone=function(t){if(null==t)return t;for(var e=Object.create(null),n=Object.keys(t),i=0;i<n.length;i++){var o=n[i],r=t[o];if(Array.isArray(r))e[o]=r.slice();else{if("string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r)throw new TypeError("clone is not deep and does not support nested objects");e[o]=r}}return e},I.FieldRef=function(t,e,n){this.docRef=t,this.fieldName=e,this._stringValue=n},I.FieldRef.joiner="/",I.FieldRef.fromString=function(t){var e=t.indexOf(I.FieldRef.joiner);if(-1===e)throw"malformed field ref string";var n=t.slice(0,e),i=t.slice(e+1);return new I.FieldRef(i,n,t)},I.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+I.FieldRef.joiner+this.docRef),this._stringValue},
7
+ /*!
8
+ * lunr.Set
9
+ * Copyright (C) 2020 Oliver Nightingale
10
+ */
11
+ I.Set=function(t){if(this.elements=Object.create(null),t){this.length=t.length;for(var e=0;e<this.length;e++)this.elements[t[e]]=!0}else this.length=0},I.Set.complete={intersect:function(t){return t},union:function(){return this},contains:function(){return!0}},I.Set.empty={intersect:function(){return this},union:function(t){return t},contains:function(){return!1}},I.Set.prototype.contains=function(t){return!!this.elements[t]},I.Set.prototype.intersect=function(t){var e,n,i,o=[];if(t===I.Set.complete)return this;if(t===I.Set.empty)return t;this.length<t.length?(e=this,n=t):(e=t,n=this),i=Object.keys(e.elements);for(var r=0;r<i.length;r++){var a=i[r];a in n.elements&&o.push(a)}return new I.Set(o)},I.Set.prototype.union=function(t){return t===I.Set.complete?I.Set.complete:t===I.Set.empty?this:new I.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},I.idf=function(t,e){var n=0;for(var i in t)"_index"!=i&&(n+=Object.keys(t[i]).length);var o=(e-n+.5)/(n+.5);return Math.log(1+Math.abs(o))},I.Token=function(t,e){this.str=t||"",this.metadata=e||{}},I.Token.prototype.toString=function(){return this.str},I.Token.prototype.update=function(t){return this.str=t(this.str,this.metadata),this},I.Token.prototype.clone=function(t){return t=t||function(t){return t},new I.Token(t(this.str,this.metadata),this.metadata)},
12
+ /*!
13
+ * lunr.tokenizer
14
+ * Copyright (C) 2020 Oliver Nightingale
15
+ */
16
+ I.tokenizer=function(t,e){if(null==t||null==t)return[];if(Array.isArray(t))return t.map(function(t){return new I.Token(I.utils.asString(t).toLowerCase(),I.utils.clone(e))});for(var n=t.toString().toLowerCase(),i=n.length,o=[],r=0,a=0;r<=i;r++){var s=r-a;if(n.charAt(r).match(I.tokenizer.separator)||r==i){if(s>0){var l=I.utils.clone(e)||{};l.position=[a,s],l.index=o.length,o.push(new I.Token(n.slice(a,r),l))}a=r+1}}return o},I.tokenizer.separator=/[\s\-]+/,
17
+ /*!
18
+ * lunr.Pipeline
19
+ * Copyright (C) 2020 Oliver Nightingale
20
+ */
21
+ I.Pipeline=function(){this._stack=[]},I.Pipeline.registeredFunctions=Object.create(null),I.Pipeline.registerFunction=function(t,e){e in this.registeredFunctions&&I.utils.warn("Overwriting existing registered function: "+e),t.label=e,I.Pipeline.registeredFunctions[t.label]=t},I.Pipeline.warnIfFunctionNotRegistered=function(t){t.label&&t.label in this.registeredFunctions||I.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},I.Pipeline.load=function(t){var e=new I.Pipeline;return t.forEach(function(t){var n=I.Pipeline.registeredFunctions[t];if(!n)throw new Error("Cannot load unregistered function: "+t);e.add(n)}),e},I.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach(function(t){I.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},I.Pipeline.prototype.after=function(t,e){I.Pipeline.warnIfFunctionNotRegistered(e);var n=this._stack.indexOf(t);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,e)},I.Pipeline.prototype.before=function(t,e){I.Pipeline.warnIfFunctionNotRegistered(e);var n=this._stack.indexOf(t);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,e)},I.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},I.Pipeline.prototype.run=function(t){for(var e=this._stack.length,n=0;n<e;n++){for(var i=this._stack[n],o=[],r=0;r<t.length;r++){var a=i(t[r],r,t);if(null!=a&&""!==a)if(Array.isArray(a))for(var s=0;s<a.length;s++)o.push(a[s]);else o.push(a)}t=o}return t},I.Pipeline.prototype.runString=function(t,e){var n=new I.Token(t,e);return this.run([n]).map(function(t){return t.toString()})},I.Pipeline.prototype.reset=function(){this._stack=[]},I.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return I.Pipeline.warnIfFunctionNotRegistered(t),t.label})},
22
+ /*!
23
+ * lunr.Vector
24
+ * Copyright (C) 2020 Oliver Nightingale
25
+ */
26
+ I.Vector=function(t){this._magnitude=0,this.elements=t||[]},I.Vector.prototype.positionForIndex=function(t){if(0==this.elements.length)return 0;for(var e=0,n=this.elements.length/2,i=n-e,o=Math.floor(i/2),r=this.elements[2*o];i>1&&(r<t&&(e=o),r>t&&(n=o),r!=t);)i=n-e,o=e+Math.floor(i/2),r=this.elements[2*o];return r==t||r>t?2*o:r<t?2*(o+1):void 0},I.Vector.prototype.insert=function(t,e){this.upsert(t,e,function(){throw"duplicate index"})},I.Vector.prototype.upsert=function(t,e,n){this._magnitude=0;var i=this.positionForIndex(t);this.elements[i]==t?this.elements[i+1]=n(this.elements[i+1],e):this.elements.splice(i,0,t,e)},I.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t=0,e=this.elements.length,n=1;n<e;n+=2){var i=this.elements[n];t+=i*i}return this._magnitude=Math.sqrt(t)},I.Vector.prototype.dot=function(t){for(var e=0,n=this.elements,i=t.elements,o=n.length,r=i.length,a=0,s=0,l=0,c=0;l<o&&c<r;)(a=n[l])<(s=i[c])?l+=2:a>s?c+=2:a==s&&(e+=n[l+1]*i[c+1],l+=2,c+=2);return e},I.Vector.prototype.similarity=function(t){return this.dot(t)/this.magnitude()||0},I.Vector.prototype.toArray=function(){for(var t=new Array(this.elements.length/2),e=1,n=0;e<this.elements.length;e+=2,n++)t[n]=this.elements[e];return t},I.Vector.prototype.toJSON=function(){return this.elements},
27
+ /*!
28
+ * lunr.stemmer
29
+ * Copyright (C) 2020 Oliver Nightingale
30
+ * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
31
+ */
32
+ I.stemmer=(t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},i={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},s="^("+(r="[^aeiou][^aeiouy]*")+")?"+(a=(o="[aeiouy]")+"[aeiou]*")+r+"("+a+")?$",l="^("+r+")?"+a+r+a+r,c="^("+r+")?"+o,d=new RegExp("^("+r+")?"+a+r),p=new RegExp(l),u=new RegExp(s),h=new RegExp(c),f=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,b=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),C=new RegExp("^"+r+o+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,A=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,k=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,D=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,P=/^(.+?)(s|t)(ion)$/,E=/^(.+?)e$/,S=/ll$/,F=new RegExp("^"+r+o+"[^aeiouwxy]$"),T=function(e){var n,o,r,a,s,l,c;if(e.length<3)return e;if("y"==(r=e.substr(0,1))&&(e=r.toUpperCase()+e.substr(1)),s=v,(a=f).test(e)?e=e.replace(a,"$1$2"):s.test(e)&&(e=e.replace(s,"$1$2")),s=g,(a=m).test(e)){var T=a.exec(e);(a=d).test(T[1])&&(a=y,e=e.replace(a,""))}else s.test(e)&&(n=(T=s.exec(e))[1],(s=h).test(n)&&(l=w,c=C,(s=b).test(e=n)?e+="e":l.test(e)?(a=y,e=e.replace(a,"")):c.test(e)&&(e+="e")));return(a=x).test(e)&&(e=(n=(T=a.exec(e))[1])+"i"),(a=A).test(e)&&(n=(T=a.exec(e))[1],o=T[2],(a=d).test(n)&&(e=n+t[o])),(a=k).test(e)&&(n=(T=a.exec(e))[1],o=T[2],(a=d).test(n)&&(e=n+i[o])),s=P,(a=D).test(e)?(n=(T=a.exec(e))[1],(a=p).test(n)&&(e=n)):s.test(e)&&(n=(T=s.exec(e))[1]+T[2],(s=p).test(n)&&(e=n)),(a=E).test(e)&&(n=(T=a.exec(e))[1],s=u,l=F,((a=p).test(n)||s.test(n)&&!l.test(n))&&(e=n)),s=p,(a=S).test(e)&&s.test(e)&&(a=y,e=e.replace(a,"")),"y"==r&&(e=r.toLowerCase()+e.substr(1)),e},function(t){return t.update(T)}),I.Pipeline.registerFunction(I.stemmer,"stemmer"),
33
+ /*!
34
+ * lunr.stopWordFilter
35
+ * Copyright (C) 2020 Oliver Nightingale
36
+ */
37
+ I.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){if(t&&e[t.toString()]!==t.toString())return t}},I.stopWordFilter=I.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),I.Pipeline.registerFunction(I.stopWordFilter,"stopWordFilter"),
38
+ /*!
39
+ * lunr.trimmer
40
+ * Copyright (C) 2020 Oliver Nightingale
41
+ */
42
+ I.trimmer=function(t){return t.update(function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")})},I.Pipeline.registerFunction(I.trimmer,"trimmer"),
43
+ /*!
44
+ * lunr.TokenSet
45
+ * Copyright (C) 2020 Oliver Nightingale
46
+ */
47
+ I.TokenSet=function(){this.final=!1,this.edges={},this.id=I.TokenSet._nextId,I.TokenSet._nextId+=1},I.TokenSet._nextId=1,I.TokenSet.fromArray=function(t){for(var e=new I.TokenSet.Builder,n=0,i=t.length;n<i;n++)e.insert(t[n]);return e.finish(),e.root},I.TokenSet.fromClause=function(t){return"editDistance"in t?I.TokenSet.fromFuzzyString(t.term,t.editDistance):I.TokenSet.fromString(t.term)},I.TokenSet.fromFuzzyString=function(t,e){for(var n=new I.TokenSet,i=[{node:n,editsRemaining:e,str:t}];i.length;){var o=i.pop();if(o.str.length>0){var r,a=o.str.charAt(0);a in o.node.edges?r=o.node.edges[a]:(r=new I.TokenSet,o.node.edges[a]=r),1==o.str.length&&(r.final=!0),i.push({node:r,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(0!=o.editsRemaining){if("*"in o.node.edges)var s=o.node.edges["*"];else{s=new I.TokenSet;o.node.edges["*"]=s}if(0==o.str.length&&(s.final=!0),i.push({node:s,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&i.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),1==o.str.length&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var l=o.node.edges["*"];else{l=new I.TokenSet;o.node.edges["*"]=l}1==o.str.length&&(l.final=!0),i.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var c,d=o.str.charAt(0),p=o.str.charAt(1);p in o.node.edges?c=o.node.edges[p]:(c=new I.TokenSet,o.node.edges[p]=c),1==o.str.length&&(c.final=!0),i.push({node:c,editsRemaining:o.editsRemaining-1,str:d+o.str.slice(2)})}}}return n},I.TokenSet.fromString=function(t){for(var e=new I.TokenSet,n=e,i=0,o=t.length;i<o;i++){var r=t[i],a=i==o-1;if("*"==r)e.edges[r]=e,e.final=a;else{var s=new I.TokenSet;s.final=a,e.edges[r]=s,e=s}}return n},I.TokenSet.prototype.toArray=function(){for(var t=[],e=[{prefix:"",node:this}];e.length;){var n=e.pop(),i=Object.keys(n.node.edges),o=i.length;n.node.final&&(n.prefix.charAt(0),t.push(n.prefix));for(var r=0;r<o;r++){var a=i[r];e.push({prefix:n.prefix.concat(a),node:n.node.edges[a]})}}return t},I.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var t=this.final?"1":"0",e=Object.keys(this.edges).sort(),n=e.length,i=0;i<n;i++){var o=e[i];t=t+o+this.edges[o].id}return t},I.TokenSet.prototype.intersect=function(t){for(var e=new I.TokenSet,n=void 0,i=[{qNode:t,output:e,node:this}];i.length;){n=i.pop();for(var o=Object.keys(n.qNode.edges),r=o.length,a=Object.keys(n.node.edges),s=a.length,l=0;l<r;l++)for(var c=o[l],d=0;d<s;d++){var p=a[d];if(p==c||"*"==c){var u=n.node.edges[p],h=n.qNode.edges[c],f=u.final&&h.final,v=void 0;p in n.output.edges?(v=n.output.edges[p]).final=v.final||f:((v=new I.TokenSet).final=f,n.output.edges[p]=v),i.push({qNode:h,output:v,node:u})}}}return e},I.TokenSet.Builder=function(){this.previousWord="",this.root=new I.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},I.TokenSet.Builder.prototype.insert=function(t){var e,n=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<t.length&&i<this.previousWord.length&&t[i]==this.previousWord[i];i++)n++;this.minimize(n),e=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(i=n;i<t.length;i++){var o=new I.TokenSet,r=t[i];e.edges[r]=o,this.uncheckedNodes.push({parent:e,char:r,child:o}),e=o}e.final=!0,this.previousWord=t},I.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},I.TokenSet.Builder.prototype.minimize=function(t){for(var e=this.uncheckedNodes.length-1;e>=t;e--){var n=this.uncheckedNodes[e],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}},
48
+ /*!
49
+ * lunr.Index
50
+ * Copyright (C) 2020 Oliver Nightingale
51
+ */
52
+ I.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},I.Index.prototype.search=function(t){return this.query(function(e){new I.QueryParser(t,e).parse()})},I.Index.prototype.query=function(t){for(var e=new I.Query(this.fields),n=Object.create(null),i=Object.create(null),o=Object.create(null),r=Object.create(null),a=Object.create(null),s=0;s<this.fields.length;s++)i[this.fields[s]]=new I.Vector;t.call(e,e);for(s=0;s<e.clauses.length;s++){var l=e.clauses[s],c=null,d=I.Set.empty;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var p=0;p<c.length;p++){var u=c[p];l.term=u;var h=I.TokenSet.fromClause(l),f=this.tokenSet.intersect(h).toArray();if(0===f.length&&l.presence===I.Query.presence.REQUIRED){for(var v=0;v<l.fields.length;v++){r[_=l.fields[v]]=I.Set.empty}break}for(var m=0;m<f.length;m++){var g=f[m],y=this.invertedIndex[g],b=y._index;for(v=0;v<l.fields.length;v++){var w=y[_=l.fields[v]],C=Object.keys(w),x=g+"/"+_,A=new I.Set(C);if(l.presence==I.Query.presence.REQUIRED&&(d=d.union(A),void 0===r[_]&&(r[_]=I.Set.complete)),l.presence!=I.Query.presence.PROHIBITED){if(i[_].upsert(b,l.boost,function(t,e){return t+e}),!o[x]){for(var k=0;k<C.length;k++){var D,P=C[k],E=new I.FieldRef(P,_),S=w[P];void 0===(D=n[E])?n[E]=new I.MatchData(g,_,S):D.add(g,_,S)}o[x]=!0}}else void 0===a[_]&&(a[_]=I.Set.empty),a[_]=a[_].union(A)}}}if(l.presence===I.Query.presence.REQUIRED)for(v=0;v<l.fields.length;v++){r[_=l.fields[v]]=r[_].intersect(d)}}var F=I.Set.complete,T=I.Set.empty;for(s=0;s<this.fields.length;s++){var _;r[_=this.fields[s]]&&(F=F.intersect(r[_])),a[_]&&(T=T.union(a[_]))}var R=Object.keys(n),L=[],M=Object.create(null);if(e.isNegated()){R=Object.keys(this.fieldVectors);for(s=0;s<R.length;s++){E=R[s];var B=I.FieldRef.fromString(E);n[E]=new I.MatchData}}for(s=0;s<R.length;s++){var H=(B=I.FieldRef.fromString(R[s])).docRef;if(F.contains(H)&&!T.contains(H)){var V,j=this.fieldVectors[B],z=i[B.fieldName].similarity(j);if(void 0!==(V=M[H]))V.score+=z,V.matchData.combine(n[B]);else{var N={ref:H,score:z,matchData:n[B]};M[H]=N,L.push(N)}}}return L.sort(function(t,e){return e.score-t.score})},I.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(t){return[t,this.invertedIndex[t]]},this),e=Object.keys(this.fieldVectors).map(function(t){return[t,this.fieldVectors[t].toJSON()]},this);return{version:I.version,fields:this.fields,fieldVectors:e,invertedIndex:t,pipeline:this.pipeline.toJSON()}},I.Index.load=function(t){var e={},n={},i=t.fieldVectors,o=Object.create(null),r=t.invertedIndex,a=new I.TokenSet.Builder,s=I.Pipeline.load(t.pipeline);t.version!=I.version&&I.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+I.version+"' does not match serialized index '"+t.version+"'");for(var l=0;l<i.length;l++){var c=(p=i[l])[0],d=p[1];n[c]=new I.Vector(d)}for(l=0;l<r.length;l++){var p,u=(p=r[l])[0],h=p[1];a.insert(u),o[u]=h}return a.finish(),e.fields=t.fields,e.fieldVectors=n,e.invertedIndex=o,e.tokenSet=a.root,e.pipeline=s,new I.Index(e)},
53
+ /*!
54
+ * lunr.Builder
55
+ * Copyright (C) 2020 Oliver Nightingale
56
+ */
57
+ I.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=I.tokenizer,this.pipeline=new I.Pipeline,this.searchPipeline=new I.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},I.Builder.prototype.ref=function(t){this._ref=t},I.Builder.prototype.field=function(t,e){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=e||{}},I.Builder.prototype.b=function(t){this._b=t<0?0:t>1?1:t},I.Builder.prototype.k1=function(t){this._k1=t},I.Builder.prototype.add=function(t,e){var n=t[this._ref],i=Object.keys(this._fields);this._documents[n]=e||{},this.documentCount+=1;for(var o=0;o<i.length;o++){var r=i[o],a=this._fields[r].extractor,s=a?a(t):t[r],l=this.tokenizer(s,{fields:[r]}),c=this.pipeline.run(l),d=new I.FieldRef(n,r),p=Object.create(null);this.fieldTermFrequencies[d]=p,this.fieldLengths[d]=0,this.fieldLengths[d]+=c.length;for(var u=0;u<c.length;u++){var h=c[u];if(null==p[h]&&(p[h]=0),p[h]+=1,null==this.invertedIndex[h]){var f=Object.create(null);f._index=this.termIndex,this.termIndex+=1;for(var v=0;v<i.length;v++)f[i[v]]=Object.create(null);this.invertedIndex[h]=f}null==this.invertedIndex[h][r][n]&&(this.invertedIndex[h][r][n]=Object.create(null));for(var m=0;m<this.metadataWhitelist.length;m++){var g=this.metadataWhitelist[m],y=h.metadata[g];null==this.invertedIndex[h][r][n][g]&&(this.invertedIndex[h][r][n][g]=[]),this.invertedIndex[h][r][n][g].push(y)}}}},I.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),e=t.length,n={},i={},o=0;o<e;o++){var r=I.FieldRef.fromString(t[o]),a=r.fieldName;i[a]||(i[a]=0),i[a]+=1,n[a]||(n[a]=0),n[a]+=this.fieldLengths[r]}var s=Object.keys(this._fields);for(o=0;o<s.length;o++){var l=s[o];n[l]=n[l]/i[l]}this.averageFieldLength=n},I.Builder.prototype.createFieldVectors=function(){for(var t={},e=Object.keys(this.fieldTermFrequencies),n=e.length,i=Object.create(null),o=0;o<n;o++){for(var r=I.FieldRef.fromString(e[o]),a=r.fieldName,s=this.fieldLengths[r],l=new I.Vector,c=this.fieldTermFrequencies[r],d=Object.keys(c),p=d.length,u=this._fields[a].boost||1,h=this._documents[r.docRef].boost||1,f=0;f<p;f++){var v,m,g,y=d[f],b=c[y],w=this.invertedIndex[y]._index;void 0===i[y]?(v=I.idf(this.invertedIndex[y],this.documentCount),i[y]=v):v=i[y],m=v*((this._k1+1)*b)/(this._k1*(1-this._b+this._b*(s/this.averageFieldLength[a]))+b),m*=u,m*=h,g=Math.round(1e3*m)/1e3,l.insert(w,g)}t[r]=l}this.fieldVectors=t},I.Builder.prototype.createTokenSet=function(){this.tokenSet=I.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},I.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new I.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},I.Builder.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},I.MatchData=function(t,e,n){for(var i=Object.create(null),o=Object.keys(n||{}),r=0;r<o.length;r++){var a=o[r];i[a]=n[a].slice()}this.metadata=Object.create(null),void 0!==t&&(this.metadata[t]=Object.create(null),this.metadata[t][e]=i)},I.MatchData.prototype.combine=function(t){for(var e=Object.keys(t.metadata),n=0;n<e.length;n++){var i=e[n],o=Object.keys(t.metadata[i]);null==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var r=0;r<o.length;r++){var a=o[r],s=Object.keys(t.metadata[i][a]);null==this.metadata[i][a]&&(this.metadata[i][a]=Object.create(null));for(var l=0;l<s.length;l++){var c=s[l];null==this.metadata[i][a][c]?this.metadata[i][a][c]=t.metadata[i][a][c]:this.metadata[i][a][c]=this.metadata[i][a][c].concat(t.metadata[i][a][c])}}}},I.MatchData.prototype.add=function(t,e,n){if(!(t in this.metadata))return this.metadata[t]=Object.create(null),void(this.metadata[t][e]=n);if(e in this.metadata[t])for(var i=Object.keys(n),o=0;o<i.length;o++){var r=i[o];r in this.metadata[t][e]?this.metadata[t][e][r]=this.metadata[t][e][r].concat(n[r]):this.metadata[t][e][r]=n[r]}else this.metadata[t][e]=n},I.Query=function(t){this.clauses=[],this.allFields=t},I.Query.wildcard=new String("*"),I.Query.wildcard.NONE=0,I.Query.wildcard.LEADING=1,I.Query.wildcard.TRAILING=2,I.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},I.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=I.Query.wildcard.NONE),t.wildcard&I.Query.wildcard.LEADING&&t.term.charAt(0)!=I.Query.wildcard&&(t.term="*"+t.term),t.wildcard&I.Query.wildcard.TRAILING&&t.term.slice(-1)!=I.Query.wildcard&&(t.term=t.term+"*"),"presence"in t||(t.presence=I.Query.presence.OPTIONAL),this.clauses.push(t),this},I.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=I.Query.presence.PROHIBITED)return!1;return!0},I.Query.prototype.term=function(t,e){if(Array.isArray(t))return t.forEach(function(t){this.term(t,I.utils.clone(e))},this),this;var n=e||{};return n.term=t.toString(),this.clause(n),this},I.QueryParseError=function(t,e,n){this.name="QueryParseError",this.message=t,this.start=e,this.end=n},I.QueryParseError.prototype=new Error,I.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},I.QueryLexer.prototype.run=function(){for(var t=I.QueryLexer.lexText;t;)t=t(this)},I.QueryLexer.prototype.sliceString=function(){for(var t=[],e=this.start,n=this.pos,i=0;i<this.escapeCharPositions.length;i++)n=this.escapeCharPositions[i],t.push(this.str.slice(e,n)),e=n+1;return t.push(this.str.slice(e,this.pos)),this.escapeCharPositions.length=0,t.join("")},I.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},I.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},I.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return I.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},I.QueryLexer.prototype.width=function(){return this.pos-this.start},I.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},I.QueryLexer.prototype.backup=function(){this.pos-=1},I.QueryLexer.prototype.acceptDigitRun=function(){var t,e;do{e=(t=this.next()).charCodeAt(0)}while(e>47&&e<58);t!=I.QueryLexer.EOS&&this.backup()},I.QueryLexer.prototype.more=function(){return this.pos<this.length},I.QueryLexer.EOS="EOS",I.QueryLexer.FIELD="FIELD",I.QueryLexer.TERM="TERM",I.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",I.QueryLexer.BOOST="BOOST",I.QueryLexer.PRESENCE="PRESENCE",I.QueryLexer.lexField=function(t){return t.backup(),t.emit(I.QueryLexer.FIELD),t.ignore(),I.QueryLexer.lexText},I.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(I.QueryLexer.TERM)),t.ignore(),t.more())return I.QueryLexer.lexText},I.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(I.QueryLexer.EDIT_DISTANCE),I.QueryLexer.lexText},I.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(I.QueryLexer.BOOST),I.QueryLexer.lexText},I.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(I.QueryLexer.TERM)},I.QueryLexer.termSeparator=I.tokenizer.separator,I.QueryLexer.lexText=function(t){for(;;){var e=t.next();if(e==I.QueryLexer.EOS)return I.QueryLexer.lexEOS;if(92!=e.charCodeAt(0)){if(":"==e)return I.QueryLexer.lexField;if("~"==e)return t.backup(),t.width()>0&&t.emit(I.QueryLexer.TERM),I.QueryLexer.lexEditDistance;if("^"==e)return t.backup(),t.width()>0&&t.emit(I.QueryLexer.TERM),I.QueryLexer.lexBoost;if("+"==e&&1===t.width())return t.emit(I.QueryLexer.PRESENCE),I.QueryLexer.lexText;if("-"==e&&1===t.width())return t.emit(I.QueryLexer.PRESENCE),I.QueryLexer.lexText;if(e.match(I.QueryLexer.termSeparator))return I.QueryLexer.lexTerm}else t.escapeCharacter()}},I.QueryParser=function(t,e){this.lexer=new I.QueryLexer(t),this.query=e,this.currentClause={},this.lexemeIdx=0},I.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=I.QueryParser.parseClause;t;)t=t(this);return this.query},I.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},I.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},I.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},I.QueryParser.parseClause=function(t){var e=t.peekLexeme();if(null!=e)switch(e.type){case I.QueryLexer.PRESENCE:return I.QueryParser.parsePresence;case I.QueryLexer.FIELD:return I.QueryParser.parseField;case I.QueryLexer.TERM:return I.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+e.type;throw e.str.length>=1&&(n+=" with value '"+e.str+"'"),new I.QueryParseError(n,e.start,e.end)}},I.QueryParser.parsePresence=function(t){var e=t.consumeLexeme();if(null!=e){switch(e.str){case"-":t.currentClause.presence=I.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=I.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+e.str+"'";throw new I.QueryParseError(n,e.start,e.end)}var i=t.peekLexeme();if(null==i){n="expecting term or field, found nothing";throw new I.QueryParseError(n,e.start,e.end)}switch(i.type){case I.QueryLexer.FIELD:return I.QueryParser.parseField;case I.QueryLexer.TERM:return I.QueryParser.parseTerm;default:n="expecting term or field, found '"+i.type+"'";throw new I.QueryParseError(n,i.start,i.end)}}},I.QueryParser.parseField=function(t){var e=t.consumeLexeme();if(null!=e){if(-1==t.query.allFields.indexOf(e.str)){var n=t.query.allFields.map(function(t){return"'"+t+"'"}).join(", "),i="unrecognised field '"+e.str+"', possible fields: "+n;throw new I.QueryParseError(i,e.start,e.end)}t.currentClause.fields=[e.str];var o=t.peekLexeme();if(null==o){i="expecting term, found nothing";throw new I.QueryParseError(i,e.start,e.end)}if(o.type===I.QueryLexer.TERM)return I.QueryParser.parseTerm;i="expecting term, found '"+o.type+"'";throw new I.QueryParseError(i,o.start,o.end)}},I.QueryParser.parseTerm=function(t){var e=t.consumeLexeme();if(null!=e){t.currentClause.term=e.str.toLowerCase(),-1!=e.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var n=t.peekLexeme();if(null!=n)switch(n.type){case I.QueryLexer.TERM:return t.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return t.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return t.nextClause(),I.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new I.QueryParseError(i,n.start,n.end)}else t.nextClause()}},I.QueryParser.parseEditDistance=function(t){var e=t.consumeLexeme();if(null!=e){var n=parseInt(e.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new I.QueryParseError(i,e.start,e.end)}t.currentClause.editDistance=n;var o=t.peekLexeme();if(null!=o)switch(o.type){case I.QueryLexer.TERM:return t.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return t.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return t.nextClause(),I.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+o.type+"'";throw new I.QueryParseError(i,o.start,o.end)}else t.nextClause()}},I.QueryParser.parseBoost=function(t){var e=t.consumeLexeme();if(null!=e){var n=parseInt(e.str,10);if(isNaN(n)){var i="boost must be numeric";throw new I.QueryParseError(i,e.start,e.end)}t.currentClause.boost=n;var o=t.peekLexeme();if(null!=o)switch(o.type){case I.QueryLexer.TERM:return t.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return t.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return t.nextClause(),I.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+o.type+"'";throw new I.QueryParseError(i,o.start,o.end)}else t.nextClause()}},_=this,R=function(){return I},"object"===_typeof(n)?e.exports=R():_.lunr=R()}()},{}],4:[function(t,e,n){e.exports={name:"pict-application",version:"1.0.32",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx mocha -u tdd -R spec",start:"node source/Pict-Application.js",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx mocha -u tdd --exit -R spec --grep",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.51",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.18"}}},{}],5:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e);var s="object"===_typeof(t.settings.PictApplicationConfiguration)?t.settings.PictApplicationConfiguration:{};(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),s,n),i])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=o,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var l=Object.keys(a.options.Manifests);if(l.length>0)for(var c=0;c<l.length;c++){var d=l[c];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(e,t),_createClass(e,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var t=Object.keys(this.pict.providers),e=[],n=0;n<t.length;n++){var i=this.pict.providers[t[n]];i.options.AutoSolveWithApp&&e.push(i)}e.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var o=0;o<e.length;o++)e[o].solve(e[o]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],s=0;s<r.length;s++){var l=this.pict.views[r[s]];l.options.AutoInitialize&&a.push(l)}a.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var c=0;c<a.length;c++)a[c].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");n.anticipate(this.onBeforeSolveAsync.bind(this));var i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoSolveWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var l=0;l<r.length;l++)n.anticipate(r[l].solveAsync.bind(r[l]));for(var c=Object.keys(this.pict.views),d=[],p=0;p<c.length;p++){var u=this.pict.views[c[p]];u.options.AutoSolveWithApp&&d.push(u)}d.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var h=0;h<d.length;h++)n.anticipate(d[h].solveAsync.bind(d[h]));n.anticipate(this.onSolveAsync.bind(this)),n.anticipate(this.onAfterSolveAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync() complete.")),e.lastSolvedTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}},{key:"onLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}},{key:"loginAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeLoginAsync.bind(this)),n.anticipate(this.onLoginAsync.bind(this)),n.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&n.anticipate(function(t){if(!e.isLoggedIn())return t();e.pict.LogNoisiness>1&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," auto loading data after login...")),e.loadDataAsync(function(e){t(e)})}),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync() complete.")),e.lastLoginTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}},{key:"loadDataAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoLoadDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];n.anticipate(d.onBeforeLoadDataAsync.bind(d))}n.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,u=r;p<u.length;p++){var h=u[p];n.anticipate(h.onLoadDataAsync.bind(h))}n.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,v=r;f<v.length;f++){var m=v[f];n.anticipate(m.onAfterLoadDataAsync.bind(m))}n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync() complete.")),e.lastLoadDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}},{key:"onBeforeSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}},{key:"saveDataAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoSaveDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal});for(var l=0,c=r;l<c.length;l++){var d=c[l];n.anticipate(d.onBeforeSaveDataAsync.bind(d))}n.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,u=r;p<u.length;p++){var h=u[p];n.anticipate(h.onSaveDataAsync.bind(h))}n.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,v=r;f<v.length;f++){var m=v[f];n.anticipate(m.onAfterSaveDataAsync.bind(m))}n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync() complete.")),e.lastSaveDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var t=0;t<this.options.ConfigurationOnlyViews.length;t++){var e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();for(var n=Object.keys(this.pict.providers),i=[],o=0;o<n.length;o++){var r=this.pict.providers[n[o]];r.options.AutoInitialize&&i.push(r)}i.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var a=0;a<i.length;a++)i[a].initialize();for(var s=Object.keys(this.pict.views),l=[],c=0;c<s.length;c++){var d=this.pict.views[s[c]];d.options.AutoInitialize&&l.push(d)}l.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var p=0;p<l.length;p++)l[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(t){var e=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var n="function"==typeof t&&t;if(n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(n);var i=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var o=0;o<this.options.ConfigurationOnlyViews.length;o++){var r=void 0===this.options.ConfigurationOnlyViews[o].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[o].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[o])}i.anticipate(this.onBeforeInitializeAsync.bind(this)),i.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),s=[],l=0;l<a.length;l++){var c=this.pict.providers[a[l]];c.options.AutoInitialize&&s.push(c)}s.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var d=0;d<s.length;d++)i.anticipate(s[d].initializeAsync.bind(s[d]));for(var p=Object.keys(this.pict.views),u=[],h=0;h<p.length;h++){var f=this.pict.views[p[h]];f.options.AutoInitialize&&u.push(f)}u.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var v=0;v<u.length;v++){var m=u[v];i.anticipate(m.initializeAsync.bind(m))}i.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),i.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),i.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),i.anticipate(this.renderMainViewportAsync.bind(this))),i.wait(function(t){return t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),e.initializeTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initialization complete.")),n()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(t){return this.onCompletionOfInitialize(),t()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(t){return this.onBeforeMarshalFromViews(),t()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(t){return this.onMarshalFromViews(),t()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var t=Object.keys(this.pict.views),e=[],n=0;n<t.length;n++){var i=this.pict.views[t[n]];e.push(i)}for(var o=0;o<e.length;o++)e[o].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var o=Object.keys(this.pict.views),r=[],a=0;a<o.length;a++){var s=this.pict.views[o[a]];r.push(s)}for(var l=0;l<r.length;l++)n.anticipate(r[l].marshalFromViewAsync.bind(r[l]));n.anticipate(this.onMarshalFromViewsAsync.bind(this)),n.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync() complete.")),e.lastMarshalFromViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(t){return this.onAfterMarshalFromViews(),t()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(t){return this.onBeforeMarshalToViews(),t()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(t){return this.onMarshalToViews(),t()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var t=Object.keys(this.pict.views),e=[],n=0;n<t.length;n++){var i=this.pict.views[t[n]];e.push(i)}for(var o=0;o<e.length;o++)e[o].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var o=Object.keys(this.pict.views),r=[],a=0;a<o.length;a++){var s=this.pict.views[o[a]];r.push(s)}for(var l=0;l<r.length;l++)n.anticipate(r[l].marshalToViewAsync.bind(r[l]));n.anticipate(this.onMarshalToViewsAsync.bind(this)),n.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync() complete.")),e.lastMarshalToViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(t){return this.onAfterMarshalToViews(),t()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t){return this.onBeforeRender(),t()}},{key:"render",value:function(t,e,n,i){var o="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof n?this.options.MainViewportDestinationAddress:n,s="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();var l="string"==typeof o&&this.servicesMap.PictView[o];return l?(this.onRender(),l.render(r,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(o," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(t){return this.onRender(),t()}},{key:"renderAsync",value:function(t,e,n,i,o){var r=this,a="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,l="string"!=typeof n?this.options.MainViewportDestinationAddress:n,c="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,d="function"==typeof o?o:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:"function"==typeof t&&t;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(t){t&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(l,"] TemplateDataAddress[").concat(c,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var u="string"==typeof a&&this.servicesMap.PictView[a];if(!u){var h="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(h),d(new Error(h))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(t){u.renderAsync.call(u,s,l,c,t)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(t){return this.onAfterRender(),t()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}},{key:"renderAutoViews",value:function(){var t=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var e=Object.keys(this.pict.views);e.sort(function(e,n){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[n].options.AutoRenderOrdinal});for(var n=0;n<e.length;n++){var i=this.pict.views[e[n]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var o=Object.keys(this.pict.views);o.sort(function(t,n){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[n].options.AutoRenderOrdinal});for(var r=0;r<o.length;r++){var a=this.pict.views[o[r]];a.options.AutoRender&&n.anticipate(a.renderAsync.bind(a))}n.wait(function(t){return e.lastAutoRenderTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync complete.")),i(t)})}},{key:"isPictApplication",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":4,"fable-serviceproviderbase":2}],6:[function(t,e,n){e.exports=t("./views/Pict-View-Content.js"),e.exports.PictContentProvider=t("./providers/Pict-Provider-Content.js")},{"./providers/Pict-Provider-Content.js":7,"./views/Pict-View-Content.js":8}],7:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"parseMarkdown",value:function(t,e){var n=this;if(!t)return"";for(var i=t.split("\n"),o=[],r=!1,a=0,s="",l=[],c=!1,d="",p=!1,u=[],h=!1,f=[],v=[],m=function(){v.length>0&&(o.push("<p>"+v.map(function(t){return n.parseInline(t,e)}).join(" ")+"</p>"),v=[])},g=0;g<i.length;g++){var y=i[g];if(r||!y.trim().match(/^\$\$/))if(h)f.push(y);else{var b=y.match(/^(`{3,})/);if(b){var w=b[1].length;if(r){if(w>=a&&y.trim()===b[1]){"mermaid"===s?o.push('<pre class="mermaid">'+l.join("\n")+"</pre>"):o.push('<pre><code class="language-'+this.escapeHTML(s)+'">'+this.escapeHTML(l.join("\n"))+"</code></pre>"),r=!1,a=0,s="",l=[];continue}l.push(y);continue}m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),p&&(o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),p=!1,u=[]),a=w,s=y.replace(/^`{3,}/,"").trim(),r=!0}else if(r)l.push(y);else if(y.match(/^>\s?/))p||(m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),p=!0,u=[]),u.push(y.replace(/^>\s?/,""));else if(p&&(o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),p=!1,u=[]),y.match(/^(-{3,}|\*{3,}|_{3,})\s*$/))m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),o.push("<hr>");else{var C=y.match(/^(#{1,6})\s+(.+)/);if(C){m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1);var x=C[1].length,A=this.parseInline(C[2],e),k=C[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");o.push("<h"+x+' id="'+k+'">'+A+"</h"+x+">")}else{var D=y.match(/^(\s*)[-*+]\s+(.*)/);if(D)m(),c&&"ul"===d||(c&&o.push("ul"===d?"</ul>":"</ol>"),o.push("<ul>"),c=!0,d="ul"),o.push("<li>"+this.parseInline(D[2],e)+"</li>");else{var P=y.match(/^(\s*)\d+\.\s+(.*)/);if(P)m(),c&&"ol"===d||(c&&o.push("ul"===d?"</ul>":"</ol>"),o.push("<ol>"),c=!0,d="ol"),o.push("<li>"+this.parseInline(P[2],e)+"</li>");else if(c&&""!==y.trim()&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),""!==y.trim())if(y.match(/^\|/)&&g+1<i.length&&i[g+1].match(/^\|[\s-:|]+\|/)){m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1);var E="<table>",S=y.split("|").filter(function(t){return""!==t.trim()});E+="<thead><tr>";for(var F=0;F<S.length;F++)E+="<th>"+this.parseInline(S[F].trim(),e)+"</th>";for(E+="</tr></thead>",g++,E+="<tbody>";g+1<i.length&&i[g+1].match(/^\|/);){var T=i[++g].split("|").filter(function(t){return""!==t.trim()});E+="<tr>";for(var _=0;_<T.length;_++)E+="<td>"+this.parseInline(T[_].trim(),e)+"</td>";E+="</tr>"}E+="</tbody></table>",o.push(E)}else v.push(y);else m()}}}}else h?(o.push('<div class="pict-content-katex-display">'+f.join("\n")+"</div>"),h=!1,f=[]):(m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),p&&(o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),p=!1,u=[]),h=!0)}return m(),c&&o.push("ul"===d?"</ul>":"</ol>"),p&&o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),r&&o.push("<pre><code>"+this.escapeHTML(l.join("\n"))+"</code></pre>"),o.join("\n")}},{key:"parseInline",value:function(t,e){if(!t)return"";var n=t,i=[];return n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace(/`([^`]+)`/g,function(t,e){var n=i.length;return i.push("<code>"+e+"</code>"),"\0CODEINLINE"+n+"\0"})).replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/\$([^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1">')).replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(t,n,i){if("function"==typeof e){var o=e(i,n);if(o){var r=o.target?' target="'+o.target+'"':"",a=o.rel?' rel="'+o.rel+'"':"";return'<a href="'+o.href+'"'+r+a+">"+n+"</a>"}}return i.match(/^https?:\/\//)?'<a href="'+i+'" target="_blank" rel="noopener">'+n+"</a>":'<a href="'+i+'">'+n+"</a>"})).replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")).replace(/__([^_]+)__/g,"<strong>$1</strong>")).replace(/\*([^*]+)\*/g,"<em>$1</em>")).replace(/_([^_]+)_/g,"<em>$1</em>")).replace(/\x00CODEINLINE(\d+)\x00/g,function(t,e){return i[parseInt(e)]})}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-Content",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":19}],8:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t,e){var n=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+n,t);var i=document.getElementById(n);i&&i.parentElement&&(i.parentElement.scrollTop=0),this.renderMermaidDiagrams(n),this.renderKaTeXEquations(n)}},{key:"renderMermaidDiagrams",value:function(t){if("undefined"!=typeof mermaid){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){var i=n.querySelectorAll("pre.mermaid");if(!(i.length<1))try{mermaid.run({nodes:i})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}}},{key:"renderKaTeXEquations",value:function(t){if("undefined"!=typeof katex){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}}}},{key:"showLoading",value:function(t,e){var n=e||"Pict-Content-Body",i=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+n,'<div class="pict-content-loading">'+i+"</div>")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":52}],9:[function(t,e,n){e.exports={Name:"Pict Docuserve",Hash:"Docuserve",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"Docuserve-Pict-Application"}}},{}],10:[function(t,e,n){var i=t("pict-application"),o=t("./providers/Pict-Provider-Docuserve-Documentation.js"),r=t("./views/PictView-Docuserve-Layout.js"),a=t("./views/PictView-Docuserve-TopBar.js"),s=t("./views/PictView-Docuserve-Sidebar.js"),l=t("./views/PictView-Docuserve-Splash.js"),c=t("./views/PictView-Docuserve-Content.js"),d=t("./views/PictView-Docuserve-Search.js"),p=function(t){function e(t,n,i){var p;return _classCallCheck(this,e),(p=_callSuper(this,e,[t,n,i])).pict.addProvider("Docuserve-Documentation",o.default_configuration,o),p.pict.addView("Docuserve-Layout",r.default_configuration,r),p.pict.addView("Docuserve-TopBar",a.default_configuration,a),p.pict.addView("Docuserve-Sidebar",s.default_configuration,s),p.pict.addView("Docuserve-Splash",l.default_configuration,l),p.pict.addView("Docuserve-Content",c.default_configuration,c),p.pict.addView("Docuserve-Search",d.default_configuration,d),p}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){var n=this;this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"",CatalogURL:"retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(function(){var i=n.pict.AppData.Docuserve;return i.CoverLoaded&&i.Cover&&i.Cover.Title?document.title=i.Cover.Title.replace(/<[^>]*>/g,""):i.TopBarLoaded&&i.TopBar&&i.TopBar.Brand&&(document.title=i.TopBar.Brand.replace(/<[^>]*>/g,"")),n.pict.views["Docuserve-Layout"].render(),_superPropGet(e,"onAfterInitializeAsync",n,3)([t])})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t&&"Home"!==t){var e=t.split("/");if("search"!==e[0])if("page"===e[0]&&e.length>=2){var n=e.slice(1).join("/");this.navigateToPage(n)}else if("doc"===e[0]&&e.length>=3){var i=e[1],o=e[2];if(e.length>=4){var r=e.slice(3).join("/");this.navigateToModulePath(i,o,r)}else this.navigateToModule(i,o)}else this.navigateToPage(t);else{var a=decodeURIComponent(e.slice(1).join("/"));this.navigateToSearch(a)}}else this.showView("Docuserve-Splash")}},{key:"navigateTo",value:function(t){window.location.hash=t}},{key:"showView",value:function(t){t in this.pict.views&&(this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",this.pict.views[t].render(),this.pict.views["Docuserve-Sidebar"].clearModuleNav(),this.pict.views["Docuserve-Sidebar"].renderSidebarGroups())}},{key:"navigateToModule",value:function(t,e){this.navigateToModulePath(t,e,"README.md")}},{key:"navigateToModulePath",value:function(t,e,n){var i=this.pict.providers["Docuserve-Documentation"],o=this.pict.views["Docuserve-Content"],r=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=t,this.pict.AppData.Docuserve.CurrentModule=e,this.pict.AppData.Docuserve.CurrentPath=n,o.render(),o.showLoading(),r.renderSidebarGroups(),r.renderModuleNav(t,e);var a=i.resolveDocumentURL(t,e,n||"README.md");if(a){var s=n||"README.md";i.fetchDocument(a,function(n,r){if(n){var a=t+"/"+e+"/"+s;i.fetchLocalDocument(a,function(t,e){o.displayContent(e)},t,e,s)}else o.displayContent(r)},t,e,s)}else o.displayContent(i.getErrorPageHTML(t+"/"+e))}},{key:"navigateToPage",value:function(t){var e=this.pict.providers["Docuserve-Documentation"],n=this.pict.views["Docuserve-Content"],i=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath=t,n.render(),n.showLoading(),i.clearModuleNav(),i.renderSidebarGroups();var o=t;o.match(/\.md$/)||(o+=".md"),e.fetchLocalDocument(o,function(t,e){n.displayContent(e)})}},{key:"navigateToSearch",value:function(t){var e=this.pict.views["Docuserve-Sidebar"],n=this.pict.views["Docuserve-Search"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",e.clearModuleNav(),e.renderSidebarGroups(),n.render(),n.showSearch(t||"")}}])}(i);e.exports=p,e.exports.default_configuration=t("./Pict-Application-Docuserve-Configuration.json")},{"./Pict-Application-Docuserve-Configuration.json":9,"./providers/Pict-Provider-Docuserve-Documentation.js":11,"./views/PictView-Docuserve-Content.js":12,"./views/PictView-Docuserve-Layout.js":13,"./views/PictView-Docuserve-Search.js":14,"./views/PictView-Docuserve-Sidebar.js":15,"./views/PictView-Docuserve-Splash.js":16,"./views/PictView-Docuserve-TopBar.js":17,"pict-application":5}],11:[function(t,e,n){var i=t("pict-provider"),o=t("lunr"),r=t("pict-section-content").PictContentProvider,a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._Catalog=null,o._ContentCache={},o._ContentProvider=o.pict.addProvider("Pict-Content",r.default_configuration,r),o}return _inherits(e,t),_createClass(e,[{key:"_createLinkResolver",value:function(t,e,n){var i=this;return function(o,r){if(o.match(/^\//)||o.match(/^[^:]+\.md/))return{href:i.convertDocLink(o,t,e,n)};var a=i.resolveGitHubURLToRoute(o);return a?{href:a}:null}}},{key:"loadCatalog",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.CatalogURL||"retold-catalog.json",o=function(){var t=5,i=function(){if(--t<=0){if(e.pict.AppData.Docuserve.SidebarGroups&&!(e.pict.AppData.Docuserve.SidebarGroups.length<1))return n();e.autoDiscoverSidebar(n)}};e.loadCover(i),e.loadSidebar(i),e.loadTopbar(i),e.loadErrorPage(i),e.loadKeywordIndex(i)};fetch(i).then(function(t){return t.ok?t.json():(e.log.info("Docuserve: No catalog at [".concat(i,"]; running in standalone mode.")),null)}).then(function(t){t&&(e._Catalog=t,e.pict.AppData.Docuserve.Catalog=t,e.pict.AppData.Docuserve.CatalogLoaded=!0,e.buildSidebarData(t)),o()}).catch(function(t){e.log.info("Docuserve: Catalog load error (".concat(t,"); continuing in standalone mode.")),o()})}},{key:"autoDiscoverSidebar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"README.md").then(function(t){return t.ok?t.text():null}).then(function(t){if(t){var i=t.match(/^#+\s+(.+)/m),o=i?i[1].trim():"Docs";e.pict.AppData.Docuserve.SidebarGroups=[{Name:o,Key:"docs",Route:"#/page/README",Modules:[]}],e.pict.AppData.Docuserve.CoverLoaded||(e.pict.AppData.Docuserve.Cover={Title:o,Tagline:"",Description:"",Highlights:[],Actions:[{Text:"Read the Docs",Href:"README.md"}]},e.pict.AppData.Docuserve.CoverLoaded=!0)}else e.log.info("Docuserve: No README.md found; sidebar will be empty.");return n()}).catch(function(t){return e.log.info("Docuserve: README.md discovery failed (".concat(t,").")),n()})}},{key:"loadCover",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"cover.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.Cover=e.parseCover(t),e.pict.AppData.Docuserve.CoverLoaded=!0,n()):(e.log.info("Docuserve: No cover.md found; splash will use catalog data."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading cover.md: ".concat(t)),n()})}},{key:"parseCover",value:function(t){for(var e={Title:"",Tagline:"",Description:"",Highlights:[],Actions:[]},n=t.split("\n"),i=0;i<n.length;i++){var o=n[i].trim();if(o){var r=o.match(/^#+\s+(.+)/);if(r)e.Title=r[1].trim();else{var a=o.match(/^>\s*(.*)/);if(a)e.Tagline=a[1].trim();else{var s=o.match(/^[-*+]\s+(.*)/);if(s){var l=s[1],c=l.match(/^\*\*([^*]+)\*\*\s*[-—:]\s*(.*)/);c?e.Highlights.push({Label:c[1].trim(),Text:c[2].trim()}):e.Highlights.push({Label:"",Text:l.trim()})}else{var d=o.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);d?e.Actions.push({Text:d[1].trim(),Href:d[2].trim()}):e.Description?e.Description+=" "+o:e.Description=o}}}}}return e}},{key:"loadSidebar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_sidebar.md").then(function(t){return t.ok?t.text():null}).then(function(t){if(!t)return e.log.info("Docuserve: No _sidebar.md found; sidebar will use catalog data."),n();var i=e.parseSidebarMarkdown(t);return i&&i.length>0&&(e.pict.AppData.Docuserve.SidebarGroups=i,e.pict.AppData.Docuserve.SidebarLoaded=!0),n()}).catch(function(t){return e.log.warn("Docuserve: Error loading _sidebar.md: ".concat(t)),n()})}},{key:"loadTopbar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_topbar.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.TopBar=e.parseTopbar(t),e.pict.AppData.Docuserve.TopBarLoaded=!0,n()):(e.log.info("Docuserve: No _topbar.md found; top bar will use defaults."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading _topbar.md: ".concat(t)),n()})}},{key:"parseTopbar",value:function(t){for(var e={Brand:"",NavLinks:[],ExternalLinks:[]},n=t.split("\n"),i=0;i<n.length;i++){var o=n[i].trim();if(o){var r=o.match(/^#+\s+(.+)/);if(r)e.Brand=r[1].trim();else{var a=o.match(/^[-*+]\s+(.*)/);if(a){var s=a[1].trim().match(/^\[([^\]]+)\]\(([^)]+)\)/);if(s){var l=s[1].trim(),c=s[2].trim();if(c.match(/^https?:\/\//))e.ExternalLinks.push({Text:l,Href:c});else{var d=this.convertSidebarLink(c);e.NavLinks.push({Text:l,Href:d})}}}else;}}}return e}},{key:"loadErrorPage",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"errorpage.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.ErrorPageHTML=e._ContentProvider.parseMarkdown(t),e.pict.AppData.Docuserve.ErrorPageLoaded=!0,n()):(e.log.info("Docuserve: No errorpage.md found; errors will use default page."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading errorpage.md: ".concat(t)),n()})}},{key:"loadKeywordIndex",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"retold-keyword-index.json").then(function(t){return t.ok?t.json():null}).then(function(t){if(!t||!t.LunrIndex||!t.Documents)return e.log.info("Docuserve: No keyword index found; search will be unavailable."),n();try{e._LunrIndex=o.Index.load(t.LunrIndex),e._KeywordDocuments=t.Documents,e.pict.AppData.Docuserve.KeywordIndexLoaded=!0,e.pict.AppData.Docuserve.KeywordDocumentCount=t.DocumentCount||0,e.log.info("Docuserve: Keyword index loaded (".concat(t.DocumentCount||0," documents)."))}catch(t){e.log.warn("Docuserve: Error hydrating lunr index: ".concat(t))}return n()}).catch(function(t){return e.log.warn("Docuserve: Error loading keyword index: ".concat(t)),n()})}},{key:"isModuleInCatalog",value:function(t,e){if(!this._Catalog||!this._Catalog.Groups)return!1;for(var n=0;n<this._Catalog.Groups.length;n++){var i=this._Catalog.Groups[n];if(i.Key===t)for(var o=0;o<i.Modules.length;o++){if(i.Modules[o].Name===e)return!0}}return!1}},{key:"findModuleGroupKey",value:function(t){if(!this._Catalog||!this._Catalog.Groups)return null;for(var e=0;e<this._Catalog.Groups.length;e++)for(var n=this._Catalog.Groups[e],i=0;i<n.Modules.length;i++)if(n.Modules[i].Name===t)return n.Key;return null}},{key:"isGroupInCatalog",value:function(t){if(!this._Catalog||!this._Catalog.Groups)return!1;for(var e=0;e<this._Catalog.Groups.length;e++)if(this._Catalog.Groups[e].Key===t)return!0;return!1}},{key:"search",value:function(t){if(!(this._LunrIndex&&this._KeywordDocuments&&t&&t.trim()))return[];var e=[];try{for(var n=this._LunrIndex.search(t),i=0;i<n.length;i++){var o=n[i].ref,r=n[i].score,a=this._KeywordDocuments[o];if(a){var s=o.split("/"),l="";if(s.length>=2){var c=s[0],d=s[1];l=this.isModuleInCatalog(c,d)?"#/doc/"+o:"#/page/"+o}e.push({Key:o,Title:a.Title||o,Group:a.Group||"",Module:a.Module||"",DocPath:a.DocPath||"",Score:r,Route:l})}}}catch(t){this.log.warn("Docuserve: Search error: ".concat(t))}return e}},{key:"getErrorPageHTML",value:function(t){var e=t||"unknown";return this.pict.AppData.Docuserve.ErrorPageLoaded&&this.pict.AppData.Docuserve.ErrorPageHTML?this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\{\{path\}\}/g,this._ContentProvider.escapeHTML(e)):'<div class="docuserve-not-found"><h2>Page Not Found</h2><p>The document <code>'+this._ContentProvider.escapeHTML(e)+'</code> could not be loaded.</p><p><a href="#/Home">Return to the home page</a></p></div>'}},{key:"parseSidebarMarkdown",value:function(t){for(var e=[],n=null,i=t.split("\n"),o=0;o<i.length;o++){var r=i[o];if(r.trim()){var a=r.match(/^(\s*)/),s=a?a[1].length:0,l=r.trim().match(/^[-*+]\s+(.*)/);if(l){var c=l[1].trim(),d=c.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(s<2)if(d){var p=d[1].trim(),u=d[2].trim();n={Name:p,Key:this.deriveGroupKey(p,u),Route:this.convertSidebarLink(u),Modules:[]},e.push(n)}else{var h=c,f=h.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");n={Name:h,Key:f,Route:"",Modules:[]},e.push(n)}else if(n)if(d){var v=d[1].trim(),m=d[2].trim(),g=this.convertSidebarLink(m);n.Modules.push({Name:v,HasDocs:!0,Group:n.Key,Route:g})}else n.Modules.push({Name:c,HasDocs:!1,Group:n.Key,Route:""})}}}return e}},{key:"convertSidebarLink",value:function(t){if(!t)return"";if("/"===t)return"#/Home";if(t.match(/^#[^/]/)){var e=this.pict.AppData.Docuserve.SidebarGroups;if(e)for(var n=0;n<e.length;n++){var i=e[n].Modules;if(i)for(var o=0;o<i.length;o++)if(i[o].HasDocs&&i[o].Route&&"#/Home"!==i[o].Route)return i[o].Route;if(e[n].Route&&"#/Home"!==e[n].Route)return e[n].Route}return"#/Home"}var r=t.replace(/^\//,"").replace(/\/$/,"");if(!r)return"#/Home";var a=r.split("/");if(a.length>=2){if(this.isGroupInCatalog(a[0])&&this.isModuleInCatalog(a[0],a[1]))return"#/doc/"+r;var s=this.findModuleGroupKey(a[1]);if(s){var l=a.slice(2).join("/");return l?"#/doc/"+s+"/"+a[1]+"/"+l:"#/doc/"+s+"/"+a[1]}}return r.match(/\.md$/)?"#/page/"+r.replace(/\.md$/,""):"#/page/"+r}},{key:"deriveGroupKey",value:function(t,e){if(e&&"/"!==e){var n=e.replace(/^\//,"").replace(/\.md$/,"").replace(/\/$/,"");if(n&&!n.includes("/"))return n.toLowerCase()}return t.split(/[\s—\-:]+/)[0].toLowerCase().replace(/[^a-z0-9]/g,"")}},{key:"buildSidebarData",value:function(t){for(var e=[],n=0;n<t.Groups.length;n++){for(var i=t.Groups[n],o={Name:i.Name,Key:i.Key,Description:i.Description,Modules:[]},r=0;r<i.Modules.length;r++){var a=i.Modules[r];o.Modules.push({Name:a.Name,HasDocs:a.HasDocs,Group:i.Key,Route:"#/doc/"+i.Key+"/"+a.Name})}e.push(o)}this.pict.AppData.Docuserve.SidebarGroups=e}},{key:"resolveDocumentURL",value:function(t,e,n){if(!this._Catalog)return null;for(var i=this._Catalog.GitHubOrg||"stevenvelozo",o=this._Catalog.DefaultBranch||"master",r=0;r<this._Catalog.Groups.length;r++){var a=this._Catalog.Groups[r];if(a.Key===t)for(var s=0;s<a.Modules.length;s++){var l=a.Modules[s];if(l.Name===e){var c=l.Branch||o,d=n||"README.md";return"https://raw.githubusercontent.com/"+i+"/"+l.Repo+"/"+c+"/docs/"+d}}}return null}},{key:"resolveGitHubURLToRoute",value:function(t){if(!this._Catalog||!this._Catalog.Groups||!t)return null;var e=t.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)/);if(!e)return null;var n=e[1],i=e[2];if(n!==this._Catalog.GitHubOrg)return null;for(var o=0;o<this._Catalog.Groups.length;o++)for(var r=this._Catalog.Groups[o],a=0;a<r.Modules.length;a++){var s=r.Modules[a];if(s.Repo===i)return"#/doc/"+r.Key+"/"+s.Name}return null}},{key:"resolveGitHubPagesURL",value:function(t,e){if(!this._Catalog||!this._Catalog.Groups)return null;for(var n=this._Catalog.GitHubOrg||"stevenvelozo",i=0;i<this._Catalog.Groups.length;i++){var o=this._Catalog.Groups[i];if(o.Key===t)for(var r=0;r<o.Modules.length;r++){var a=o.Modules[r];if(a.Name===e)return a.HasDocs?"https://"+n+".github.io/"+a.Repo+"/":null}}return null}},{key:"getModuleSidebar",value:function(t,e){if(!this._Catalog)return null;for(var n=0;n<this._Catalog.Groups.length;n++){var i=this._Catalog.Groups[n];if(i.Key===t)for(var o=0;o<i.Modules.length;o++){var r=i.Modules[o];if(r.Name===e)return r.Sidebar||null}}return null}},{key:"fetchDocument",value:function(t,e,n,i,o){var r=this,a="function"==typeof e?e:function(){};return t?this._ContentCache[t]?a(null,this._ContentCache[t]):void fetch(t).then(function(t){return t.ok?t.text():null}).then(function(e){if(!e)return a("Document not found",r.getErrorPageHTML(t));var s=r._ContentProvider.parseMarkdown(e,r._createLinkResolver(n,i,o));return r._ContentCache[t]=s,a(null,s)}).catch(function(e){return r.log.warn("Docuserve: Error fetching document [".concat(t,"]: ").concat(e)),a(e,r.getErrorPageHTML(t))}):a("No URL provided","")}},{key:"fetchLocalDocument",value:function(t,e,n,i,o){var r=(this.pict.AppData.Docuserve.DocsBaseURL||"")+t;this.fetchDocument(r,e,n,i,o)}},{key:"convertDocLink",value:function(t,e,n,i){var o=t.replace(/^\.\//,""),r=(o=o.replace(/^\//,"")).split("/");if(r.length>=2&&this.isGroupInCatalog(r[0])&&this.isModuleInCatalog(r[0],r[1]))return"#/doc/"+o;if(e&&n){var a="";if(i){var s=i.split("/");s.length>1&&(s.pop(),a=s.join("/")+"/")}return"#/doc/"+e+"/"+n+"/"+a+o}return o.match(/\.md$/)?"#/page/"+o.replace(/\.md$/,""):"#/page/"+o}}])}(i);e.exports=a,e.exports.default_configuration={ProviderIdentifier:"Docuserve-Documentation",AutoInitialize:!0,AutoInitializeOrdinal:0}},{lunr:3,"pict-provider":19,"pict-section-content":6}],12:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t){var n=t,i=this.pict.AppData.Docuserve.CurrentGroup,o=this.pict.AppData.Docuserve.CurrentModule;if(i&&o){var r=this.pict.providers["Docuserve-Documentation"];if(r){var a=r.resolveGitHubPagesURL(i,o);a&&(n='<div class="docuserve-module-external-link"><a href="'+a+'" target="_blank" rel="noopener">&#x2197; View '+o+" documentation site</a></div>"+n)}}_superPropGet(e,"displayContent",this,3)([n,"Docuserve-Content-Body"])}},{key:"showLoading",value:function(){_superPropGet(e,"showLoading",this,3)(["Loading documentation...","Docuserve-Content-Body"])}}])}(t("pict-section-content"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Content",DefaultRenderable:"Docuserve-Content-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-module-external-link {\n\t\t\tpadding: 0.5em 0;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t.docuserve-module-external-link a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-module-external-link a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Content-Template",Template:'\n<div class="pict-content" id="Docuserve-Content-Body">\n\t<div class="pict-content-loading">Loading documentation...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Content-Display",TemplateHash:"Docuserve-Content-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-content":6}],13:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){if(this.pict.views["Docuserve-TopBar"].render(),this.pict.views["Docuserve-Sidebar"].render(),this.pict.views["Docuserve-Splash"].render(),this.pict.CSSMap.injectCSS(),this.pict.PictApplication.resolveHash(),!this._HashChangeListenerBound){this._HashChangeListenerBound=!0;var r=this;window.addEventListener("hashchange",function(){r.pict.PictApplication.resolveHash()})}return _superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Layout",DefaultRenderable:"Docuserve-Layout-Shell",DefaultDestinationAddress:"#Docuserve-Application-Container",AutoRender:!1,CSS:"\n\t\t#Docuserve-Application-Container {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#Docuserve-TopBar-Container {\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.docuserve-body {\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#Docuserve-Sidebar-Container {\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 280px;\n\t\t\toverflow-y: auto;\n\t\t\tbackground-color: #F5F0E8;\n\t\t}\n\t\t#Docuserve-Content-Container {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow-y: auto;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Layout-Shell-Template",Template:'\n<div id="Docuserve-TopBar-Container"></div>\n<div class="docuserve-body">\n\t<div id="Docuserve-Sidebar-Container"></div>\n\t<div id="Docuserve-Content-Container"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Layout-Shell",TemplateHash:"Docuserve-Layout-Shell-Template",DestinationAddress:"#Docuserve-Application-Container",RenderMethod:"replace"}]}},{"pict-view":52}],14:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._SearchDebounceTimer=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this,a=document.getElementById("Docuserve-Search-Input");return a&&a.addEventListener("input",function(){r._SearchDebounceTimer&&clearTimeout(r._SearchDebounceTimer),r._SearchDebounceTimer=setTimeout(function(){r.performSearch(a.value)},250)}),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"showSearch",value:function(t){var e=document.getElementById("Docuserve-Search-Input");if(e&&(e.value=t||"",e.focus()),t&&t.trim())this.performSearch(t);else{var n=this.pict.AppData.Docuserve.KeywordDocumentCount||0,i=n>0?"Search across "+n+" documents.":"Enter a search term to find documentation.";this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",i),this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}var o=document.getElementById("Docuserve-Content-Container");o&&(o.scrollTop=0)}},{key:"performSearch",value:function(t){if(!t||!t.trim()){var e=this.pict.AppData.Docuserve.KeywordDocumentCount||0,n=e>0?"Search across "+e+" documents.":"Enter a search term to find documentation.";return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",n),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}var i=this.pict.providers["Docuserve-Documentation"].search(t);if(0===i.length)return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status","No results found for '"+this.escapeHTML(t)+"'."),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","");this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",i.length+" result"+(1!==i.length?"s":"")+" for '"+this.escapeHTML(t)+"'");for(var o="",r=0;r<i.length;r++){var a=i[r],s="";a.Group&&a.Module&&(s=a.Group+" &rsaquo; "+a.Module),o+='<a class="docuserve-search-result" href="'+a.Route+'">',o+='<div class="docuserve-search-result-title">'+this.escapeHTML(a.Title)+"</div>",s&&(o+='<div class="docuserve-search-result-breadcrumb">'+s+"</div>"),a.DocPath&&(o+='<div class="docuserve-search-result-path">'+this.escapeHTML(a.DocPath)+"</div>"),o+="</a>"}this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results",o)}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Search",DefaultRenderable:"Docuserve-Search-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-search {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid #D4CCBE;\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid #EAE3D8;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: #2E7D74;\n\t\t\tbox-shadow: 0 2px 8px rgba(46, 125, 116, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2E7D74;\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Search-Template",Template:'\n<div class="docuserve-search">\n\t<div class="docuserve-search-header">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type="text" class="docuserve-search-input" id="Docuserve-Search-Input" placeholder="Search across all modules...">\n\t\t<div id="Docuserve-Search-Status" class="docuserve-search-status"></div>\n\t</div>\n\t<div id="Docuserve-Search-Results" class="docuserve-search-results"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Search-Display",TemplateHash:"Docuserve-Search-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":52}],15:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._SidebarSearchDebounceTimer=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this;this.renderSidebarGroups();var a=document.getElementById("Docuserve-Sidebar-Search");if(a&&this.pict.AppData.Docuserve.KeywordIndexLoaded){a.style.display="";var s=document.getElementById("Docuserve-Sidebar-Search-Input");s&&s.addEventListener("input",function(){r._SidebarSearchDebounceTimer&&clearTimeout(r._SidebarSearchDebounceTimer),r._SidebarSearchDebounceTimer=setTimeout(function(){r.performSidebarSearch(s.value)},250)})}return _superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderSidebarGroups",value:function(){var t=this.pict.AppData.Docuserve.SidebarGroups;if(!t||t.length<1)this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups","");else{for(var e="",n=0;n<t.length;n++){var i=t[n];e+='<div class="docuserve-sidebar-group">';var o=i.Route||"";if(!o)for(var r=0;r<i.Modules.length;r++)if(i.Modules[r].HasDocs&&i.Modules[r].Route){o=i.Modules[r].Route;break}if(o){var a="",s=window.location.hash||"";this.pict.AppData.Docuserve.CurrentGroup!==i.Key&&s!==o||(a=" active"),e+='<a class="docuserve-sidebar-group-title'+a+'" href="'+o+'">'+this.escapeHTML(i.Name)+"</a>"}else e+='<div class="docuserve-sidebar-group-title">'+this.escapeHTML(i.Name)+"</div>";e+='<ul class="docuserve-sidebar-modules">';for(var l=0;l<i.Modules.length;l++){var c=i.Modules[l];if(c.HasDocs){var d="";this.pict.AppData.Docuserve.CurrentGroup===c.Group&&this.pict.AppData.Docuserve.CurrentModule===c.Name&&(d=' class="active"'),e+="<li><a"+d+' href="'+c.Route+'">'+this.escapeHTML(c.Name)+"</a></li>"}else e+='<li><span class="no-docs">'+this.escapeHTML(c.Name)+"</span></li>"}e+="</ul>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups",e)}}},{key:"renderModuleNav",value:function(t,e){var n=this.pict.providers["Docuserve-Documentation"];if(n){var i=n.getModuleSidebar(t,e);if(i){for(var o="#/doc/"+t+"/"+e+"/",r='<div class="docuserve-sidebar-module-nav">',a=0;a<i.length;a++){var s=i[a];if(s.Children){r+='<div class="docuserve-sidebar-module-nav-section">'+this.escapeHTML(s.Title)+"</div>";for(var l=0;l<s.Children.length;l++){var c=s.Children[l];c.Path&&(r+='<a href="'+o+c.Path+'">'+this.escapeHTML(c.Title)+"</a>")}}else s.Path&&(r+='<a href="'+o+s.Path+'">'+this.escapeHTML(s.Title)+"</a>")}r+="</div>",this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav",r)}else this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}}},{key:"performSidebarSearch",value:function(t){var e=document.getElementById("Docuserve-Sidebar-Search-Results");if(e)if(t&&t.trim()){var n=this.pict.providers["Docuserve-Documentation"].search(t);if(0!==n.length){for(var i="",o=0;o<n.length&&o<8;o++){var r=n[o],a="";r.Group&&r.Module&&(a=r.Group+" / "+r.Module),i+='<a href="'+r.Route+'">',i+='<div class="docuserve-sidebar-search-result-title">'+this.escapeHTML(r.Title)+"</div>",a&&(i+='<div class="docuserve-sidebar-search-result-meta">'+this.escapeHTML(a)+"</div>"),i+="</a>"}if(n.length>8)i+='<a class="docuserve-sidebar-search-all" href="#/search/'+encodeURIComponent(t)+'">See all '+n.length+" results</a>";e.innerHTML=i}else e.innerHTML='<div style="padding: 0.4em 0.5em; font-size: 0.82em; color: #8A7F72;">No results found.</div>'}else e.innerHTML=""}},{key:"toggleSidebar",value:function(){this.pict.AppData.Docuserve.SidebarVisible=!this.pict.AppData.Docuserve.SidebarVisible;var t=document.getElementById("Docuserve-Sidebar-Container"),e=document.getElementById("Docuserve-TopBar-Toggle");this.pict.AppData.Docuserve.SidebarVisible?(t&&(t.style.display=""),e&&(e.style.display="none")):(t&&(t.style.display="none"),e&&(e.style.display="inline-block"))}},{key:"clearModuleNav",value:function(){this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Sidebar",DefaultRenderable:"Docuserve-Sidebar-Content",DefaultDestinationAddress:"#Docuserve-Sidebar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-sidebar {\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\tmin-height: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1.2em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder: 1px solid #D4CCBE;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: #423D37;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid #EAE3D8;\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground-color: #EAE3D8;\n\t\t}\n\t\ta.docuserve-sidebar-group-title.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground-color: #E0EDEB;\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: #E0EDEB;\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid #EAE3D8;\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Sidebar-Template",Template:'\n<div class="docuserve-sidebar">\n\t<div class="docuserve-sidebar-header">\n\t\t<button class="docuserve-sidebar-close" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">&times;</button>\n\t</div>\n\t<div id="Docuserve-Sidebar-Search" class="docuserve-sidebar-search" style="display:none;">\n\t\t<input type="text" placeholder="Search docs..." id="Docuserve-Sidebar-Search-Input">\n\t\t<div id="Docuserve-Sidebar-Search-Results" class="docuserve-sidebar-search-results"></div>\n\t</div>\n\t<div class="docuserve-sidebar-home">\n\t\t<a onclick="{~P~}.PictApplication.navigateTo(\'/Home\')">Home</a>\n\t</div>\n\t<div id="Docuserve-Sidebar-Groups"></div>\n\t<div id="Docuserve-Sidebar-ModuleNav"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Sidebar-Content",TemplateHash:"Docuserve-Sidebar-Template",DestinationAddress:"#Docuserve-Sidebar-Container",RenderMethod:"replace"}]}},{"pict-view":52}],16:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.AppData.Docuserve;return r.CoverLoaded&&r.Cover?this.renderFromCover(r.Cover):this.renderFromCatalog(r),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderFromCover",value:function(t){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.sanitizeTitle(t.Title)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(t.Tagline)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description",this.escapeHTML(t.Description));for(var e="",n=0;n<t.Highlights.length;n++){var i=t.Highlights[n];e+='<div class="docuserve-splash-highlight-card">',i.Label&&(e+="<h3>"+this.escapeHTML(i.Label)+"</h3>"),e+="<p>"+this.escapeHTML(i.Text)+"</p>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",e);for(var o="",r=this.pict.providers["Docuserve-Documentation"],a=0;a<t.Actions.length;a++){var s=t.Actions[a],l=0===a?"primary":"secondary",c=s.Href;if(c.match(/^https?:\/\//))o+='<a class="'+l+'" href="'+this.escapeHTML(c)+'" target="_blank" rel="noopener">'+this.escapeHTML(s.Text)+"</a>";else{var d=r.convertSidebarLink(c);o+='<a class="'+l+'" href="'+this.escapeHTML(d)+'">'+this.escapeHTML(s.Text)+"</a>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions",o)}},{key:"renderFromCatalog",value:function(t){var e="Documentation",n="";t.CatalogLoaded&&t.Catalog&&t.Catalog.Name?e=t.Catalog.Name:t.TopBarLoaded&&t.TopBar&&t.TopBar.Brand?e=t.TopBar.Brand:"undefined"!=typeof document&&document.title&&(e=document.title),t.CatalogLoaded&&t.Catalog&&t.Catalog.Description&&(n=t.Catalog.Description),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.escapeHTML(e)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(n)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description","");for(var i="",o=t.SidebarGroups||[],r=0;r<o.length;r++){var a=o[r];if(a.Modules&&!(a.Modules.length<1)){var s=a.Description||a.Modules.length+" modules";i+='<div class="docuserve-splash-highlight-card">',i+="<h3>"+this.escapeHTML(a.Name)+"</h3>",i+="<p>"+this.escapeHTML(s)+"</p>",i+="</div>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",i),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions","")}},{key:"sanitizeTitle",value:function(t){return t?this.escapeHTML(t).replace(/&lt;small&gt;/gi,"<small>").replace(/&lt;\/small&gt;/gi,"</small>"):""}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Splash",DefaultRenderable:"Docuserve-Splash-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: linear-gradient(135deg, #F5F0E8 0%, #E4EFED 100%);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash h1 small {\n\t\t\tfont-size: 0.4em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #7A7568;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #7A7568;\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: #5E5549;\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: #fff;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: #7A7568;\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: #2E7D74;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: #256861;\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 2px solid #2E7D74;\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: #256861;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Splash-Template",Template:'\n<div class="docuserve-splash">\n\t<h1 id="Docuserve-Splash-Title"></h1>\n\t<div class="docuserve-splash-tagline" id="Docuserve-Splash-Tagline"></div>\n\t<div class="docuserve-splash-description" id="Docuserve-Splash-Description"></div>\n\t<div class="docuserve-splash-highlights" id="Docuserve-Splash-Highlights"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":52}],17:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){return this.renderTopBarContent(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderTopBarContent",value:function(){var t=this.pict.AppData.Docuserve,e=document.getElementById("Docuserve-TopBar-Brand"),n=document.getElementById("Docuserve-TopBar-Nav"),i=document.getElementById("Docuserve-TopBar-Links");if(e&&n&&i)if(t.TopBarLoaded&&t.TopBar){var o=t.TopBar;e.innerHTML=this.sanitizeTitle(o.Brand||"Documentation");for(var r='<a href="#/Home">Home</a>',a=0;a<o.NavLinks.length;a++){var s=o.NavLinks[a];r+='<a href="'+s.Href+'">'+this.escapeHTML(s.Text)+"</a>"}n.innerHTML=r;var l="";t.KeywordIndexLoaded&&(l+='<a href="#/search/">Search</a>');for(var c=0;c<o.ExternalLinks.length;c++){var d=o.ExternalLinks[c];l+='<a href="'+this.escapeHTML(d.Href)+'" target="_blank" rel="noopener">'+this.escapeHTML(d.Text)+"</a>"}i.innerHTML=l}else{var p="Documentation";t.CoverLoaded&&t.Cover&&t.Cover.Title?p=t.Cover.Title:t.CatalogLoaded&&t.Catalog&&t.Catalog.Name&&(p=t.Catalog.Name),e.innerHTML=this.sanitizeTitle(p),n.innerHTML='<a href="#/Home">Home</a>',i.innerHTML=t.KeywordIndexLoaded?'<a href="#/search/">Search</a>':""}}},{key:"sanitizeTitle",value:function(t){return t?this.escapeHTML(t).replace(/&lt;small&gt;/gi,"<small>").replace(/&lt;\/small&gt;/gi,"</small>"):""}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar",DefaultRenderable:"Docuserve-TopBar-Content",DefaultDestinationAddress:"#Docuserve-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-topbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0 1.5em;\n\t\t\theight: 56px;\n\t\t\tbox-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 100;\n\t\t}\n\t\t.docuserve-topbar-brand {\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t\tcolor: #E8E0D4;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-brand small {\n\t\t\tfont-size: 0.65em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-left: 0.2em;\n\t\t}\n\t\t.docuserve-topbar-brand:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-nav {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-topbar-nav a {\n\t\t\tcolor: #B5AA9A;\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-nav a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-links {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.docuserve-topbar-links a {\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-topbar-links a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.docuserve-topbar-toggle {\n\t\t\tdisplay: none;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #B5AA9A;\n\t\t\tfont-size: 1.3em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tmargin-left: 0.5em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-topbar-toggle:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-right {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-Template",Template:'\n<div class="docuserve-topbar">\n\t<a id="Docuserve-TopBar-Brand" class="docuserve-topbar-brand" href="#/Home"></a>\n\t<div id="Docuserve-TopBar-Nav" class="docuserve-topbar-nav"></div>\n\t<div class="docuserve-topbar-right">\n\t\t<div id="Docuserve-TopBar-Links" class="docuserve-topbar-links"></div>\n\t\t<button id="Docuserve-TopBar-Toggle" class="docuserve-topbar-toggle" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">&#9776;</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-TopBar-Content",TemplateHash:"Docuserve-TopBar-Template",DestinationAddress:"#Docuserve-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":52}],18:[function(t,e,n){e.exports={name:"pict-provider",version:"1.0.10",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx mocha -u tdd -R spec",tests:"npx mocha -u tdd --exit -R spec --grep",coverage:"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.51",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.18"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],19:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),n),i])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=o,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var s=0;s<a.options.Templates.length;s++){var l=a.options.Templates[s];l.hasOwnProperty("Postfix")&&l.hasOwnProperty("Template")?(l.Source||(l.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(l.Prefix,l.Postfix,l.Template,l.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(s," in the options array."),l)}return a}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this)),n.anticipate(this.onAfterInitializeAsync.bind(this)),n.wait(function(n){return e.initializeTimestamp=e.pict.log.getTimeStamp(),n?e.log.error("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization failed: ").concat(n.message||n),{Stack:n.stack}):e.pict.LogNoisiness>0&&e.log.info("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(t){return this.onPreRender(),t()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(t){return this.onPreRender(),t()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}},{key:"onAfterLoadDataAsync",value:function(t){return t()}},{key:"onBeforeSaveDataAsync",value:function(t){return t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}},{key:"onAfterSaveDataAsync",value:function(t){return t()}}])}(i);e.exports=a},{"../package.json":18,"fable-serviceproviderbase":2}],20:[function(t,e,n){var i={javascript:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2|(`(?:[^`\\]|\\.)*?`)|(\/(?![/*])(?:\\.|\[(?:\\.|[^\]])*\]|[^/\\\n])+\/[gimsuvy]*)/g,keywords:/\b(async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|import|in|instanceof|let|new|of|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/g,builtins:/\b(true|false|null|undefined|NaN|Infinity|console|window|document|Math|JSON|Array|Object|String|Number|Boolean|Date|RegExp|Map|Set|Promise|Error|Symbol|parseInt|parseFloat|require|module|exports)\b/g,numbers:/\b(\d+\.?\d*(?:e[+-]?\d+)?|0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+)\b/g},json:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:[^"\\]|\\.)*")/g,keywords:/\b(true|false|null)\b/g,numbers:/-?\b\d+\.?\d*(?:e[+-]?\d+)?\b/g},html:{tokenizer:/(<!--[\s\S]*?-->)|(["'])(?:(?!\2|\\).|\\.)*?\2|(<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*\/?>)/g,tagGroupIndex:3},css:{tokenizer:/(\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,selectors:/([.#]?[a-zA-Z_][\w-]*(?:\s*[>+~]\s*[.#]?[a-zA-Z_][\w-]*)*)\s*\{/g,properties:/\b([a-zA-Z-]+)\s*:/g,numbers:/\b(\d+\.?\d*)(px|em|rem|%|vh|vw|s|ms|deg|fr)?\b/g,keywords:/\b(important|inherit|initial|unset|none|auto|block|inline|flex|grid)\b/g},sql:{tokenizer:/(--[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,keywords:/\b(SELECT|FROM|WHERE|AND|OR|INSERT|INTO|VALUES|UPDATE|SET|DELETE|CREATE|TABLE|DROP|ALTER|ADD|COLUMN|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|ALL|DISTINCT|COUNT|SUM|AVG|MIN|MAX|NOT|NULL|IS|IN|BETWEEN|LIKE|EXISTS|CASE|WHEN|THEN|ELSE|END|PRIMARY|KEY|FOREIGN|REFERENCES|CONSTRAINT|DEFAULT|CHECK|UNIQUE|CASCADE|GRANT|REVOKE|COMMIT|ROLLBACK|BEGIN|TRANSACTION|INT|VARCHAR|DATETIME|AUTO_INCREMENT|CURRENT_TIMESTAMP)\b/gi,numbers:/\b\d+\.?\d*\b/g}};function o(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(t,e){var n=t;return e.selectors&&(e.selectors.lastIndex=0,n=n.replace(e.selectors,'<span class="function-name">$1</span>{')),e.properties&&(e.properties.lastIndex=0,n=n.replace(e.properties,'<span class="property">$1</span>:')),e.keywords&&(e.keywords.lastIndex=0,n=n.replace(e.keywords,'<span class="keyword">$1</span>')),e.builtins&&(e.builtins.lastIndex=0,n=n.replace(e.builtins,'<span class="keyword">$1</span>')),e.numbers&&(e.numbers.lastIndex=0,n=n.replace(e.numbers,function(t){return'<span class="number">'.concat(t,"</span>")})),n}function a(t){var e="",n=t,i=n.match(/^(<\/?)([a-zA-Z][a-zA-Z0-9-]*)/);if(!i)return o(t);e+=o(i[1]),e+='<span class="tag">'+o(i[2])+"</span>",n=n.substring(i[0].length);for(var r,a=/^(\s+)([a-zA-Z-]+)(?:(\s*=\s*)(["'])([^"']*?)\4)?/;null!==(r=n.match(a));)e+=r[1],e+='<span class="attr-name">'+o(r[2])+"</span>",r[3]&&(e+=o(r[3]),e+='<span class="attr-value">'+o(r[4])+o(r[5])+o(r[4])+"</span>"),n=n.substring(r[0].length);return e+=o(n)}i.js=i.javascript,i.htm=i.html,e.exports=function(t){return function(e){var n=e.textContent,s="string"==typeof t?t.toLowerCase():"javascript",l=i[s];if(l)if(l.tokenizer){var c,d="",p=0,u=l.tagGroupIndex||0;for(l.tokenizer.lastIndex=0;null!==(c=l.tokenizer.exec(n));){if(c.index>p)d+=r(o(n.substring(p,c.index)),l);var h=c[0];c[1]?d+='<span class="comment">'.concat(o(h),"</span>"):u>0&&c[u]?d+=a(h):d+='<span class="string">'.concat(o(h),"</span>"),p=l.tokenizer.lastIndex}if(p<n.length)d+=r(o(n.substring(p)),l);e.innerHTML=d}else e.innerHTML=r(o(n),l);else e.innerHTML=o(n)}},e.exports.LanguageDefinitions=i},{}],21:[function(t,e,n){e.exports={RenderOnLoad:!0,DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#CodeEditor-Container-Div",Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- CodeEditor-Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#CodeEditor-Container-Div"}],TargetElementAddress:"#CodeEditor-Container-Div",CodeDataAddress:!1,Language:"javascript",ReadOnly:!1,Tab:"\t",IndentOn:/[({[]$/,MoveToNewLine:/^[)}\]]/,AddClosing:!0,CatchTab:!0,LineNumbers:!0,DefaultCode:"// Enter your code here\n",CSS:".pict-code-editor-wrap\n{\n\tdisplay: flex;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tborder: 1px solid #D0D0D0;\n\tborder-radius: 4px;\n\toverflow: auto;\n}\n.pict-code-editor-wrap .pict-code-line-numbers\n{\n\tposition: sticky;\n\tleft: 0;\n\twidth: 40px;\n\tmin-width: 40px;\n\tpadding: 10px 0;\n\ttext-align: right;\n\tbackground: #F5F5F5;\n\tborder-right: 1px solid #D0D0D0;\n\tcolor: #999;\n\tfont-size: 13px;\n\tline-height: 1.5;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-sizing: border-box;\n\tz-index: 1;\n}\n.pict-code-editor-wrap .pict-code-line-numbers span\n{\n\tdisplay: block;\n\tpadding: 0 8px 0 0;\n}\n.pict-code-editor-wrap .pict-code-editor\n{\n\tmargin: 0;\n\tpadding: 10px 10px 10px 8px;\n\tmin-height: 100px;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\ttab-size: 4;\n\twhite-space: pre;\n\toverflow-wrap: normal;\n\tcolor: #383A42;\n\tbackground: #FAFAFA;\n\tcaret-color: #526FFF;\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-code-editor-wrap .pict-code-editor.pict-code-no-line-numbers\n{\n\tpadding-left: 10px;\n\tborder-radius: 4px;\n}\n.pict-code-editor-wrap .pict-code-editor .keyword { color: #A626A4; }\n.pict-code-editor-wrap .pict-code-editor .string { color: #50A14F; }\n.pict-code-editor-wrap .pict-code-editor .number { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .comment { color: #A0A1A7; font-style: italic; }\n.pict-code-editor-wrap .pict-code-editor .operator { color: #0184BC; }\n.pict-code-editor-wrap .pict-code-editor .punctuation { color: #383A42; }\n.pict-code-editor-wrap .pict-code-editor .function-name { color: #4078F2; }\n.pict-code-editor-wrap .pict-code-editor .property { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .tag { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .attr-name { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .attr-value { color: #50A14F; }\n"}},{}],22:[function(t,e,n){var i=t("pict-view"),o=t("./Pict-Code-Highlighter.js"),r=t("./Pict-Section-Code-DefaultConfiguration.js"),a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o.codeJar=null,o._highlightFunction=null,o._language=o.options.Language||"javascript",o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._codeJarPrototype=null,this.targetElement=!1,this._highlightFunction=o(this._language),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeJarPrototype",value:function(t){if("function"!=typeof t)return"undefined"!=typeof window&&"function"==typeof window.CodeJar?(this.log.trace("PICT-Code Found CodeJar in window.CodeJar."),void(this._codeJarPrototype=window.CodeJar)):(this.log.error("PICT-Code No CodeJar prototype found. Include codejar via script tag or call connectCodeJarPrototype(CodeJar) explicitly."),!1);this._codeJarPrototype=t}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){var t=this;if(this._codeJarPrototype||this.connectCodeJarPrototype(),!this._codeJarPrototype)return this.log.error("PICT-Code Cannot initialize editor; no CodeJar prototype available."),!1;if(this.codeJar)return this.log.error("PICT-Code editor is already initialized!"),!1;var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-Code Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._buildEditorDOM();var n=this._resolveCodeContent(),i={};this.options.Tab&&(i.tab=this.options.Tab),this.options.IndentOn&&(i.indentOn=this.options.IndentOn),this.options.MoveToNewLine&&(i.moveToNewLine=this.options.MoveToNewLine),void 0!==this.options.AddClosing&&(i.addClosing=this.options.AddClosing),void 0!==this.options.CatchTab&&(i.catchTab=this.options.CatchTab),this.customConfigureEditorOptions(i);var o=this._editorElement;this.codeJar=this._codeJarPrototype(o,this._highlightFunction,i),n&&this.codeJar.updateCode(n),this.codeJar.onUpdate(function(e){t._updateLineNumbers(),t.onCodeChange(e)}),this._updateLineNumbers(),this.options.ReadOnly&&o.setAttribute("contenteditable","false")}},{key:"_buildEditorDOM",value:function(){this.targetElement.innerHTML="";var t=document.createElement("div");if(t.className="pict-code-editor-wrap",this.options.LineNumbers){var e=document.createElement("div");e.className="pict-code-line-numbers",t.appendChild(e),this._lineNumbersElement=e}var n=document.createElement("div");n.className="pict-code-editor language-"+this._language,this.options.LineNumbers||(n.className+=" pict-code-no-line-numbers"),t.appendChild(n),this.targetElement.appendChild(t),this._editorElement=n,this._wrapElement=t}},{key:"_updateLineNumbers",value:function(){if(this.options.LineNumbers&&this._lineNumbersElement&&this._editorElement){for(var t=(this._editorElement.textContent||"").split("\n").length,e="",n=1;n<=t;n++)e+="<span>".concat(n,"</span>");this._lineNumbersElement.innerHTML=e}}},{key:"_resolveCodeContent",value:function(){if(this.options.CodeDataAddress){var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.CodeDataAddress);if("string"==typeof e)return e;this.log.warn("PICT-Code Address [".concat(this.options.CodeDataAddress,"] did not return a string; it was ").concat(_typeof(e),"."))}return this.options.DefaultCode||""}},{key:"customConfigureEditorOptions",value:function(t){}},{key:"onCodeChange",value:function(t){if(this.options.CodeDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.CodeDataAddress,t)}}},{key:"getCode",value:function(){return this.codeJar?this.codeJar.toString():(this.log.warn("PICT-Code getCode called before editor initialized."),"")}},{key:"setCode",value:function(t){this.codeJar?(this.codeJar.updateCode(t),this._updateLineNumbers()):this.log.warn("PICT-Code setCode called before editor initialized.")}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,this._highlightFunction=o(t),this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"setHighlightFunction",value:function(t){var e=this;if("function"==typeof t){if(this._highlightFunction=t,this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}else this.log.error("PICT-Code setHighlightFunction requires a function.")}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this._editorElement&&this._editorElement.setAttribute("contenteditable",t?"false":"true")}},{key:"destroy",value:function(){this.codeJar&&(this.codeJar.destroy(),this.codeJar=null)}},{key:"marshalToView",value:function(){if(_superPropGet(e,"marshalToView",this,3)([]),this.codeJar&&this.options.CodeDataAddress){var t=this._resolveCodeContent();"string"==typeof t&&(this.codeJar.updateCode(t),this._updateLineNumbers())}}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this.codeJar&&this.options.CodeDataAddress&&this.onCodeChange(this.codeJar.toString())}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.createHighlighter=o},{"./Pict-Code-Highlighter.js":20,"./Pict-Section-Code-DefaultConfiguration.js":21,"pict-view":52}],23:[function(t,e,n){arguments[4][20][0].apply(n,arguments)},{dup:20}],24:[function(t,e,n){e.exports={RenderOnLoad:!0,DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#CodeEditor-Container-Div",Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- CodeEditor-Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#CodeEditor-Container-Div"}],TargetElementAddress:"#CodeEditor-Container-Div",CodeDataAddress:!1,Language:"javascript",ReadOnly:!1,Tab:"\t",IndentOn:/[({[]$/,MoveToNewLine:/^[)}\]]/,AddClosing:!0,CatchTab:!0,LineNumbers:!0,DefaultCode:"// Enter your code here\n",CSS:".pict-code-editor-wrap\n{\n\tposition: relative;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tborder: 1px solid #D0D0D0;\n\tborder-radius: 4px;\n\toverflow: auto;\n}\n.pict-code-editor-wrap .pict-code-line-numbers\n{\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 40px;\n\tpadding: 10px 0;\n\ttext-align: right;\n\tbackground: #F5F5F5;\n\tborder-right: 1px solid #D0D0D0;\n\tcolor: #999;\n\tfont-size: 13px;\n\tline-height: 1.5;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-sizing: border-box;\n}\n.pict-code-editor-wrap .pict-code-line-numbers span\n{\n\tdisplay: block;\n\tpadding: 0 8px 0 0;\n}\n.pict-code-editor-wrap .pict-code-editor\n{\n\tmargin: 0;\n\tpadding: 10px 10px 10px 48px;\n\tmin-height: 100px;\n\toutline: none;\n\ttab-size: 4;\n\twhite-space: pre;\n\toverflow-wrap: normal;\n\toverflow-x: auto;\n\tcolor: #383A42;\n\tbackground: #FAFAFA;\n\tcaret-color: #526FFF;\n\tborder-radius: 4px;\n}\n.pict-code-editor-wrap .pict-code-editor.pict-code-no-line-numbers\n{\n\tpadding-left: 10px;\n}\n.pict-code-editor-wrap .pict-code-editor .keyword { color: #A626A4; }\n.pict-code-editor-wrap .pict-code-editor .string { color: #50A14F; }\n.pict-code-editor-wrap .pict-code-editor .number { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .comment { color: #A0A1A7; font-style: italic; }\n.pict-code-editor-wrap .pict-code-editor .operator { color: #0184BC; }\n.pict-code-editor-wrap .pict-code-editor .punctuation { color: #383A42; }\n.pict-code-editor-wrap .pict-code-editor .function-name { color: #4078F2; }\n.pict-code-editor-wrap .pict-code-editor .property { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .tag { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .attr-name { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .attr-value { color: #50A14F; }\n"}},{}],25:[function(t,e,n){arguments[4][22][0].apply(n,arguments)},{"./Pict-Code-Highlighter.js":23,"./Pict-Section-Code-DefaultConfiguration.js":24,dup:22,"pict-view":52}],26:[function(t,e,n){arguments[4][6][0].apply(n,arguments)},{"./providers/Pict-Provider-Content.js":27,"./views/Pict-View-Content.js":28,dup:6}],27:[function(t,e,n){var i=t("pict-provider"),o=t("pict-section-code").createHighlighter,r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"highlightCode",value:function(t,e){if(!t)return"";var n={textContent:t,innerHTML:""};return o(e)(n),n.innerHTML}},{key:"generateLineNumbers",value:function(t){if(!t)return"<span>1</span>";for(var e=t.split("\n").length,n="",i=1;i<=e;i++)n+="<span>"+i+"</span>";return n}},{key:"parseMarkdown",value:function(t,e){var n=this;if(!t)return"";for(var i=t.split("\n"),o=[],r=!1,a=0,s="",l=[],c=!1,d="",p=!1,u=[],h=!1,f=[],v=[],m=function(){v.length>0&&(o.push("<p>"+v.map(function(t){return n.parseInline(t,e)}).join(" ")+"</p>"),v=[])},g=0;g<i.length;g++){var y=i[g];if(r||!y.trim().match(/^\$\$/))if(h)f.push(y);else{var b=y.match(/^(`{3,})/);if(b){var w=b[1].length;if(r){if(w>=a&&y.trim()===b[1]){if("mermaid"===s)o.push('<pre class="mermaid">'+l.join("\n")+"</pre>");else{var C=l.join("\n"),x=this.highlightCode(C,s),A=this.generateLineNumbers(C);o.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+A+'</div><pre><code class="language-'+this.escapeHTML(s)+'">'+x+"</code></pre></div>")}r=!1,a=0,s="",l=[];continue}l.push(y);continue}m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),p&&(o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),p=!1,u=[]),a=w,s=y.replace(/^`{3,}/,"").trim(),r=!0}else if(r)l.push(y);else if(y.match(/^>\s?/))p||(m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),p=!0,u=[]),u.push(y.replace(/^>\s?/,""));else if(p&&(o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),p=!1,u=[]),y.match(/^(-{3,}|\*{3,}|_{3,})\s*$/))m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),o.push("<hr>");else{var k=y.match(/^(#{1,6})\s+(.+)/);if(k){m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1);var D=k[1].length,P=this.parseInline(k[2],e),E=k[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");o.push("<h"+D+' id="'+E+'">'+P+"</h"+D+">")}else{var S=y.match(/^(\s*)[-*+]\s+(.*)/);if(S)m(),c&&"ul"===d||(c&&o.push("ul"===d?"</ul>":"</ol>"),o.push("<ul>"),c=!0,d="ul"),o.push("<li>"+this.parseInline(S[2],e)+"</li>");else{var F=y.match(/^(\s*)\d+\.\s+(.*)/);if(F)m(),c&&"ol"===d||(c&&o.push("ul"===d?"</ul>":"</ol>"),o.push("<ol>"),c=!0,d="ol"),o.push("<li>"+this.parseInline(F[2],e)+"</li>");else if(c&&""!==y.trim()&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),""!==y.trim())if(y.match(/^\|/)&&g+1<i.length&&i[g+1].match(/^\|[\s-:|]+\|/)){m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1);var T="<table>",_=y.split("|").filter(function(t){return""!==t.trim()});T+="<thead><tr>";for(var R=0;R<_.length;R++)T+="<th>"+this.parseInline(_[R].trim(),e)+"</th>";for(T+="</tr></thead>",g++,T+="<tbody>";g+1<i.length&&i[g+1].match(/^\|/);){var I=i[++g].split("|").filter(function(t){return""!==t.trim()});T+="<tr>";for(var L=0;L<I.length;L++)T+="<td>"+this.parseInline(I[L].trim(),e)+"</td>";T+="</tr>"}T+="</tbody></table>",o.push(T)}else v.push(y);else m()}}}}else h?(o.push('<div class="pict-content-katex-display">'+f.join("\n")+"</div>"),h=!1,f=[]):(m(),c&&(o.push("ul"===d?"</ul>":"</ol>"),c=!1),p&&(o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),p=!1,u=[]),h=!0)}if(m(),c&&o.push("ul"===d?"</ul>":"</ol>"),p&&o.push("<blockquote>"+this.parseMarkdown(u.join("\n"),e)+"</blockquote>"),r){var M=l.join("\n"),B=this.highlightCode(M,s),H=this.generateLineNumbers(M);o.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+H+"</div><pre><code>"+B+"</code></pre></div>")}return o.join("\n")}},{key:"parseInline",value:function(t,e){if(!t)return"";var n=t,i=[];return n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace(/`([^`]+)`/g,function(t,e){var n=i.length;return i.push("<code>"+e+"</code>"),"\0CODEINLINE"+n+"\0"})).replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/\$([^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<img src="$2" alt="$1">')).replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(t,n,i){if("function"==typeof e){var o=e(i,n);if(o){var r=o.target?' target="'+o.target+'"':"",a=o.rel?' rel="'+o.rel+'"':"";return'<a href="'+o.href+'"'+r+a+">"+n+"</a>"}}return i.match(/^https?:\/\//)?'<a href="'+i+'" target="_blank" rel="noopener">'+n+"</a>":'<a href="'+i+'">'+n+"</a>"})).replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")).replace(/__([^_]+)__/g,"<strong>$1</strong>")).replace(/\*([^*]+)\*/g,"<em>$1</em>")).replace(/_([^_]+)_/g,"<em>$1</em>")).replace(/\x00CODEINLINE(\d+)\x00/g,function(t,e){return i[parseInt(e)]})}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"):""}}])}(i);e.exports=r,e.exports.default_configuration={ProviderIdentifier:"Pict-Content",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":19,"pict-section-code":25}],28:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t,e){var n=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+n,t);var i=document.getElementById(n);i&&i.parentElement&&(i.parentElement.scrollTop=0),this.renderMermaidDiagrams(n),this.renderKaTeXEquations(n)}},{key:"renderMermaidDiagrams",value:function(t){if("undefined"!=typeof mermaid){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){var i=n.querySelectorAll("pre.mermaid");if(!(i.length<1))try{mermaid.run({nodes:i})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}}},{key:"renderKaTeXEquations",value:function(t){if("undefined"!=typeof katex){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}}}},{key:"showLoading",value:function(t,e){var n=e||"Pict-Content-Body",i=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+n,'<div class="pict-content-loading">'+i+"</div>")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":52}],29:[function(t,e,n){e.exports={ViewIdentifier:"Pict-FileBrowser",DefaultRenderable:"FileBrowser-Container",DefaultDestinationAddress:"#Pict-FileBrowser-Container",AutoRender:!1,StateAddresses:{Layout:"AppData.PictFileBrowser.Layout",RootLocation:"AppData.PictFileBrowser.RootLocation",CurrentLocation:"AppData.PictFileBrowser.CurrentLocation",CurrentFile:"AppData.PictFileBrowser.CurrentFile"},DefaultState:{Layout:"browser-detail",RootLocation:"/",CurrentLocation:"",CurrentFile:null},FileListAddress:"AppData.PictFileBrowser.FileList",FolderTreeAddress:"AppData.PictFileBrowser.FolderTree",ChildFolderCacheAddress:"AppData.PictFileBrowser.ChildFolderCache",Templates:[{Hash:"FileBrowser-Container-Template",Template:'\n<div class="pict-filebrowser" id="Pict-FileBrowser-Wrap">\n\t<div class="pict-filebrowser-browse-pane" id="Pict-FileBrowser-BrowsePane"></div>\n\t<div class="pict-filebrowser-main-pane">\n\t\t<div class="pict-filebrowser-list-pane" id="Pict-FileBrowser-ListPane"></div>\n\t\t<div class="pict-filebrowser-view-pane" id="Pict-FileBrowser-ViewPane"></div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"FileBrowser-Container",TemplateHash:"FileBrowser-Container-Template",DestinationAddress:"#Pict-FileBrowser-Container",RenderMethod:"replace"}],CSS:"\n\t\t.pict-filebrowser {\n\t\t\tdisplay: flex;\n\t\t\theight: 100%;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\toverflow: hidden;\n\t\t\tbackground: #FAFAF8;\n\t\t}\n\n\t\t.pict-filebrowser-browse-pane {\n\t\t\twidth: 240px;\n\t\t\tmin-width: 180px;\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: #F5F0E8;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.pict-filebrowser-main-pane {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\n\t\t.pict-filebrowser-list-pane {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t}\n\n\t\t.pict-filebrowser-view-pane {\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: #FAFAF8;\n\t\t}\n\n\t\t/* --- Browsing: Tree --- */\n\t\t.pict-fb-tree {\n\t\t\tpadding: 8px 0;\n\t\t}\n\t\t.pict-fb-tree-node {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 4px 8px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-tree-node:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-tree-node.selected {\n\t\t\tbackground: #DDD6CA;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-fb-tree-toggle {\n\t\t\tdisplay: inline-block;\n\t\t\twidth: 16px;\n\t\t\ttext-align: center;\n\t\t\tflex-shrink: 0;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-fb-tree-icon {\n\t\t\tmargin-right: 6px;\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 14px;\n\t\t}\n\t\t.pict-fb-tree-label {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.pict-fb-tree-children {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fb-tree-children.expanded {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t/* --- Browsing: Search --- */\n\t\t.pict-fb-search {\n\t\t\tpadding: 8px;\n\t\t}\n\t\t.pict-fb-search-input {\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 6px 10px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 13px;\n\t\t\toutline: none;\n\t\t\tbackground: #fff;\n\t\t}\n\t\t.pict-fb-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.pict-fb-search-results {\n\t\t\tmargin-top: 4px;\n\t\t}\n\t\t.pict-fb-search-result {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 5px 8px;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-fb-search-result:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-search-result-icon {\n\t\t\tmargin-right: 6px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-fb-search-result-name {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-search-result-path {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 11px;\n\t\t\tmargin-left: auto;\n\t\t\tpadding-left: 8px;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t/* --- Listing: Detail --- */\n\t\t.pict-fb-detail {\n\t\t\twidth: 100%;\n\t\t}\n\t\t.pict-fb-detail-header {\n\t\t\tdisplay: flex;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\ttext-transform: uppercase;\n\t\t\tcolor: #8A7F72;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #F5F0E8;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.pict-fb-detail-header-cell {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-fb-detail-header-cell:hover {\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-fb-detail-col-name {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-fb-detail-col-size {\n\t\t\twidth: 90px;\n\t\t\ttext-align: right;\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 12px;\n\t\t}\n\t\t.pict-fb-detail-col-modified {\n\t\t\twidth: 150px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-fb-detail-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 5px 12px;\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 1px solid #F0ECE4;\n\t\t}\n\t\t.pict-fb-detail-row:hover {\n\t\t\tbackground: #F0ECE4;\n\t\t}\n\t\t.pict-fb-detail-row.selected {\n\t\t\tbackground: #E0EDE9;\n\t\t}\n\t\t.pict-fb-detail-icon {\n\t\t\tmargin-right: 8px;\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 16px;\n\t\t}\n\t\t.pict-fb-detail-name {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-detail-size {\n\t\t\twidth: 90px;\n\t\t\ttext-align: right;\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 12px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\t.pict-fb-detail-modified {\n\t\t\twidth: 150px;\n\t\t\tflex-shrink: 0;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 12px;\n\t\t}\n\n\t\t/* --- Listing: Icons --- */\n\t\t.pict-fb-icons {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tpadding: 12px;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-fb-icon-item {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\twidth: 96px;\n\t\t\tpadding: 10px 6px;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.pict-fb-icon-item:hover {\n\t\t\tbackground: #F0ECE4;\n\t\t}\n\t\t.pict-fb-icon-item.selected {\n\t\t\tbackground: #E0EDE9;\n\t\t}\n\t\t.pict-fb-icon-graphic {\n\t\t\tfont-size: 36px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.pict-fb-icon-label {\n\t\t\tfont-size: 12px;\n\t\t\tword-break: break-word;\n\t\t\tline-height: 1.3;\n\t\t\tmax-height: 2.6em;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/* --- Viewing: FileInfo --- */\n\t\t.pict-fb-fileinfo {\n\t\t\tpadding: 12px 16px;\n\t\t}\n\t\t.pict-fb-fileinfo-title {\n\t\t\tfont-size: 15px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 8px;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-fb-fileinfo-table {\n\t\t\twidth: 100%;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-fb-fileinfo-table td {\n\t\t\tpadding: 3px 0;\n\t\t}\n\t\t.pict-fb-fileinfo-label {\n\t\t\tcolor: #8A7F72;\n\t\t\twidth: 100px;\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-fb-fileinfo-value {\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-fb-fileinfo-none {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t/* --- Viewing: Image --- */\n\t\t.pict-fb-image-viewer {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 16px;\n\t\t\tmin-height: 200px;\n\t\t}\n\t\t.pict-fb-image-viewer img {\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 500px;\n\t\t\tobject-fit: contain;\n\t\t\tborder-radius: 4px;\n\t\t\tbox-shadow: 0 1px 3px rgba(0,0,0,0.1);\n\t\t}\n\t\t.pict-fb-image-viewer-none {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t/* --- Breadcrumb / Location Bar --- */\n\t\t.pict-fb-breadcrumb {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-size: 13px;\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\toverflow-x: auto;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-breadcrumb-segment {\n\t\t\tcursor: pointer;\n\t\t\tcolor: #2E7D74;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-fb-breadcrumb-segment:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-breadcrumb-separator {\n\t\t\tmargin: 0 2px;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.pict-fb-breadcrumb-current {\n\t\t\tcolor: #3D3229;\n\t\t\tfont-weight: 500;\n\t\t\tpadding: 2px 4px;\n\t\t}\n\n\t\t/* --- Empty state --- */\n\t\t.pict-fb-empty {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 32px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\t"}},{}],30:[function(t,e,n){e.exports=t("./views/Pict-View-FileBrowser.js"),e.exports.PictFileBrowserBrowseProvider=t("./providers/Pict-Provider-FileBrowserBrowse.js"),e.exports.PictFileBrowserListProvider=t("./providers/Pict-Provider-FileBrowserList.js"),e.exports.PictFileBrowserViewProvider=t("./providers/Pict-Provider-FileBrowserView.js"),e.exports.PictFileBrowserLayoutProvider=t("./providers/Pict-Provider-FileBrowserLayout.js"),e.exports.PictFileBrowserIconProvider=t("./providers/Pict-Provider-FileBrowserIcons.js"),e.exports.PictViewBrowseTree=t("./views/Pict-View-FileBrowser-BrowseTree.js"),e.exports.PictViewBrowseSearch=t("./views/Pict-View-FileBrowser-BrowseSearch.js"),e.exports.PictViewListDetail=t("./views/Pict-View-FileBrowser-ListDetail.js"),e.exports.PictViewListIcons=t("./views/Pict-View-FileBrowser-ListIcons.js"),e.exports.PictViewFileInfo=t("./views/Pict-View-FileBrowser-ViewFileInfo.js"),e.exports.PictViewImageViewer=t("./views/Pict-View-FileBrowser-ViewImage.js"),e.exports.FileBrowserService=t("./services/Pict-Service-FileBrowser.js")},{"./providers/Pict-Provider-FileBrowserBrowse.js":31,"./providers/Pict-Provider-FileBrowserIcons.js":32,"./providers/Pict-Provider-FileBrowserLayout.js":33,"./providers/Pict-Provider-FileBrowserList.js":34,"./providers/Pict-Provider-FileBrowserView.js":35,"./services/Pict-Service-FileBrowser.js":36,"./views/Pict-View-FileBrowser-BrowseSearch.js":37,"./views/Pict-View-FileBrowser-BrowseTree.js":38,"./views/Pict-View-FileBrowser-ListDetail.js":39,"./views/Pict-View-FileBrowser-ListIcons.js":40,"./views/Pict-View-FileBrowser-ViewFileInfo.js":41,"./views/Pict-View-FileBrowser-ViewImage.js":42,"./views/Pict-View-FileBrowser.js":43}],31:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"getFolderTree",value:function(){var t=this.getFileBrowserOption("FolderTreeAddress","AppData.PictFileBrowser.FolderTree"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"flattenTree",value:function(t){var e=t||this.getFolderTree(),n=[],i=function(t,e){for(var o=0;o<t.length;o++){var r=t[o],a=e?e+"/"+r.Name:r.Name;n.push({Name:r.Name,Path:a}),Array.isArray(r.Children)&&r.Children.length>0&&i(r.Children,a)}};return i(e,""),n}},{key:"getChildFolders",value:function(t){var e=this.getFileBrowserOption("ChildFolderCacheAddress","AppData.PictFileBrowser.ChildFolderCache"),n=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},e);if(!n||"object"!==_typeof(n))return null;var i=t||"_root_";return Array.isArray(n[i])?n[i]:null}},{key:"setChildFolders",value:function(t,e){var n=this.getFileBrowserOption("ChildFolderCacheAddress","AppData.PictFileBrowser.ChildFolderCache"),i=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},n);i&&"object"===_typeof(i)||(i={}),i[t||"_root_"]=Array.isArray(e)?e:[],this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,i)}},{key:"searchFiles",value:function(t,e){if(!t||"string"!=typeof t)return[];var n=e||this.getFileList(),i=t.toLowerCase();return n.filter(function(t){return t.Name&&t.Name.toLowerCase().indexOf(i)>=0})}},{key:"navigateToFolder",value:function(t){var e=this.getFileBrowserOption("StateAddresses",{}),n=e.CurrentLocation||"AppData.PictFileBrowser.CurrentLocation",i=e.CurrentFile||"AppData.PictFileBrowser.CurrentFile";this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,t||""),this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},i,null)}},{key:"getFileList",value:function(){var t=this.getFileBrowserOption("FileListAddress","AppData.PictFileBrowser.FileList"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Browse",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":19}],32:[function(t,e,n){var i=t("pict-provider"),o={Primary:"#3D3229",Accent:"#2E7D74",Muted:"#8A7F72",Light:"#F5F0E8",WarmBeige:"#EAE3D8",TealTint:"#E0EDE9",Lavender:"#E8E0F0",AmberTint:"#F0E8D0"},r={folder:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 9H20.8" stroke="'+o.Primary+'" stroke-width="1" opacity="0.3" /></svg>'},"folder-open":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 10.2L5.8 17.8C6 18.4 6.6 18.9 7.2 18.9H19.8L22.1 11.2C22.3 10.6 21.8 10 21.2 10H5.2C4.6 10 4 10.4 3.8 11" stroke="'+o.Primary+'" stroke-width="1.5" fill="'+o.Light+'" stroke-linecap="round" stroke-linejoin="round" opacity="0.7" /></svg>'},file:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-text":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><line x1="8.1" y1="12.8" x2="15.9" y2="12.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="15.8" x2="15.9" y2="15.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="18.8" x2="12.2" y2="18.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-code":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M8.5 13.2L6.8 15.1L8.6 16.8" stroke="'+o.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><path d="M15.5 13.2L17.2 15.1L15.4 16.8" stroke="'+o.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><line x1="12.8" y1="12" x2="11.2" y2="18" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-image":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><rect x="3.1" y="3.2" width="17.8" height="17.7" rx="2" fill="'+o.Lavender+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="8.3" cy="8.7" r="1.8" fill="'+o.Accent+'" /><path d="M20.8 15.2L15.9 10.1L5.2 20.8" stroke="'+o.Primary+'" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-pdf":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="#F0DDDD" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><text x="8.2" y="16.8" font-family="sans-serif" font-weight="700" font-size="6.5" fill="#C04040" letter-spacing="-0.3">PDF</text></svg>'},"file-spreadsheet":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.TealTint+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="7.2" y="11.1" width="9.8" height="7.8" rx="0.5" fill="none" stroke="'+o.Accent+'" stroke-width="1.2" /><line x1="7.2" y1="13.7" x2="17" y2="13.7" stroke="'+o.Accent+'" stroke-width="1" /><line x1="7.2" y1="16.3" x2="17" y2="16.3" stroke="'+o.Accent+'" stroke-width="1" /><line x1="10.9" y1="11.1" x2="10.9" y2="18.9" stroke="'+o.Accent+'" stroke-width="1" /></svg>'},"file-archive":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="8.8" y="11.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /><rect x="8.8" y="14.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /><rect x="8.8" y="17.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /></svg>'},"file-audio":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.AmberTint+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="10.2" cy="16.8" r="2.1" fill="none" stroke="'+o.Accent+'" stroke-width="1.5" /><path d="M12.2 16.8V11.2L16.1 10.1" stroke="'+o.Accent+'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none" /><circle cx="16.1" cy="15.3" r="1.4" fill="none" stroke="'+o.Accent+'" stroke-width="1.2" /></svg>'},"file-video":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Lavender+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M9.8 12.2V18.2L15.8 15.2L9.8 12.2Z" fill="'+o.Accent+'" stroke="'+o.Accent+'" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-web":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="8.9" fill="'+o.TealTint+'" stroke="'+o.Primary+'" stroke-width="1.8" /><ellipse cx="12" cy="12" rx="4.1" ry="8.9" fill="none" stroke="'+o.Primary+'" stroke-width="1.2" /><line x1="3.1" y1="12" x2="20.9" y2="12" stroke="'+o.Primary+'" stroke-width="1" /><path d="M4.8 7.8C7 8.5 9.4 8.9 12 8.9C14.6 8.9 17 8.5 19.2 7.8" stroke="'+o.Primary+'" stroke-width="1" fill="none" /><path d="M4.8 16.2C7 15.5 9.4 15.1 12 15.1C14.6 15.1 17 15.5 19.2 16.2" stroke="'+o.Primary+'" stroke-width="1" fill="none" /></svg>'},"file-config":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="12" cy="15" r="2.8" fill="none" stroke="'+o.Muted+'" stroke-width="1.5" /><line x1="12" y1="11" x2="12" y2="12.2" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="12" y1="17.8" x2="12" y2="19" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="13.2" x2="15.8" y2="12.6" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="17" x2="9.2" y2="16.4" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="16.8" x2="15.8" y2="17.4" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="13" x2="9.2" y2="13.6" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /></svg>'},home:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.1 9.6L12 3.1L20.9 9.6V19.9C20.9 20.5 20.5 21 19.9 20.9H4.1C3.5 21 3 20.5 3.1 19.9V9.6Z" fill="'+o.TealTint+'" stroke="'+o.Accent+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="9.2" y="14.1" width="5.6" height="6.9" rx="0.5" fill="'+o.Accent+'" /></svg>'},"arrow-up":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12.1 19.1V5.1" stroke="'+o.Muted+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M5.2 11.9L12.1 5.1L18.9 11.9" stroke="'+o.Muted+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-right":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M9.2 6.1L14.8 12.1L9.1 17.9" stroke="'+o.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-down":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M6.1 9.2L12.1 14.8L17.9 9.1" stroke="'+o.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},search:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><circle cx="10.8" cy="10.8" r="6.8" stroke="'+o.Primary+'" stroke-width="1.8" /><line x1="15.9" y1="16.1" x2="20.8" y2="20.8" stroke="'+o.Primary+'" stroke-width="2" stroke-linecap="round" /></svg>'},"sort-asc":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+o.Primary+'" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+o.Muted+'" opacity="0.35" /></svg>'},"sort-desc":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+o.Muted+'" opacity="0.35" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+o.Primary+'" /></svg>'}},a={".jpg":"file-image",".jpeg":"file-image",".png":"file-image",".gif":"file-image",".svg":"file-image",".webp":"file-image",".bmp":"file-image",".ico":"file-image",".txt":"file-text",".md":"file-text",".rtf":"file-text",".doc":"file-text",".docx":"file-text",".pdf":"file-pdf",".xls":"file-spreadsheet",".xlsx":"file-spreadsheet",".csv":"file-spreadsheet",".ods":"file-spreadsheet",".js":"file-code",".ts":"file-code",".jsx":"file-code",".tsx":"file-code",".py":"file-code",".rb":"file-code",".java":"file-code",".c":"file-code",".cpp":"file-code",".h":"file-code",".go":"file-code",".rs":"file-code",".swift":"file-code",".kt":"file-code",".scala":"file-code",".sh":"file-code",".bash":"file-code",".zsh":"file-code",".php":"file-code",".lua":"file-code",".r":"file-code",".sql":"file-code",".pl":"file-code",".html":"file-web",".htm":"file-web",".css":"file-web",".scss":"file-web",".less":"file-web",".xml":"file-web",".json":"file-config",".yaml":"file-config",".yml":"file-config",".toml":"file-config",".ini":"file-config",".env":"file-config",".conf":"file-config",".cfg":"file-config",".zip":"file-archive",".tar":"file-archive",".gz":"file-archive",".rar":"file-archive",".7z":"file-archive",".bz2":"file-archive",".xz":"file-archive",".tgz":"file-archive",".mp3":"file-audio",".wav":"file-audio",".flac":"file-audio",".ogg":"file-audio",".aac":"file-audio",".wma":"file-audio",".m4a":"file-audio",".mp4":"file-video",".avi":"file-video",".mov":"file-video",".mkv":"file-video",".webm":"file-video",".wmv":"file-video",".flv":"file-video",".m4v":"file-video"},s=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._icons=Object.assign({},r),o._extensionMap=Object.assign({},a),o._cssInjected=!1,o}return _inherits(e,t),_createClass(e,[{key:"getIcon",value:function(t,e){var n=e||16,i=this._icons[t];return"function"==typeof i?i(n):""}},{key:"getIconForEntry",value:function(t,e){if(!t)return"";if(t.Icon&&"string"==typeof t.Icon&&0===t.Icon.indexOf("<svg"))return t.Icon;var n=e||16;if("folder"===t.Type)return this.getIcon("folder",n);var i=(t.Extension||"").toLowerCase();return i&&this._extensionMap[i]?this.getIcon(this._extensionMap[i],n):this.getIcon("file",n)}},{key:"getUIIcon",value:function(t,e){return this.getIcon(t,e||16)}},{key:"registerIcon",value:function(t,e){return!(!t||"function"!=typeof e)&&(this._icons[t]=e,!0)}},{key:"registerExtension",value:function(t,e){return!(!t||!e)&&(this._extensionMap[t.toLowerCase()]=e,!0)}},{key:"getIconNames",value:function(){return Object.keys(this._icons)}},{key:"getExtensionMap",value:function(){return Object.assign({},this._extensionMap)}},{key:"injectCSS",value:function(){this._cssInjected||this.pict&&this.pict.CSSMap&&(this.pict.CSSMap.addCSS("PictFileBrowserIcons",".pict-fb-svg-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }\n.pict-fb-svg-icon svg { display: block; }\n.pict-fb-tree-icon svg { width: 16px; height: 16px; }\n.pict-fb-detail-icon svg { width: 16px; height: 16px; }\n.pict-fb-icon-graphic svg { width: 36px; height: 36px; }\n.pict-fb-tree-toggle svg { width: 10px; height: 10px; }\n"),this._cssInjected=!0)}}])}(i);e.exports=s,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Icons",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.BuiltInIcons=r,e.exports.ExtensionMap=a,e.exports.Colors=o},{"pict-provider":19}],33:[function(t,e,n){var i=t("pict-provider"),o={"list-only":{Key:"list-only",Label:"List Only",Description:"Full-width file list",Panes:["list"],PaneCount:1,CSSClass:"pict-fb-layout-list-only"},"tree-list":{Key:"tree-list",Label:"Tree + List",Description:"Folder tree on the left, file list on the right",Panes:["browse","list"],PaneCount:2,CSSClass:"pict-fb-layout-tree-list"},"list-detail":{Key:"list-detail",Label:"List + Detail",Description:"File list on top, file details on the bottom",Panes:["list","view"],PaneCount:2,CSSClass:"pict-fb-layout-list-detail"},"tree-detail":{Key:"tree-detail",Label:"Tree + Detail",Description:"Folder tree on the left, file details on the right",Panes:["browse","view"],PaneCount:2,CSSClass:"pict-fb-layout-tree-detail"},"browser-detail":{Key:"browser-detail",Label:"Browser",Description:"Folder tree on the left, file list top-right, details bottom-right",Panes:["browse","list","view"],PaneCount:3,CSSClass:"pict-fb-layout-browser-detail"},"browser-columns":{Key:"browser-columns",Label:"Columns",Description:"Three-column layout: folder tree, file list, and file details side-by-side",Panes:["browse","list","view"],PaneCount:3,CSSClass:"pict-fb-layout-browser-columns"}},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).layouts=JSON.parse(JSON.stringify(o)),r}return _inherits(e,t),_createClass(e,[{key:"getLayouts",value:function(){return this.layouts}},{key:"getLayoutList",value:function(){var t=[];for(var e in this.layouts)t.push(this.layouts[e]);return t.sort(function(t,e){return t.PaneCount!==e.PaneCount?t.PaneCount-e.PaneCount:t.Key.localeCompare(e.Key)}),t}},{key:"getLayout",value:function(t){return this.layouts[t]||null}},{key:"getCurrentLayoutKey",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).Layout||"AppData.PictFileBrowser.Layout";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||"browser-detail"}},{key:"getCurrentLayout",value:function(){var t=this.getCurrentLayoutKey();return this.layouts[t]||this.layouts["browser-detail"]}},{key:"setLayout",value:function(t){if(!this.layouts[t])return!1;var e=this.getFileBrowserOption("StateAddresses",{}).Layout||"AppData.PictFileBrowser.Layout";return this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},e,t),!0}},{key:"isPaneVisible",value:function(t){return this.getCurrentLayout().Panes.indexOf(t)>=0}},{key:"registerLayout",value:function(t){return!(!t||!t.Key)&&(this.layouts[t.Key]=t,!0)}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(i);e.exports=r,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Layout",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.BuiltInLayouts=o},{"pict-provider":19}],34:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i])).sortField="Name",o.sortAscending=!0,o}return _inherits(e,t),_createClass(e,[{key:"getFileList",value:function(){var t=this.getFileBrowserOption("FileListAddress","AppData.PictFileBrowser.FileList"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"getSortedFileList",value:function(t){var e=(t||this.getFileList()).slice(),n=this.sortField,i=this.sortAscending;return e.sort(function(t,e){var o="folder"===t.Type?0:1,r="folder"===e.Type?0:1;if(o!==r)return o-r;var a=t[n],s=e[n];if(null==a&&null==s)return 0;if(null==a)return 1;if(null==s)return-1;var l=0;return l="string"==typeof a?a.localeCompare(s):a<s?-1:a>s?1:0,i?l:-l}),e}},{key:"setSortField",value:function(t){this.sortField===t?this.sortAscending=!this.sortAscending:(this.sortField=t,this.sortAscending=!0)}},{key:"selectFile",value:function(t){var e=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},e,t||null)}},{key:"getSelectedFile",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||null}},{key:"openEntry",value:function(t){if(t)if("folder"===t.Type){var e=this.pict.providers["Pict-FileBrowser-Browse"];if(e){var n=this.getFileBrowserOption("StateAddresses",{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation",i=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},n)||"",o=i?i+"/"+t.Name:t.Name;e.navigateToFolder(o)}}else this.selectFile(t)}},{key:"formatFileSize",value:function(t){return null==t||isNaN(t)?"--":t<1024?t+" B":t<1048576?(t/1024).toFixed(1)+" KB":t<1073741824?(t/1048576).toFixed(1)+" MB":(t/1073741824).toFixed(1)+" GB"}},{key:"formatDate",value:function(t){if(!t)return"--";try{var e=new Date(t);return isNaN(e.getTime())?"--":e.toLocaleDateString()+" "+e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(t){return"--"}}},{key:"getEntryIcon",value:function(t){if(!t)return"";if(t.Icon)return t.Icon;var e=this.pict.providers["Pict-FileBrowser-Icons"];if(e)return e.getIconForEntry(t,16);if("folder"===t.Type)return"📁";switch((t.Extension||"").toLowerCase()){case".jpg":case".jpeg":case".png":case".gif":case".svg":case".webp":case".bmp":return"🖼";case".pdf":default:return"📄";case".doc":case".docx":case".txt":case".md":case".rtf":return"📃";case".xls":case".xlsx":case".csv":return"📊";case".zip":case".tar":case".gz":case".rar":case".7z":return"📦";case".js":case".ts":case".py":case".rb":case".java":case".c":case".cpp":case".go":case".rs":return"💻";case".html":case".css":case".json":case".xml":case".yaml":case".yml":return"🌐";case".mp3":case".wav":case".flac":case".ogg":case".aac":return"🎵";case".mp4":case".avi":case".mov":case".mkv":case".webm":return"🎥"}}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-List",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":19}],35:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"getCurrentFile",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||null}},{key:"isImage",value:function(t){var e=t||this.getCurrentFile();if(!e)return!1;if(e.MimeType&&0===e.MimeType.indexOf("image/"))return!0;var n=(e.Extension||"").toLowerCase();return[".jpg",".jpeg",".png",".gif",".svg",".webp",".bmp",".ico",".tiff",".tif"].indexOf(n)>=0}},{key:"getImageURL",value:function(t){var e=t||this.getCurrentFile();return e&&(e.URL||e.ThumbnailURL)||null}},{key:"getFileTypeDescription",value:function(t){var e=t||this.getCurrentFile();if(!e)return"Unknown";if("folder"===e.Type)return"Folder";var n=(e.Extension||"").toLowerCase();switch(n){case".jpg":case".jpeg":return"JPEG Image";case".png":return"PNG Image";case".gif":return"GIF Image";case".svg":return"SVG Image";case".webp":return"WebP Image";case".bmp":return"Bitmap Image";case".pdf":return"PDF Document";case".doc":case".docx":return"Word Document";case".xls":case".xlsx":return"Excel Spreadsheet";case".csv":return"CSV File";case".txt":return"Text File";case".md":return"Markdown File";case".html":return"HTML File";case".css":return"CSS Stylesheet";case".js":return"JavaScript File";case".ts":return"TypeScript File";case".json":return"JSON File";case".xml":return"XML File";case".yaml":case".yml":return"YAML File";case".py":return"Python Script";case".rb":return"Ruby Script";case".java":return"Java File";case".c":return"C Source File";case".cpp":return"C++ Source File";case".go":return"Go Source File";case".rs":return"Rust Source File";case".zip":return"ZIP Archive";case".tar":return"TAR Archive";case".gz":return"GZip Archive";case".rar":return"RAR Archive";case".mp3":return"MP3 Audio";case".wav":return"WAV Audio";case".mp4":return"MP4 Video";case".avi":return"AVI Video";case".mov":return"QuickTime Video";default:return n?n.substring(1).toUpperCase()+" File":"File"}}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-View",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":19}],36:[function(t,e,n){(function(n){(function(){
58
+ /**
59
+ * Pict FileBrowser Service
60
+ *
61
+ * A Fable service that provides:
62
+ * 1. REST API endpoints for browsing a filesystem path
63
+ * 2. A static web app that uses the pict-section-filebrowser control
64
+ *
65
+ * Usage:
66
+ * const libFable = require('fable');
67
+ * const libOrator = require('orator');
68
+ * const libOratorServiceServerRestify = require('orator-serviceserver-restify');
69
+ * const libPictFileBrowser = require('pict-section-filebrowser');
70
+ *
71
+ * let tmpFable = new libFable({ Product: 'MyApp', APIServerPort: 8080 });
72
+ * tmpFable.serviceManager.addServiceType('OratorServiceServer', libOratorServiceServerRestify);
73
+ * tmpFable.serviceManager.addServiceType('Orator', libOrator);
74
+ *
75
+ * let tmpOrator = tmpFable.serviceManager.instantiateServiceProvider('Orator');
76
+ * let tmpFileBrowser = new libPictFileBrowser.FileBrowserService(tmpFable,
77
+ * { BasePath: '/path/to/browse', APIRoutePrefix: '/api/filebrowser' });
78
+ *
79
+ * tmpOrator.startService(() =>
80
+ * {
81
+ * tmpFileBrowser.connectRoutes();
82
+ * console.log('File browser ready at http://localhost:8080/filebrowser/');
83
+ * });
84
+ *
85
+ * @license MIT
86
+ * @author Steven Velozo <steven@velozo.com>
87
+ */
88
+ var i=t("fable-serviceproviderbase"),o=t("path"),r=t("fs"),a=t("url"),s={BasePath:".",APIRoutePrefix:"/api/filebrowser",WebAppRoute:"/filebrowser/*",WebAppRouteStrip:"/filebrowser/",ServeWebApp:!0,IncludeHiddenFiles:!1,MaxTreeDepth:2},l=function(t){function e(t,n,i){var r;for(var a in _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).serviceType="PictFileBrowserService",s)a in r.options||(r.options[a]=s[a]);return r.basePath=o.resolve(r.options.BasePath),r}return _inherits(e,t),_createClass(e,[{key:"connectRoutes",value:function(){var t=this;if(!this.fable.Orator||!this.fable.Orator.serviceServer)return this.log.error("PictFileBrowserService: Orator service server is not available. Initialize Orator first."),!1;var e=this.fable.Orator.serviceServer,i=this.options.APIRoutePrefix;if(e.get(i+"/list",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listDirectory(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/tree",function(e,n,i){var o=t.parseQueryParams(e),r=t.options.MaxTreeDepth;o.depth&&(r=parseInt(o.depth)||t.options.MaxTreeDepth),t.buildFolderTree("",r,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/info",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.getFileInfo(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/children",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listChildFolders(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),this.options.ServeWebApp){var r=o.join(n,"..","www");this.fable.Orator.addStaticRoute(r,"index.html",this.options.WebAppRoute,this.options.WebAppRouteStrip)}return this.log.info("PictFileBrowserService: Routes connected. Browsing path: "+this.basePath),!0}},{key:"parseQueryParams",value:function(t){return t.query&&"object"===_typeof(t.query)?t.query:a.parse(t.url,!0).query||{}}},{key:"resolveSafePath",value:function(t){var e=(t||"").replace(/\.\./g,"").replace(/\/\//g,"/"),n=o.resolve(this.basePath,e);return 0!==n.indexOf(this.basePath)?null:n}},{key:"listDirectory",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);var l=[],c=s.length;if(0===c)return e(null,l);for(var d=0;d<s.length;d++){var p=s[d],u=p.name;if(n.options.IncludeHiddenFiles||"."!==u.charAt(0)){var h=o.join(i,u),f=t?t+"/"+u:u;r.stat(h,function(t,n,i){return function(r,a){var s={Name:t,Path:n,Type:i?"folder":"file"};if(a&&!r&&(s.Size=a.size,s.Modified=a.mtime,s.Created=a.birthtime,i||(s.Extension=o.extname(t))),l.push(s),0===--c)return e(null,l)}}(u,f,p.isDirectory()))}else if(0===--c)return e(null,l)}})}},{key:"listChildFolders",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);for(var l=[],c=0;c<s.length;c++)if(s[c].isDirectory()){var d=s[c].name;(n.options.IncludeHiddenFiles||"."!==d.charAt(0))&&l.push(d)}if(l.sort(function(t,e){return t.localeCompare(e)}),0===l.length)return e(null,[]);for(var p=[],u=l.length,h=0;h<l.length;h++){var f=l[h],v=o.join(i,f),m=t?t+"/"+f:f;r.readdir(v,{withFileTypes:!0},function(t,i){return function(o,r){var a=!1;if(!o&&r)for(var s=0;s<r.length;s++)if(r[s].isDirectory()){var l=r[s].name;if(n.options.IncludeHiddenFiles||"."!==l.charAt(0)){a=!0;break}}if(p.push({Name:t,Path:i,HasChildren:a}),0===--u)return p.sort(function(t,e){return t.Name.localeCompare(e.Name)}),e(null,p)}}(f,m))}})}},{key:"buildFolderTree",value:function(t,e,n){var i=this.resolveSafePath(t);if(!i)return n(new Error("Invalid path"));this._buildTreeRecursive(i,t,e,0,n)}},{key:"_buildTreeRecursive",value:function(t,e,n,i,a){var s=this;if(n>0&&i>=n)return a(null,[]);r.readdir(t,{withFileTypes:!0},function(r,l){if(r)return a(null,[]);for(var c=[],d=0;d<l.length;d++)if(l[d].isDirectory()){var p=l[d].name;if(!s.options.IncludeHiddenFiles&&"."===p.charAt(0))continue;c.push(p)}if(0===c.length)return a(null,[]);for(var u=[],h=c.length,f=0;f<c.length;f++){var v=c[f],m=o.join(t,v),g=e?e+"/"+v:v;s._buildTreeRecursive(m,g,n,i+1,function(t,e){return function(n,i){if(u.push({Name:t,Path:e,Children:i||[]}),0===--h)return u.sort(function(t,e){return t.Name.localeCompare(e.Name)}),a(null,u)}}(v,g))}})}},{key:"getFileInfo",value:function(t,e){var n=this.resolveSafePath(t);if(!n)return e(new Error("Invalid path"));r.stat(n,function(i,r){if(i)return"ENOENT"===i.code?e(new Error("Path not found")):e(i);var a=o.basename(n),s={Name:a,Path:t||a,Type:r.isDirectory()?"folder":"file",Size:r.size,Modified:r.mtime,Created:r.birthtime};return r.isDirectory()||(s.Extension=o.extname(a)),e(null,s)})}}])}(i);e.exports=l,e.exports.default_configuration=s}).call(this)}).call(this,"/../retold-content-system/node_modules/pict-section-filebrowser/source/services")},{"fable-serviceproviderbase":2,fs:67,path:106,url:137}],37:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-BrowseSearch",DefaultRenderable:"BrowseSearch-Container",DefaultDestinationAddress:"#Pict-FileBrowser-BrowsePane",AutoRender:!1,Templates:[{Hash:"FileBrowser-BrowseSearch-Container-Template",Template:'\n<div class="pict-fb-search">\n\t<input type="text" class="pict-fb-search-input"\n\t\tid="Pict-FileBrowser-SearchInput"\n\t\tplaceholder="Search files..."\n\t\toninput="pict.views[\'{~D:Record.ViewHash~}\'].onSearchInput(this.value)" />\n\t<div class="pict-fb-search-results" id="Pict-FileBrowser-SearchResults"></div>\n</div>\n'},{Hash:"FileBrowser-BrowseSearch-Result-Template",Template:'\n<div class="pict-fb-search-result" onclick="{~D:Record.ClickHandler~}">\n\t<span class="pict-fb-search-result-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-search-result-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-search-result-path">{~D:Record.Path~}</span>\n</div>\n'},{Hash:"FileBrowser-BrowseSearch-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"BrowseSearch-Container",TemplateHash:"FileBrowser-BrowseSearch-Container-Template",DestinationAddress:"#Pict-FileBrowser-BrowsePane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i])).lastQuery="",r.debounceTimer=null,r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){var n=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Container-Template",{ViewHash:this.Hash});return this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-BrowsePane",n),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onSearchInput",value:function(t){var e=this;this.lastQuery=t||"",this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){e.performSearch(e.lastQuery)},150)}},{key:"performSearch",value:function(t){var e="#Pict-FileBrowser-SearchResults";if(!t||t.length<1)this.pict.ContentAssignment.assignContent(e,"");else{var n=this.pict.providers["Pict-FileBrowser-Browse"];if(n){var i=n.searchFiles(t),o=this.pict.providers["Pict-FileBrowser-List"];if(0!==i.length){for(var r="",a=0;a<i.length&&a<50;a++){var s=i[a],l=o?o.getEntryIcon(s):"📄",c=s.Path||"",d={Name:s.Name,Path:c,Icon:l,ClickHandler:"pict.views['"+this.Hash+"'].selectResult("+a+")"};r+=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Result-Template",d)}this.pict.ContentAssignment.assignContent(e,r),this._lastResults=i}else{var p=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Empty-Template",{Message:"No results found"});this.pict.ContentAssignment.assignContent(e,p)}}}}},{key:"selectResult",value:function(t){if(this._lastResults&&!(t>=this._lastResults.length)){var e=this._lastResults[t],n=this.pict.providers["Pict-FileBrowser-List"];n&&n.openEntry(e)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":52}],38:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-BrowseTree",DefaultRenderable:"BrowseTree-Container",DefaultDestinationAddress:"#Pict-FileBrowser-BrowsePane",AutoRender:!1,Templates:[{Hash:"FileBrowser-BrowseTree-Container-Template",Template:'<div class="pict-fb-tree" id="Pict-FileBrowser-Tree"></div>'},{Hash:"FileBrowser-BrowseTree-Node-Template",Template:'\n<div class="pict-fb-tree-node{~D:Record.SelectedClass~}" style="padding-left: {~D:Record.Indent~}px;" data-path="{~D:Record.Path~}" onclick="{~D:Record.ClickHandler~}">\n\t<span class="{~D:Record.ToggleClass~}" onclick="{~D:Record.ToggleHandler~}">{~D:Record.ToggleIcon~}</span>\n\t<span class="pict-fb-tree-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-tree-label">{~D:Record.Name~}</span>\n</div>\n<div class="pict-fb-tree-children{~D:Record.ExpandedClass~}" id="Pict-FB-TreeChildren-{~D:Record.NodeID~}">\n{~D:Record.ChildrenHTML~}\n</div>\n'}],Renderables:[{RenderableHash:"BrowseTree-Container",TemplateHash:"FileBrowser-BrowseTree-Container-Template",DestinationAddress:"#Pict-FileBrowser-BrowsePane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i])).expandedPaths={},r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildTree(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildTree",value:function(){if(this.pict.providers["Pict-FileBrowser-Browse"]){var t=this.getCurrentLocation(),e=this.renderTreeLevel("",0,t);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-Tree",e)}}},{key:"renderTreeLevel",value:function(t,e,n){var i=this.pict.providers["Pict-FileBrowser-Browse"];if(!i)return"";var o=i.getChildFolders(t);if(!o)return this.expandedPaths[t]?'<div class="pict-fb-tree-loading" style="padding-left: '+(24+16*e)+'px;">Loading...</div>':"";for(var r="",a=0;a<o.length;a++){var s=o[a],l=s.Path,c=l.replace(/[^a-zA-Z0-9]/g,"_"),d=!!this.expandedPaths[l],p=l===n,u=i.getChildFolders(l),h=s.HasChildren||u&&u.length>0,f="";d&&(f=this.renderTreeLevel(l,e+1,n));var v=this.pict.providers["Pict-FileBrowser-Icons"],m=v?v.getIcon("folder",16):"📁",g="";h&&(g=v?d?v.getIcon("chevron-down",10):v.getIcon("chevron-right",10):d?"▾":"▸");var y={Name:s.Name,Path:l,NodeID:c,Indent:8+16*e,Icon:m,ToggleIcon:g,ToggleClass:h?"pict-fb-tree-toggle":"pict-fb-tree-toggle-empty",ToggleHandler:h?"event.stopPropagation(); pict.views['"+this.Hash+"'].toggleNode('"+l+"')":"",ClickHandler:"pict.views['"+this.Hash+"'].selectFolder('"+l+"')",SelectedClass:p?" selected":"",ExpandedClass:d?" expanded":"",ChildrenHTML:f};r+=this.pict.parseTemplateByHash("FileBrowser-BrowseTree-Node-Template",y)}return r}},{key:"toggleNode",value:function(t){if(this.expandedPaths[t]=!this.expandedPaths[t],this.expandedPaths[t]){var e=this.pict.providers["Pict-FileBrowser-Browse"];if(e)e.getChildFolders(t)||"function"==typeof this.onRequestChildren&&this.onRequestChildren(t)}this.rebuildTree()}},{key:"onRequestChildren",value:function(t){}},{key:"selectFolder",value:function(t){this.expandedPaths[t]=!0;var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&(e.getChildFolders(t)||"function"==typeof this.onRequestChildren&&this.onRequestChildren(t),e.navigateToFolder(t));this.rebuildTree()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":52}],39:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ListDetail",DefaultRenderable:"ListDetail-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ListPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ListDetail-Container-Template",Template:'\n<div class="pict-fb-detail" id="Pict-FileBrowser-DetailList">\n\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-Breadcrumb"></div>\n\t<div class="pict-fb-detail-header">\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-name" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Name\')">Name</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-size" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Size\')">Size</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-modified" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Modified\')">Modified</div>\n\t</div>\n\t<div id="Pict-FileBrowser-DetailRows"></div>\n</div>\n'},{Hash:"FileBrowser-ListDetail-Row-Template",Template:'\n<div class="pict-fb-detail-row{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<span class="pict-fb-detail-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-detail-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-detail-size">{~D:Record.SizeFormatted~}</span>\n\t<span class="pict-fb-detail-modified">{~D:Record.ModifiedFormatted~}</span>\n</div>\n'},{Hash:"FileBrowser-ListDetail-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'},{Hash:"FileBrowser-Breadcrumb-Segment-Template",Template:'<span class="pict-fb-breadcrumb-segment" onclick="{~D:Record.ClickHandler~}">{~D:Record.Label~}</span>'},{Hash:"FileBrowser-Breadcrumb-Separator-Template",Template:'<span class="pict-fb-breadcrumb-separator">/</span>'},{Hash:"FileBrowser-Breadcrumb-Current-Template",Template:'<span class="pict-fb-breadcrumb-current">{~D:Record.Label~}</span>'}],Renderables:[{RenderableHash:"ListDetail-Container",TemplateHash:"FileBrowser-ListDetail-Container-Template",DestinationAddress:"#Pict-FileBrowser-ListPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i]))._cachedFileList=[],r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){var n=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Container-Template",{ViewHash:this.Hash});return this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ListPane",n),this.rebuildList(),this.rebuildBreadcrumb(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildList",value:function(){var t=this.pict.providers["Pict-FileBrowser-List"];if(t){var e=t.getSortedFileList();this._cachedFileList=e;var n=t.getSelectedFile();if(0!==e.length){for(var i="",o=0;o<e.length;o++){var r=e[o],a=n&&n.Name===r.Name&&n.Path===r.Path,s={Index:o,Name:r.Name,Icon:t.getEntryIcon(r),SizeFormatted:"folder"===r.Type?"--":t.formatFileSize(r.Size),ModifiedFormatted:t.formatDate(r.Modified),SelectedClass:a?" selected":"",ClickHandler:"pict.views['"+this.Hash+"'].selectEntry("+o+")",DblClickHandler:"pict.views['"+this.Hash+"'].openEntry("+o+")"};i+=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Row-Template",s)}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",i)}else{var l=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Empty-Template",{Message:"This folder is empty"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",l)}}}},{key:"rebuildBreadcrumb",value:function(){var t=this.getCurrentLocation(),e="",n=this.pict.providers["Pict-FileBrowser-Icons"],i=n?n.getIcon("home",16):"🏠";if(e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:i,ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('')"}),t)for(var o=t.split("/"),r="",a=0;a<o.length;a++)if(r=r?r+"/"+o[a]:o[a],e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Separator-Template",{}),a===o.length-1)e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Current-Template",{Label:o[a]});else{var s=r;e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:o[a],ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('"+s+"')"})}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-Breadcrumb",e)}},{key:"selectEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.selectFile(this._cachedFileList[t]),this.rebuildList()}}},{key:"openEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.openEntry(this._cachedFileList[t]),this.rebuildList(),this.rebuildBreadcrumb()}}},{key:"sortBy",value:function(t){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.setSortField(t),this.rebuildList()}},{key:"navigateToPath",value:function(t){var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&e.navigateToFolder(t),this.rebuildList(),this.rebuildBreadcrumb()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":52}],40:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ListIcons",DefaultRenderable:"ListIcons-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ListPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ListIcons-Container-Template",Template:'\n<div id="Pict-FileBrowser-IconList">\n\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-IconBreadcrumb"></div>\n\t<div class="pict-fb-icons" id="Pict-FileBrowser-IconGrid"></div>\n</div>\n'},{Hash:"FileBrowser-ListIcons-Item-Template",Template:'\n<div class="pict-fb-icon-item{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<div class="pict-fb-icon-graphic">{~D:Record.Icon~}</div>\n\t<div class="pict-fb-icon-label">{~D:Record.Name~}</div>\n</div>\n'},{Hash:"FileBrowser-ListIcons-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"ListIcons-Container",TemplateHash:"FileBrowser-ListIcons-Container-Template",DestinationAddress:"#Pict-FileBrowser-ListPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i]))._cachedFileList=[],r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildGrid(),this.rebuildBreadcrumb(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildGrid",value:function(){var t=this.pict.providers["Pict-FileBrowser-List"];if(t){var e=t.getSortedFileList();this._cachedFileList=e;var n=t.getSelectedFile();if(0!==e.length){for(var i="",o=0;o<e.length;o++){var r=e[o],a=n&&n.Name===r.Name&&n.Path===r.Path,s={Index:o,Name:r.Name,Icon:t.getEntryIcon(r),SelectedClass:a?" selected":"",ClickHandler:"pict.views['"+this.Hash+"'].selectEntry("+o+")",DblClickHandler:"pict.views['"+this.Hash+"'].openEntry("+o+")"};i+=this.pict.parseTemplateByHash("FileBrowser-ListIcons-Item-Template",s)}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconGrid",i)}else{var l=this.pict.parseTemplateByHash("FileBrowser-ListIcons-Empty-Template",{Message:"This folder is empty"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconGrid",l)}}}},{key:"rebuildBreadcrumb",value:function(){var t=this.getCurrentLocation(),e="";if(e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:"🏠",ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('')"}),t)for(var n=t.split("/"),i="",o=0;o<n.length;o++)if(i=i?i+"/"+n[o]:n[o],e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Separator-Template",{}),o===n.length-1)e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Current-Template",{Label:n[o]});else{var r=i;e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:n[o],ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('"+r+"')"})}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconBreadcrumb",e)}},{key:"selectEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.selectFile(this._cachedFileList[t]),this.rebuildGrid()}}},{key:"openEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.openEntry(this._cachedFileList[t]),this.rebuildGrid(),this.rebuildBreadcrumb()}}},{key:"navigateToPath",value:function(t){var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&e.navigateToFolder(t),this.rebuildGrid(),this.rebuildBreadcrumb()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":52}],41:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ViewFileInfo",DefaultRenderable:"ViewFileInfo-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ViewPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ViewFileInfo-Container-Template",Template:'<div class="pict-fb-fileinfo" id="Pict-FileBrowser-FileInfo"></div>'},{Hash:"FileBrowser-ViewFileInfo-Detail-Template",Template:'\n<div class="pict-fb-fileinfo-title">{~D:Record.Name~}</div>\n<table class="pict-fb-fileinfo-table">\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Type</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.TypeDescription~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Size</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.SizeFormatted~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Modified</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.ModifiedFormatted~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Extension</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.Extension~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Path</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.Path~}</td>\n\t</tr>\n</table>\n'},{Hash:"FileBrowser-ViewFileInfo-Empty-Template",Template:'<div class="pict-fb-fileinfo-none">No file selected</div>'}],Renderables:[{RenderableHash:"ViewFileInfo-Container",TemplateHash:"FileBrowser-ViewFileInfo-Container-Template",DestinationAddress:"#Pict-FileBrowser-ViewPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,Object.assign({},o,n),i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildFileInfo(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildFileInfo",value:function(){var t=this.pict.providers["Pict-FileBrowser-View"],e=this.pict.providers["Pict-FileBrowser-List"],n=t?t.getCurrentFile():null;if(n){var i={Name:n.Name||"Unknown",TypeDescription:t?t.getFileTypeDescription(n):"File",SizeFormatted:e?e.formatFileSize(n.Size):n.Size||"--",ModifiedFormatted:e?e.formatDate(n.Modified):n.Modified||"--",Extension:n.Extension||"--",Path:n.Path||"--"},o=this.pict.parseTemplateByHash("FileBrowser-ViewFileInfo-Detail-Template",i);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-FileInfo",o)}else{var r=this.pict.parseTemplateByHash("FileBrowser-ViewFileInfo-Empty-Template",{});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-FileInfo",r)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":52}],42:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ViewImage",DefaultRenderable:"ViewImage-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ViewPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ViewImage-Container-Template",Template:'<div class="pict-fb-image-viewer" id="Pict-FileBrowser-ImageViewer"></div>'},{Hash:"FileBrowser-ViewImage-Display-Template",Template:'<img src="{~D:Record.ImageURL~}" alt="{~D:Record.Name~}" />'},{Hash:"FileBrowser-ViewImage-NoImage-Template",Template:'<div class="pict-fb-image-viewer-none">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"ViewImage-Container",TemplateHash:"FileBrowser-ViewImage-Container-Template",DestinationAddress:"#Pict-FileBrowser-ViewPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,Object.assign({},o,n),i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildImageView(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildImageView",value:function(){var t=this.pict.providers["Pict-FileBrowser-View"],e=t?t.getCurrentFile():null;if(e){if(!!t&&t.isImage(e)){var n=t?t.getImageURL(e):null;if(n){var i=this.pict.parseTemplateByHash("FileBrowser-ViewImage-Display-Template",{ImageURL:n,Name:e.Name||"Image"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",i)}else{var o=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"No image URL available"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",o)}}else{var r=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"Selected file is not an image"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",r)}}else{var a=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"No file selected"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",a)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":52}],43:[function(t,e,n){var i=t("pict-view"),o=t("../Pict-Section-FileBrowser-DefaultConfiguration.js"),r=t("../providers/Pict-Provider-FileBrowserBrowse.js"),a=t("../providers/Pict-Provider-FileBrowserList.js"),s=t("../providers/Pict-Provider-FileBrowserView.js"),l=t("../providers/Pict-Provider-FileBrowserLayout.js"),c=t("../providers/Pict-Provider-FileBrowserIcons.js"),d=function(t){function e(t,n,i){var d;return _classCallCheck(this,e),(d=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(o)),n),i])).pict.providers["Pict-FileBrowser-Browse"]||d.pict.addProvider("Pict-FileBrowser-Browse",r.default_configuration,r),d.pict.providers["Pict-FileBrowser-List"]||d.pict.addProvider("Pict-FileBrowser-List",a.default_configuration,a),d.pict.providers["Pict-FileBrowser-View"]||d.pict.addProvider("Pict-FileBrowser-View",s.default_configuration,s),d.pict.providers["Pict-FileBrowser-Layout"]||d.pict.addProvider("Pict-FileBrowser-Layout",l.default_configuration,l),d.pict.providers["Pict-FileBrowser-Icons"]||d.pict.addProvider("Pict-FileBrowser-Icons",c.default_configuration,c),d.ensureDefaultState(),d}return _inherits(e,t),_createClass(e,[{key:"ensureDefaultState",value:function(){var t=this.options.DefaultState||{},e=this.options.StateAddresses||{},n={AppData:this.pict.AppData,Pict:this.pict};for(var i in this.pict.AppData.PictFileBrowser||(this.pict.AppData.PictFileBrowser={}),e){var o=e[i],r=this.pict.manifest.getValueByHash(n,o);if(null==r){var a=t[i];void 0!==a&&this.pict.manifest.setValueByHash(n,o,a)}}this.pict.AppData.PictFileBrowser.FileList||(this.pict.AppData.PictFileBrowser.FileList=[]),this.pict.AppData.PictFileBrowser.FolderTree||(this.pict.AppData.PictFileBrowser.FolderTree=[])}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"getState",value:function(t){var e=(this.options.StateAddresses||{})[t];if(e)return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},e)}},{key:"setState",value:function(t,e){var n=(this.options.StateAddresses||{})[t];n&&this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,e)}}])}(i);e.exports=d,e.exports.default_configuration=o},{"../Pict-Section-FileBrowser-DefaultConfiguration.js":29,"../providers/Pict-Provider-FileBrowserBrowse.js":31,"../providers/Pict-Provider-FileBrowserIcons.js":32,"../providers/Pict-Provider-FileBrowserLayout.js":33,"../providers/Pict-Provider-FileBrowserList.js":34,"../providers/Pict-Provider-FileBrowserView.js":35,"pict-view":52}],44:[function(t,e,n){e.exports.attach=function(t){t._createEditorInContainer=function(e,n,i){var o=t._codeMirrorModules,r=[];o.extensions&&Array.isArray(o.extensions)&&(r=r.concat(o.extensions)),r.push(o.EditorView.updateListener.of(function(e){e.docChanged&&t._onSegmentContentChange(n,e.state.doc.toString()),e.focusChanged&&(e.view.hasFocus?(t._setActiveSegment(n),t._updateSidebarPosition(n)):setTimeout(function(){if(t._activeSegmentIndex===n){var e=document.getElementById("PictMDE-Segment-".concat(n));e&&!e.contains(document.activeElement)&&(t._clearActiveSegment(n),t._resetSidebarPosition(n))}},100)),e.selectionSet&&e.view.hasFocus&&t._updateSidebarPosition(n)})),r.push(o.EditorView.domEventHandlers({keydown:function(e,i){return(e.ctrlKey||e.metaKey)&&"b"===e.key?(e.preventDefault(),t.applyFormatting(n,"bold"),!0):(e.ctrlKey||e.metaKey)&&"i"===e.key?(e.preventDefault(),t.applyFormatting(n,"italic"),!0):(e.ctrlKey||e.metaKey)&&"e"===e.key?(e.preventDefault(),t.applyFormatting(n,"code"),!0):void 0},paste:function(e,i){var o=e.clipboardData&&e.clipboardData.items;if(!o)return!1;for(var r=0;r<o.length;r++)if(o[r].type.startsWith("image/")){e.preventDefault();var a=o[r].getAsFile();return a&&t._processImageFile(a,n),!0}return!1}}));var a=t._buildDataURICollapseExtension();a&&r.push(a),t.options.ReadOnly&&(r.push(o.EditorState.readOnly.of(!0)),r.push(o.EditorView.editable.of(!1))),r=t.customConfigureExtensions(r,n);var s=o.EditorState.create({doc:i||"",extensions:r}),l=new o.EditorView({state:s,parent:e});t._segmentEditors[n]=l},t._buildDataURICollapseExtension=function(){var e=t._codeMirrorModules;if(!(e&&e.Decoration&&e.ViewPlugin&&e.WidgetType))return null;var n=e.Decoration,i=e.ViewPlugin,o=e.WidgetType,r=function(t){function e(t){var n;return _classCallCheck(this,e),(n=_callSuper(this,e)).label=t,n}return _inherits(e,t),_createClass(e,[{key:"toDOM",value:function(){var t=document.createElement("span");return t.className="pict-mde-data-uri-collapsed",t.textContent=this.label,t.title="Data URI (click to expand in image preview below)",t}},{key:"eq",value:function(t){return this.label===t.label}}])}(o);function a(t){var e,i=[],o=t.state.doc,a=_createForOfIteratorHelper(t.visibleRanges);try{for(a.s();!(e=a.n()).done;)for(var s=e.value,l=s.from,c=s.to,d=o.sliceString(l,c),p=/!\[[^\]]*\]\(data:([^;]+);base64,/g,u=void 0;null!==(u=p.exec(d));){for(var h=l+u.index+u[0].length,f=-1,v=h,m=o.length,g=Math.min(m,v+5242880),y=v;y<g;y+=4096){var b=Math.min(y+4096,g),w=o.sliceString(y,b).indexOf(")");if(w>=0){f=y+w;break}}if(!(f<0)){var C=f-h;if(!(C<200)){var x=Math.round(.75*C),A=void 0;A=x>=1048576?(x/1048576).toFixed(1)+"MB":x>=1024?Math.round(x/1024)+"KB":x+"B";u[1];var k="…".concat(A,")"),D=n.replace({widget:new r(k)});i.push(D.range(h,f+1))}}}}catch(t){a.e(t)}finally{a.f()}return n.set(i,!0)}return i.fromClass(function(){return _createClass(function t(e){_classCallCheck(this,t),this.decorations=a(e)},[{key:"update",value:function(t){(t.docChanged||t.viewportChanged)&&(this.decorations=a(t.view))}}])}(),{decorations:function(t){return t.decorations}})}}},{}],45:[function(t,e,n){e.exports.attach=function(t){t._wireSegmentDragEvents=function(e,n){var i=e.querySelector(".pict-mde-drag-handle");i&&(i.addEventListener("dragstart",function(i){t._dragSourceIndex=n,i.dataTransfer.effectAllowed="move",i.dataTransfer.setData("text/plain",String(n));var o=t._getContainerElement();o&&o.classList.add("pict-mde-dragging"),setTimeout(function(){e.style.opacity="0.4"},0)}),i.addEventListener("dragend",function(){e.style.opacity="",t._dragSourceIndex=-1,t._clearAllDropIndicators();var n=t._getContainerElement();n&&n.classList.remove("pict-mde-dragging")}),e.addEventListener("dragover",function(n){n.preventDefault(),n.dataTransfer.dropEffect="move",t._clearAllDropIndicators();var i=e.getBoundingClientRect(),o=i.top+i.height/2;n.clientY<o?e.classList.add("pict-mde-drag-over-top"):e.classList.add("pict-mde-drag-over-bottom")}),e.addEventListener("dragleave",function(t){e.contains(t.relatedTarget)||(e.classList.remove("pict-mde-drag-over-top"),e.classList.remove("pict-mde-drag-over-bottom"))}),e.addEventListener("drop",function(i){i.preventDefault();var o=e.classList.contains("pict-mde-drag-over-bottom");t._clearAllDropIndicators();var r=t._dragSourceIndex;r<0||r===n||t._reorderSegment(r,n,o)}))},t._clearAllDropIndicators=function(){var e=t._getContainerElement();if(e)for(var n=e.querySelectorAll(".pict-mde-segment"),i=0;i<n.length;i++)n[i].classList.remove("pict-mde-drag-over-top"),n[i].classList.remove("pict-mde-drag-over-bottom")},t._reorderSegment=function(e,n,i){var o=t._getLogicalIndex(e),r=t._getLogicalIndex(n);if(o<0||r<0)t.log.warn("PICT-MarkdownEditor _reorderSegment: could not resolve logical indices (from=".concat(o,", to=").concat(r,")."));else if(o!==r){t._marshalAllEditorsToData();var a=t._getSegmentsFromData();if(a&&!(a.length<2)){var s=i?r+1:r;if(o<s&&s--,s!==o){var l=a.splice(o,1)[0];a.splice(s,0,l),t._setSegmentsToData(a),t._reorderHiddenPreviewState(o,s),t._buildEditorUI()}}}},t._reorderHiddenPreviewState=function(e,n){if(e!==n){var i=Object.keys(t._hiddenPreviewSegments).map(function(t){return parseInt(t,10)});if(0!==i.length){for(var o=Math.max.apply(Math,_toConsumableArray(i).concat([e,n])),r=[],a=0;a<=o;a++)r.push(!!t._hiddenPreviewSegments[a]);var s=r.splice(e,1)[0];r.splice(n,0,s),t._hiddenPreviewSegments={};for(var l=0;l<r.length;l++)r[l]&&(t._hiddenPreviewSegments[l]=!0)}}},t._swapHiddenPreviewState=function(e,n){var i=!!t._hiddenPreviewSegments[e];!!t._hiddenPreviewSegments[n]?t._hiddenPreviewSegments[e]=!0:delete t._hiddenPreviewSegments[e],i?t._hiddenPreviewSegments[n]=!0:delete t._hiddenPreviewSegments[n]},t._setActiveSegment=function(e){if(t._activeSegmentIndex>=0&&t._activeSegmentIndex!==e){var n=document.getElementById("PictMDE-Segment-".concat(t._activeSegmentIndex));n&&n.classList.remove("pict-mde-active")}t._activeSegmentIndex=e;var i=document.getElementById("PictMDE-Segment-".concat(e));i&&i.classList.add("pict-mde-active")},t._clearActiveSegment=function(e){t._activeSegmentIndex===e&&(t._activeSegmentIndex=-1);var n=document.getElementById("PictMDE-Segment-".concat(e));n&&n.classList.remove("pict-mde-active"),t._resetSidebarPosition(e)},t._updateSidebarPosition=function(e){var n=document.getElementById("PictMDE-Segment-".concat(e));if(n){var i=n.querySelector(".pict-mde-quadrant-tr");if(i){var o=t._segmentEditors[e];if(o){var r=o.state.selection.main.head,a=o.coordsAtPos(r);if(a){var s=n.getBoundingClientRect(),l=a.top-s.top,c=i.offsetHeight||0,d=n.offsetHeight||0,p=Math.max(0,d-c);l=Math.max(0,Math.min(l,p)),i.classList.add("pict-mde-sidebar-at-cursor"),i.style.setProperty("--pict-mde-sidebar-top","".concat(l,"px"))}else t._resetSidebarPosition(e)}}}},t._resetSidebarPosition=function(t){var e=document.getElementById("PictMDE-Segment-".concat(t));if(e){var n=e.querySelector(".pict-mde-quadrant-tr");n&&(n.classList.remove("pict-mde-sidebar-at-cursor"),n.style.removeProperty("--pict-mde-sidebar-top"))}}}},{}],46:[function(t,e,n){var i={bold:{wrap:"**"},italic:{wrap:"*"},code:{wrap:"`"},heading:{prefix:"# "},link:{before:"[",after:"](url)"}};e.exports.attach=function(t){t.applyFormatting=function(e,n){var o=t._segmentEditors[e];if(o){var r=i[n];if(r){var a,s,l=o.state,c=l.selection.main,d=c.from,p=c.to,u=d!==p,h=u?l.sliceDoc(d,p):"";if(r.wrap){var f=r.wrap;if(u){var v=l.sliceDoc(Math.max(0,d-f.length),d),m=l.sliceDoc(p,Math.min(l.doc.length,p+f.length));if(v===f&&m===f)return a=[{from:d-f.length,to:d,insert:""},{from:p,to:p+f.length,insert:""}],s=d-f.length,void o.dispatch({changes:a,selection:{anchor:s,head:s+h.length}});a={from:d,to:p,insert:f+h+f},s=d+f.length,o.dispatch({changes:a,selection:{anchor:s,head:s+h.length}})}else{a={from:d,insert:f+f},s=d+f.length,o.dispatch({changes:a,selection:{anchor:s}})}}else if(r.prefix){var g=l.doc.lineAt(d);a=g.text.startsWith(r.prefix)?{from:g.from,to:g.from+r.prefix.length,insert:""}:{from:g.from,insert:r.prefix},o.dispatch({changes:a})}else if(r.before&&r.after){if(u)a={from:d,to:p,insert:r.before+h+r.after},s=d+r.before.length+h.length+2,o.dispatch({changes:a,selection:{anchor:s,head:s+3}});else a={from:d,insert:r.before+r.after},s=d+r.before.length,o.dispatch({changes:a,selection:{anchor:s}})}o.focus()}else t.log.warn('PICT-MarkdownEditor applyFormatting: unknown format type "'.concat(n,'".'))}else t.log.warn("PICT-MarkdownEditor applyFormatting: no editor for segment ".concat(e,"."))}}},{}],47:[function(t,e,n){e.exports.attach=function(t){t.openImagePicker=function(e){var n=document.getElementById("PictMDE-ImageInput-".concat(e));n?(n.onchange=function(){n.files&&n.files.length>0&&t._processImageFile(n.files[0],e),n.value=""},n.click()):t.log.warn("PICT-MarkdownEditor openImagePicker: file input not found for segment ".concat(e,"."))},t._processImageFile=function(e,n){if(e&&e.type&&e.type.startsWith("image/")){var i=e.name?e.name.replace(/\.[^.]+$/,""):"image";if(!t.onImageUpload(e,n,function(e,o){e?t.log.error("PICT-MarkdownEditor image upload error: ".concat(e)):o&&t._insertImageMarkdown(n,o,i)}))if("undefined"!=typeof FileReader){var o=new FileReader;o.onload=function(){t._insertImageMarkdown(n,o.result,i)},o.onerror=function(){t.log.error("PICT-MarkdownEditor _processImageFile: FileReader error.")},o.readAsDataURL(e)}else t.log.error("PICT-MarkdownEditor _processImageFile: FileReader not available in this environment.")}else t.log.warn("PICT-MarkdownEditor _processImageFile: not an image file (type: ".concat(e?e.type:"null",")."))},t._insertImageMarkdown=function(e,n,i){var o=t._segmentEditors[e];if(o){var r="![".concat(i||"image","](").concat(n,")"),a=o.state.selection.main.head;o.dispatch({changes:{from:a,insert:r},selection:{anchor:a+r.length}}),o.focus(),t._updateImagePreviews(e)}else t.log.warn("PICT-MarkdownEditor _insertImageMarkdown: no editor for segment ".concat(e,"."))},t._updateImagePreviews=function(e){var n=document.getElementById("PictMDE-ImagePreview-".concat(e));if(n){var i=t._segmentEditors[e];if(!i)return n.innerHTML="",void n.classList.remove("pict-mde-has-images");for(var o,r=i.state.doc.toString(),a=/!\[([^\]]*)\]\(([^)]+)\)/g,s=[];null!==(o=a.exec(r));)s.push({alt:o[1]||"image",url:o[2]});if(0===s.length)return n.innerHTML="",void n.classList.remove("pict-mde-has-images");for(var l="",c=0;c<s.length;c++){var d=s[c].alt.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),p=s[c].url.replace(/&/g,"&amp;").replace(/"/g,"&quot;");l+='<div class="pict-mde-image-preview-item"><img src="'.concat(p,'" alt="').concat(d,'" /><span class="pict-mde-image-preview-label">').concat(d,"</span></div>")}n.innerHTML=l,n.classList.add("pict-mde-has-images")}},t._wireImageDragEvents=function(e,n){e.addEventListener("dragover",function(n){t._dragSourceIndex>=0||!n.dataTransfer||!n.dataTransfer.types||n.dataTransfer.types.indexOf("Files")<0||(n.preventDefault(),n.dataTransfer.dropEffect="copy",e.classList.add("pict-mde-image-dragover"))}),e.addEventListener("dragleave",function(t){e.contains(t.relatedTarget)||e.classList.remove("pict-mde-image-dragover")}),e.addEventListener("drop",function(i){if(e.classList.remove("pict-mde-image-dragover"),!(t._dragSourceIndex>=0)&&i.dataTransfer&&i.dataTransfer.files&&!(i.dataTransfer.files.length<1)){var o=i.dataTransfer.files[0];o.type&&o.type.startsWith("image/")&&(i.preventDefault(),i.stopPropagation(),t._processImageFile(o,n))}})}}},{}],48:[function(t,e,n){var i=t("pict-section-content").PictContentProvider;e.exports.attach=function(t){t._getContentProvider=function(){return t._contentProvider||(t._contentProvider=new i(t.fable,{},"Pict-Content-Provider-MDE")),t._contentProvider},t._updateRichPreviews=function(e){if(t.options.EnableRichPreview){var n=document.getElementById("PictMDE-RichPreview-".concat(e));if(n){var i=t._segmentEditors[e];if(!i)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var o=i.state.doc.toString();if(!o||0===o.trim().length)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var r=t._getContentProvider().parseMarkdown(o);if(!r||0===r.trim().length)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var a="PictMDE-RichPreviewBody-".concat(e);n.innerHTML='<div class="pict-content" id="'.concat(a,'">').concat(r,"</div>"),n.classList.add("pict-mde-has-rich-preview");var s=(t._richPreviewGenerations[e]||0)+1;t._richPreviewGenerations[e]=s,t._postRenderMermaid(a,e,s),t._postRenderKaTeX(a)}}},t._postRenderMermaid=function(e,n,i){if("undefined"!=typeof mermaid){var o=document.getElementById(e);if(o){var r=o.querySelectorAll("pre.mermaid");if(!(r.length<1))try{var a=mermaid.run({nodes:r});a&&"function"==typeof a.catch&&a.catch(function(e){(-1===n?t._renderedViewGeneration:t._richPreviewGenerations[n])===i&&t.log.warn("PICT-MarkdownEditor mermaid render error: ".concat(e.message||e))})}catch(e){t.log.warn("PICT-MarkdownEditor mermaid render error: ".concat(e.message||e))}}}},t._postRenderKaTeX=function(e){if("undefined"!=typeof katex){var n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(e){t.log.warn("PICT-MarkdownEditor KaTeX inline error: ".concat(e.message||e))}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(e){t.log.warn("PICT-MarkdownEditor KaTeX display error: ".concat(e.message||e))}}}},t._escapeHTMLForPreview=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},t.toggleRenderedView=function(e){t._renderedViewActive="boolean"==typeof e?e:!t._renderedViewActive,t._renderedViewActive?t._renderRenderedView():t._restoreEditingView()},t._renderRenderedView=function(){var e=t._getContainerElement();if(e){t._marshalAllEditorsToData();var n=t._getSegmentsFromData(),i="";if(n&&n.length>0){for(var o=[],r=0;r<n.length;r++)o.push(n[r].Content||"");i=o.join("\n\n")}for(var a in t._segmentEditors)t._segmentEditors[a]&&t._segmentEditors[a].destroy();t._segmentEditors={};var s=t._getContentProvider().parseMarkdown(i),l="PictMDE-RenderedView";e.innerHTML='<div class="pict-mde-rendered-view" id="'.concat(l,'"><div class="pict-content">').concat(s||"","</div></div>"),e.classList.add("pict-mde-rendered-mode"),t._renderedViewGeneration++;var c=t._renderedViewGeneration,d=e.querySelector("#".concat(l," .pict-content"));if(d){var p="PictMDE-RenderedViewContent";d.id=p,t._postRenderMermaid(p,-1,c),t._postRenderKaTeX(p)}}},t._restoreEditingView=function(){var e=t._getContainerElement();e&&(e.classList.remove("pict-mde-rendered-mode"),t._buildEditorUI())}}},{"pict-section-content":26}],49:[function(t,e,n){e.exports={DefaultRenderable:"MarkdownEditor-Wrap",DefaultDestinationAddress:"#MarkdownEditor-Container-Div",Templates:[{Hash:"MarkdownEditor-Container",Template:'<div class="pict-mde" id="PictMDE-Container"></div>'},{Hash:"MarkdownEditor-Segment",Template:'<div class="pict-mde-segment" id="PictMDE-Segment-{~D:Record.SegmentIndex~}" data-segment-index="{~D:Record.SegmentIndex~}">\n\t<div class="pict-mde-left-controls">\n\t\t<div class="pict-mde-quadrant-tl"></div>\n\t\t<div class="pict-mde-quadrant-bl"></div>\n\t</div>\n\t<div class="pict-mde-drag-handle" draggable="true" title="Drag to reorder"></div>\n\t<div class="pict-mde-segment-body">\n\t\t<div class="pict-mde-segment-editor" id="PictMDE-SegmentEditor-{~D:Record.SegmentIndex~}"></div>\n\t\t<div class="pict-mde-image-preview" id="PictMDE-ImagePreview-{~D:Record.SegmentIndex~}"></div>\n\t\t<div class="pict-mde-rich-preview" id="PictMDE-RichPreview-{~D:Record.SegmentIndex~}"></div>\n\t</div>\n\t<div class="pict-mde-sidebar" id="PictMDE-Sidebar-{~D:Record.SegmentIndex~}">\n\t\t<div class="pict-mde-quadrant-tr"></div>\n\t\t<div class="pict-mde-quadrant-br"></div>\n\t\t<input type="file" accept="image/*" class="pict-mde-image-input" id="PictMDE-ImageInput-{~D:Record.SegmentIndex~}" style="display:none" />\n\t</div>\n</div>'},{Hash:"MarkdownEditor-AddSegment",Template:'<div class="pict-mde-add-segment">\n\t<button type="button" class="pict-mde-btn-add" onclick="{~D:Record.ViewIdentifier~}.addSegment()">+ Add Segment</button>\n</div>'}],Renderables:[{RenderableHash:"MarkdownEditor-Wrap",TemplateHash:"MarkdownEditor-Container",DestinationAddress:"#MarkdownEditor-Container-Div"}],TargetElementAddress:"#MarkdownEditor-Container-Div",ContentDataAddress:!1,ReadOnly:!1,EnableRichPreview:!0,ButtonsTL:[{HTML:"&times;",Action:"removeSegment",Class:"pict-mde-btn-remove",Title:"Remove Segment"}],ButtonsBL:[{HTML:"&uarr;",Action:"moveSegmentUp",Class:"pict-mde-btn-move",Title:"Move Up"},{HTML:"&darr;",Action:"moveSegmentDown",Class:"pict-mde-btn-move",Title:"Move Down"},{HTML:"&#x229E;",Action:"toggleControls",Class:"pict-mde-btn-linenums",Title:"Toggle Controls"},{HTML:"&#x25CE;",Action:"toggleSegmentPreview",Class:"pict-mde-btn-preview",Title:"Toggle Preview"}],ButtonsTR:[{HTML:"<b>B</b>",Action:"applyFormatting:bold",Class:"",Title:"Bold (Ctrl+B)"},{HTML:"<i>I</i>",Action:"applyFormatting:italic",Class:"",Title:"Italic (Ctrl+I)"},{HTML:"<code>&lt;&gt;</code>",Action:"applyFormatting:code",Class:"",Title:"Inline Code (Ctrl+E)"},{HTML:"#",Action:"applyFormatting:heading",Class:"",Title:"Heading"},{HTML:"[&thinsp;]",Action:"applyFormatting:link",Class:"",Title:"Link"},{HTML:"&#x25A3;",Action:"openImagePicker",Class:"pict-mde-sidebar-btn-image",Title:"Insert Image"}],ButtonsBR:[],CSS:"\n/* ---- Container ---- */\n.pict-mde\n{\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n\tfont-size: 14px;\n}\n\n/* ---- Segment row: left-controls | drag-handle | editor body | sidebar ---- */\n.pict-mde-segment\n{\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: stretch;\n\tmargin-bottom: 6px;\n\tmin-height: 48px;\n\ttransition: background-color 0.15s ease;\n}\n\n/* ---- Left controls column ---- */\n.pict-mde-left-controls\n{\n\tflex: 0 0 22px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 2px 0;\n}\n\n/* ---- Left-side quadrants ---- */\n.pict-mde-quadrant-tl\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tposition: sticky;\n\ttop: 2px;\n\tz-index: 2;\n}\n.pict-mde-quadrant-bl\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tposition: sticky;\n\tbottom: 2px;\n\tz-index: 2;\n}\n\n/* ---- Left-side buttons (shared base) ---- */\n.pict-mde-left-btn\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 20px;\n\theight: 20px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tpadding: 0;\n\tcolor: #888;\n\tline-height: 1;\n\tfont-family: inherit;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n}\n.pict-mde-segment:hover .pict-mde-left-btn,\n.pict-mde-segment.pict-mde-active .pict-mde-left-btn\n{\n\topacity: 1;\n}\n.pict-mde-left-btn:hover\n{\n\tcolor: #222;\n}\n.pict-mde-btn-remove:hover\n{\n\tcolor: #CC3333;\n}\n.pict-mde-btn-linenums\n{\n\tfont-size: 11px;\n\tfont-weight: 600;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n}\n/* Highlight when controls are active */\n.pict-mde.pict-mde-controls-on .pict-mde-btn-linenums\n{\n\tcolor: #4A90D9;\n}\n.pict-mde-btn-preview\n{\n\tfont-size: 11px;\n}\n/* Highlight the preview button when preview is visible (not hidden) */\n.pict-mde-segment:not(.pict-mde-preview-hidden) .pict-mde-btn-preview\n{\n\tcolor: #4A90D9;\n}\n/* Dim preview button when this segment's preview is individually hidden */\n.pict-mde-segment.pict-mde-preview-hidden .pict-mde-btn-preview\n{\n\tcolor: #CCC;\n}\n\n/* ---- Drag handle (simple grey bar) ---- */\n.pict-mde-drag-handle\n{\n\tflex: 0 0 8px;\n\tcursor: grab;\n\tbackground: #EDEDED;\n\ttransition: background-color 0.15s ease;\n\tuser-select: none;\n}\n.pict-mde-drag-handle:active\n{\n\tcursor: grabbing;\n}\n.pict-mde-drag-handle:hover\n{\n\tbackground: #C8C8C8;\n}\n\n/* ---- Editor body (middle column) ---- */\n.pict-mde-segment-body\n{\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\tbackground: #FFFFFF;\n\ttransition: background-color 0.15s ease;\n}\n.pict-mde-segment-editor\n{\n\tmin-height: 48px;\n}\n\n/* ---- Image preview area below the editor ---- */\n.pict-mde-image-preview\n{\n\tdisplay: none;\n}\n.pict-mde-image-preview.pict-mde-has-images\n{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tpadding: 8px 12px;\n\tborder-top: 1px solid #EDEDED;\n}\n.pict-mde-image-preview img\n{\n\tmax-width: 200px;\n\tmax-height: 150px;\n\tborder-radius: 3px;\n\tborder: 1px solid #E0E0E0;\n\tobject-fit: contain;\n\tbackground: #F8F8F8;\n}\n.pict-mde-image-preview-item\n{\n\tposition: relative;\n\tdisplay: inline-block;\n}\n.pict-mde-image-preview-label\n{\n\tdisplay: block;\n\tfont-size: 10px;\n\tcolor: #999;\n\tmargin-top: 2px;\n\tmax-width: 200px;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n/* ---- Rich content preview area (rendered via pict-section-content) ---- */\n.pict-mde-rich-preview\n{\n\tdisplay: none;\n}\n.pict-mde-rich-preview.pict-mde-has-rich-preview\n{\n\tdisplay: block;\n\tborder-top: 1px solid #EDEDED;\n\tbackground: #FCFCFC;\n}\n/* Global preview toggle: hide all previews when container has class */\n.pict-mde.pict-mde-previews-hidden .pict-mde-rich-preview.pict-mde-has-rich-preview,\n.pict-mde.pict-mde-previews-hidden .pict-mde-image-preview.pict-mde-has-images\n{\n\tdisplay: none;\n}\n/* Per-segment preview toggle: hide previews for a specific segment */\n.pict-mde-segment.pict-mde-preview-hidden .pict-mde-rich-preview.pict-mde-has-rich-preview,\n.pict-mde-segment.pict-mde-preview-hidden .pict-mde-image-preview.pict-mde-has-images\n{\n\tdisplay: none;\n}\n/* Constrain the pict-content inside the preview to fit the segment */\n.pict-mde-rich-preview .pict-content\n{\n\tpadding: 12px;\n\tmax-width: none;\n\tmargin: 0;\n\tfont-size: 13px;\n}\n/* Reduce heading sizes in the preview to be proportional */\n.pict-mde-rich-preview .pict-content h1\n{\n\tfont-size: 1.4em;\n\tmargin-top: 0;\n}\n.pict-mde-rich-preview .pict-content h2\n{\n\tfont-size: 1.2em;\n\tmargin-top: 0.75em;\n}\n.pict-mde-rich-preview .pict-content h3\n{\n\tfont-size: 1.1em;\n\tmargin-top: 0.6em;\n}\n\n/* ---- Rendered view (full document preview mode) ---- */\n.pict-mde-rendered-view\n{\n\tpadding: 16px 20px;\n\tbackground: #FFFFFF;\n\tmin-height: 120px;\n}\n.pict-mde-rendered-view .pict-content\n{\n\tmax-width: none;\n\tmargin: 0;\n}\n/* Hide the add-segment button in rendered mode */\n.pict-mde.pict-mde-rendered-mode .pict-mde-add-segment\n{\n\tdisplay: none;\n}\n\n/* Focused / active editor gets subtle warm background */\n.pict-mde-segment.pict-mde-active .pict-mde-segment-body\n{\n\tbackground: #FAFAF5;\n}\n.pict-mde-segment.pict-mde-active .pict-mde-drag-handle\n{\n\tbackground: #9CB4C8;\n}\n\n/* ---- Right sidebar column ---- */\n.pict-mde-sidebar\n{\n\tflex: 0 0 30px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tposition: relative;\n}\n\n/* ---- Right-side quadrants ---- */\n.pict-mde-quadrant-tr\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tpadding: 4px 0;\n\twidth: 100%;\n\topacity: 0;\n\ttransition: opacity 0.15s ease, top 0.1s ease;\n\tposition: sticky;\n\ttop: 0;\n}\n.pict-mde-quadrant-br\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tpadding: 4px 0;\n\twidth: 100%;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n\tposition: sticky;\n\tbottom: 0;\n}\n\n/* Active segment always shows its right-side quadrants */\n.pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n.pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n{\n\topacity: 1;\n}\n/* When no segment is active, hovering shows both left + right controls */\n.pict-mde:not(:has(.pict-mde-active)) .pict-mde-segment:hover .pict-mde-quadrant-tr,\n.pict-mde:not(:has(.pict-mde-active)) .pict-mde-segment:hover .pict-mde-quadrant-br\n{\n\topacity: 1;\n}\n\n/* ---- Controls-hidden mode: right quadrants show faintly on hover ---- */\n.pict-mde.pict-mde-controls-hidden .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-quadrant-br\n{\n\topacity: 0;\n}\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment:hover .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment:hover .pict-mde-quadrant-br\n{\n\topacity: 0.3;\n}\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n{\n\topacity: 0.3;\n}\n\n/* When JS sets a cursor-relative offset, switch TR from sticky to absolute positioning */\n.pict-mde-quadrant-tr.pict-mde-sidebar-at-cursor\n{\n\tposition: absolute;\n\ttop: var(--pict-mde-sidebar-top, 0px);\n}\n\n/* ---- Right-side buttons (shared base) ---- */\n.pict-mde-sidebar-btn\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 24px;\n\theight: 22px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tpadding: 0;\n\tborder-radius: 3px;\n\tcolor: #666;\n\tline-height: 1;\n\tfont-family: inherit;\n}\n.pict-mde-sidebar-btn:hover\n{\n\tcolor: #222;\n}\n.pict-mde-sidebar-btn b\n{\n\tfont-size: 13px;\n\tfont-weight: 700;\n}\n.pict-mde-sidebar-btn i\n{\n\tfont-size: 13px;\n\tfont-style: italic;\n}\n.pict-mde-sidebar-btn code\n{\n\tfont-size: 10px;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n}\n\n/* ---- Add segment button ---- */\n.pict-mde-add-segment\n{\n\tmargin-top: 6px;\n\tpadding-left: 30px;\n}\n.pict-mde-btn-add\n{\n\tdisplay: block;\n\twidth: 100%;\n\tpadding: 7px;\n\tborder: 2px dashed #D0D0D0;\n\tborder-radius: 4px;\n\tbackground: transparent;\n\tcolor: #999;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tcursor: pointer;\n\ttransition: all 0.15s ease;\n}\n.pict-mde-btn-add:hover\n{\n\tborder-color: #4A90D9;\n\tcolor: #4A90D9;\n\tbackground: rgba(74, 144, 217, 0.04);\n}\n\n/* ---- Image drag-over indicator ---- */\n.pict-mde-segment-editor.pict-mde-image-dragover\n{\n\toutline: 2px dashed #4A90D9;\n\toutline-offset: -2px;\n}\n\n/* ---- Drag-in-progress: prevent CodeMirror from intercepting drop events ---- */\n.pict-mde.pict-mde-dragging .pict-mde-segment-editor\n{\n\tpointer-events: none;\n}\n\n/* ---- Drop target indicators for drag reorder ---- */\n.pict-mde-segment.pict-mde-drag-over-top\n{\n\tbox-shadow: 0 -2px 0 0 #4A90D9;\n}\n.pict-mde-segment.pict-mde-drag-over-bottom\n{\n\tbox-shadow: 0 2px 0 0 #4A90D9;\n}\n\n/* ---- CodeMirror overrides inside segments ---- */\n.pict-mde-segment-editor .cm-editor\n{\n\tborder: none;\n}\n.pict-mde-segment-editor .cm-editor .cm-scroller\n{\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.6;\n}\n.pict-mde-segment-editor .cm-editor.cm-focused\n{\n\toutline: none;\n}\n.pict-mde-segment-editor .cm-editor .cm-content\n{\n\tpadding: 8px 12px;\n\tmin-height: 36px;\n}\n.pict-mde-segment-editor .cm-editor .cm-gutters\n{\n\tbackground: #F8F8F8;\n\tborder-right: 1px solid #E8E8E8;\n\tcolor: #BBB;\n}\n\n/* ---- Collapsed data URI widget ---- */\n.pict-mde-data-uri-collapsed\n{\n\tdisplay: inline;\n\tbackground: #F0F0F0;\n\tcolor: #888;\n\tfont-size: 11px;\n\tpadding: 1px 4px;\n\tborder-radius: 3px;\n\tborder: 1px solid #E0E0E0;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n\tcursor: default;\n\twhite-space: nowrap;\n}\n\n/* ---- Line number / controls toggle: gutters hidden by default ---- */\n.pict-mde .cm-editor .cm-gutters\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-controls-on .cm-editor .cm-gutters\n{\n\tdisplay: flex;\n}\n"}},{}],50:[function(t,e,n){var i=t("pict-view"),o=t("pict-section-content"),r=t("./Pict-Section-MarkdownEditor-DefaultConfiguration.js"),a=t("./Pict-MDE-Formatting.js"),s=t("./Pict-MDE-ImageHandling.js"),l=t("./Pict-MDE-DragAndReorder.js"),c=t("./Pict-MDE-RichPreview.js"),d=t("./Pict-MDE-CodeMirror.js"),p=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o._codeMirrorModules=null,o._segmentEditors={},o._segmentCounter=0,o._viewCallIdentifier=!1,o._activeSegmentIndex=-1,o._dragSourceIndex=-1,o._controlsVisible=!0,o._previewsVisible=!0,o._hiddenPreviewSegments={},o._imagePreviewTimers={},o._richPreviewTimers={},o._richPreviewGenerations={},o._contentProvider=null,o._renderedViewActive=!1,o._renderedViewGeneration=0,a.attach(o),s.attach(o),l.attach(o),c.attach(o),d.attach(o),o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this.targetElement=!1,_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeMirrorModules",value:function(t){if(!t||"object"!==_typeof(t)||"function"!=typeof t.EditorView||"function"!=typeof t.EditorState)return"undefined"!=typeof window&&window.CodeMirrorModules&&"function"==typeof window.CodeMirrorModules.EditorView?(this.log.trace("PICT-MarkdownEditor Found CodeMirror modules on window.CodeMirrorModules."),void(this._codeMirrorModules=window.CodeMirrorModules)):(this.log.error("PICT-MarkdownEditor No CodeMirror modules found. Provide them via connectCodeMirrorModules() or set window.CodeMirrorModules."),!1);this._codeMirrorModules=t}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){if(this._codeMirrorModules||this.connectCodeMirrorModules(),!this._codeMirrorModules)return this.log.error("PICT-MarkdownEditor Cannot initialize; no CodeMirror modules available."),!1;if(this.options.EnableRichPreview){var t=o.default_configuration;t&&t.CSS&&this.pict.CSSMap.addCSS("Pict-Content-View",t.CSS)}var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-MarkdownEditor Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._viewCallIdentifier=this._resolveViewCallIdentifier(),this._buildEditorUI()}},{key:"_resolveViewCallIdentifier",value:function(){var t=this.pict.views;for(var e in t)if(t[e]===this)return"_Pict.views.".concat(e);return"_Pict.servicesMap.PictView['".concat(this.Hash,"']")}},{key:"_getContainerElement",value:function(){if(this.targetElement){var t=this.targetElement.querySelector(".pict-mde");if(t)return t}return this.targetElement||null}},{key:"_buildEditorUI",value:function(){var t=this._getContainerElement();for(var e in t&&!t.classList.contains("pict-mde")&&t.classList.add("pict-mde"),this._segmentEditors)this._segmentEditors[e]&&this._segmentEditors[e].destroy();t.innerHTML="",this._previewsVisible||t.classList.add("pict-mde-previews-hidden"),this._controlsVisible?t.classList.add("pict-mde-controls-on"):t.classList.add("pict-mde-controls-hidden");var n=this._getSegmentsFromData();n&&0!==n.length||(n=[{Content:""}],this._setSegmentsToData(n)),this._segmentCounter=0,this._segmentEditors={};for(var i=0;i<n.length;i++)this._renderSegment(t,i,n[i].Content||"");this._renderAddButton(t)}},{key:"_renderSegment",value:function(t,e,n){var i=this._segmentCounter++,o={SegmentIndex:i,SegmentDisplayIndex:e+1,ViewIdentifier:this._viewCallIdentifier},r=this.pict.parseTemplateByHash("MarkdownEditor-Segment",o),a=document.createElement("div");a.innerHTML=r;var s=a.firstElementChild;t.appendChild(s),this._buildQuadrantButtons(s,i),this._hiddenPreviewSegments[e]&&s.classList.add("pict-mde-preview-hidden"),this._wireSegmentDragEvents(s,i);var l=document.getElementById("PictMDE-SegmentEditor-".concat(i));l&&(this._createEditorInContainer(l,i,n),this._wireImageDragEvents(l,i),n&&(this._updateImagePreviews(i),this._updateRichPreviews(i)))}},{key:"_buildQuadrantButtons",value:function(t,e){for(var n=[{key:"ButtonsTL",selector:".pict-mde-quadrant-tl",baseClass:"pict-mde-left-btn"},{key:"ButtonsBL",selector:".pict-mde-quadrant-bl",baseClass:"pict-mde-left-btn"},{key:"ButtonsTR",selector:".pict-mde-quadrant-tr",baseClass:"pict-mde-sidebar-btn"},{key:"ButtonsBR",selector:".pict-mde-quadrant-br",baseClass:"pict-mde-sidebar-btn"}],i=this,o=0;o<n.length;o++){var r=n[o],a=t.querySelector(r.selector);if(a){var s=this.options[r.key];if(Array.isArray(s))for(var l=function(){var t=s[c],n=document.createElement("button");n.type="button",n.className=r.baseClass,t.Class&&(n.className+=" "+t.Class),n.innerHTML=t.HTML||"",n.title=t.Title||"";var o,l,d,p=t.Action||"",u=p,h=null,f=p.indexOf(":");f>=0&&(u=p.substring(0,f),h=p.substring(f+1)),o=u,l=h,d=e,n.addEventListener("click",function(){"function"==typeof i[o]?null!==l?i[o](d,l):i[o](d):i.log.warn('PICT-MarkdownEditor _buildQuadrantButtons: method "'.concat(o,'" not found.'))}),a.appendChild(n)},c=0;c<s.length;c++)l()}}}},{key:"customConfigureExtensions",value:function(t,e){return t}},{key:"_renderAddButton",value:function(t){var e={ViewIdentifier:this._viewCallIdentifier},n=this.pict.parseTemplateByHash("MarkdownEditor-AddSegment",e),i=document.createElement("div");i.innerHTML=n;var o=i.firstElementChild;t.appendChild(o)}},{key:"onImageUpload",value:function(t,e,n){return!1}},{key:"toggleControls",value:function(t,e){var n=e;"boolean"==typeof t&&(n=t),this._controlsVisible="boolean"==typeof n?n:!this._controlsVisible;var i=this._getContainerElement();i&&(this._controlsVisible?(i.classList.add("pict-mde-controls-on"),i.classList.remove("pict-mde-controls-hidden")):(i.classList.remove("pict-mde-controls-on"),i.classList.add("pict-mde-controls-hidden")))}},{key:"toggleLineNumbers",value:function(t){this.toggleControls(t)}},{key:"togglePreview",value:function(t){this._previewsVisible="boolean"==typeof t?t:!this._previewsVisible;var e=this._getContainerElement();e&&(this._previewsVisible?e.classList.remove("pict-mde-previews-hidden"):e.classList.add("pict-mde-previews-hidden"))}},{key:"toggleSegmentPreview",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){var i=!!this._hiddenPreviewSegments[n];(i="boolean"==typeof e?!e:!i)?this._hiddenPreviewSegments[n]=!0:delete this._hiddenPreviewSegments[n];var o=document.getElementById("PictMDE-Segment-".concat(t));o&&(i?o.classList.add("pict-mde-preview-hidden"):o.classList.remove("pict-mde-preview-hidden"))}}},{key:"_getSegmentsFromData",value:function(){if(!this.options.ContentDataAddress)return null;var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.ContentDataAddress);return Array.isArray(e)?e:null}},{key:"_setSegmentsToData",value:function(t){if(this.options.ContentDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.ContentDataAddress,t)}}},{key:"_onSegmentContentChange",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){var i=this._getSegmentsFromData();if(i){n<i.length&&(i[n].Content=e),this.onContentChange(n,e);var o=this;this._imagePreviewTimers[t]&&clearTimeout(this._imagePreviewTimers[t]),this._imagePreviewTimers[t]=setTimeout(function(){o._updateImagePreviews(t),delete o._imagePreviewTimers[t]},500),this._richPreviewTimers[t]&&clearTimeout(this._richPreviewTimers[t]),this._richPreviewTimers[t]=setTimeout(function(){o._updateRichPreviews(t),delete o._richPreviewTimers[t]},500)}}}},{key:"onContentChange",value:function(t,e){}},{key:"_getLogicalIndex",value:function(t){var e=this._getContainerElement();if(!e)return-1;for(var n=e.querySelectorAll(".pict-mde-segment"),i=0;i<n.length;i++){if(parseInt(n[i].getAttribute("data-segment-index"),10)===t)return i}return-1}},{key:"_getOrderedSegmentIndices",value:function(){var t=this._getContainerElement();if(!t)return[];for(var e=t.querySelectorAll(".pict-mde-segment"),n=[],i=0;i<e.length;i++)n.push(parseInt(e[i].getAttribute("data-segment-index"),10));return n}},{key:"addSegment",value:function(t){var e="string"==typeof t?t:"",n=this._getSegmentsFromData();n||(n=[]),n.push({Content:e}),this._setSegmentsToData(n),this._buildEditorUI()}},{key:"removeSegment",value:function(t){var e=this._getLogicalIndex(t);if(e<0)this.log.warn("PICT-MarkdownEditor removeSegment: segment index ".concat(t," not found."));else{var n=this._getSegmentsFromData();if(!n||n.length<=1)this.log.warn("PICT-MarkdownEditor removeSegment: cannot remove the last segment.");else{this._segmentEditors[t]&&(this._segmentEditors[t].destroy(),delete this._segmentEditors[t]),n.splice(e,1),this._setSegmentsToData(n);var i={};for(var o in this._hiddenPreviewSegments){var r=parseInt(o,10);r<e?i[r]=!0:r>e&&(i[r-1]=!0)}this._hiddenPreviewSegments=i,this._buildEditorUI()}}}},{key:"moveSegmentUp",value:function(t){var e=this._getLogicalIndex(t);if(!(e<=0)){this._marshalAllEditorsToData();var n=this._getSegmentsFromData();if(n){var i=n[e];n[e]=n[e-1],n[e-1]=i,this._swapHiddenPreviewState(e,e-1),this._buildEditorUI()}}}},{key:"moveSegmentDown",value:function(t){var e=this._getLogicalIndex(t),n=this._getSegmentsFromData();if(!(!n||e<0||e>=n.length-1)){this._marshalAllEditorsToData();var i=n[e];n[e]=n[e+1],n[e+1]=i,this._swapHiddenPreviewState(e,e+1),this._buildEditorUI()}}},{key:"getSegmentContent",value:function(t){var e=this._getOrderedSegmentIndices();if(t<0||t>=e.length)return"";var n=e[t],i=this._segmentEditors[n];return i?i.state.doc.toString():""}},{key:"setSegmentContent",value:function(t,e){var n=this._getOrderedSegmentIndices();if(t<0||t>=n.length)this.log.warn("PICT-MarkdownEditor setSegmentContent: index ".concat(t," out of range."));else{var i=n[t],o=this._segmentEditors[i];o&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:e}})}}},{key:"getSegmentCount",value:function(){return this._getOrderedSegmentIndices().length}},{key:"getAllContent",value:function(t){for(var e="string"==typeof t?t:"\n\n",n=this._getOrderedSegmentIndices(),i=[],o=0;o<n.length;o++){var r=this._segmentEditors[n[o]];r&&i.push(r.state.doc.toString())}return i.join(e)}},{key:"_marshalAllEditorsToData",value:function(){var t=this._getSegmentsFromData();if(t)for(var e=this._getOrderedSegmentIndices(),n=0;n<e.length;n++){var i=this._segmentEditors[e[n]];i&&n<t.length&&(t[n].Content=i.state.doc.toString())}}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this.initialRenderComplete&&(this._marshalAllEditorsToData(),this._buildEditorUI())}},{key:"marshalToView",value:function(){_superPropGet(e,"marshalToView",this,3)([]),this.initialRenderComplete&&this.options.ContentDataAddress&&this._buildEditorUI()}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this._marshalAllEditorsToData()}},{key:"destroy",value:function(){for(var t in this._segmentEditors)this._segmentEditors[t]&&this._segmentEditors[t].destroy();for(var e in this._segmentEditors={},this._richPreviewTimers)clearTimeout(this._richPreviewTimers[e]);this._richPreviewTimers={},this._richPreviewGenerations={}}}])}(i);e.exports=p,e.exports.default_configuration=r},{"./Pict-MDE-CodeMirror.js":44,"./Pict-MDE-DragAndReorder.js":45,"./Pict-MDE-Formatting.js":46,"./Pict-MDE-ImageHandling.js":47,"./Pict-MDE-RichPreview.js":48,"./Pict-Section-MarkdownEditor-DefaultConfiguration.js":49,"pict-section-content":26,"pict-view":52}],51:[function(t,e,n){e.exports={name:"pict-view",version:"1.0.66",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"mocha -u tdd -R spec",tests:"mocha -u tdd -R spec -g",start:"node source/Pict-View.js",coverage:"nyc --reporter=lcov --reporter=text-lcov npm test",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.51",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.57","fable-serviceproviderbase":"^3.0.18"}}},{}],52:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),n),i])).fable,a.options,a.UUID,a.Hash,a.log;var s=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),s&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=o,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var l=0;l<a.options.Templates.length;l++){var c=a.options.Templates[l];"Hash"in c&&"Template"in c?(c.Source||(c.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(c.Hash,c.Template,c.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(l," in the options array."),c)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var u=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),h=a.options.CSSProvider?a.options.CSSProvider:u;a.pict.CSSMap.addCSS(u,a.options.CSS,h,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var v=a.options.Renderables[f];a.addRenderable(v)}return a}return _inherits(e,t),_createClass(e,[{key:"addRenderable",value:function(t,e,n,i,o){var r;"object"==_typeof(t)?r=t:r={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:n,ContentDestinationAddress:i,RenderMethod:"string"!=typeof o?o:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this)),n.anticipate(this.onAfterInitializeAsync.bind(this)),n.wait(function(n){return n&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization failed: ").concat(n.message||n),{stack:n.stack}),e.initializeTimestamp=e.pict.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.info("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onBeforeRender",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t,e){return this.onBeforeRender(e),t()}},{key:"onBeforeProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(t,e){return this.onBeforeProject(e),t()}},{key:"buildRenderOptions",value:function(t,e,n){var i={Valid:!0};return i.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof e?e:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),i.Valid=!1),"object"===_typeof(n)?(i.RecordAddress="Passed in as object",i.Record=n):(i.RecordAddress="string"==typeof n?n:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}},{key:"assignRenderContent",value:function(t,e,n){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,n,t.TestAddress)}},{key:"render",value:function(t,e,n,i){return this.renderWithScope(this,t,e,n,i)}},{key:"renderWithScope",value:function(t,e,n,i,o){var r,a,s,l="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return l?("__Virtual"==l?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof n?n:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&o.TransactionHash,RootRenderableViewHash:o&&o.RootRenderableViewHash}:(r=Object.assign({},this.renderables[l])).ContentDestinationAddress="string"==typeof n?n:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(l,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(i)?(s=i,a="Passed in as object"):s="string"==typeof(a="string"==typeof i?i:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(l,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(l,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,s,null,[this],t,{RootRenderable:"object"===_typeof(o)?o:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(l,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(l," (param ").concat(e,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(t,e,n,i,o){return this.renderWithScopeAsync(this,t,e,n,i,o)}},{key:"renderWithScopeAsync",value:function(t,e,n,i,o,r){var a,s,l,c=this,d="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:"function"==typeof o?o:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(t){t&&c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof n?n:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&"function"!=typeof o&&o.TransactionHash,RootRenderableViewHash:o&&"function"!=typeof o&&o.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof n?n:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(i)?(l=i,s="Passed in as object"):(s="string"==typeof i?i:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,l="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var u=this.fable.newAnticipate();u.anticipate(function(t){c.onBeforeRenderAsync(t,a)}),u.anticipate(function(n){c.pict.parseTemplateByHash(a.TemplateHash,l,function(t,i){return t?(c.log.error("PictView [".concat(c.UUID,"]::[").concat(c.Hash,"] ").concat(c.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(e,") because it did not parse the template."),t),n(t)):(a.Content=i,n())},[c],t,{RootRenderable:"object"===_typeof(o)?o:a})}),u.anticipate(function(t){c.onBeforeProjectAsync(t,a)}),u.anticipate(function(t){c.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(u.anticipate(function(t){c.onAfterProjectAsync(t,a)}),u.anticipate(function(t){c.onAfterRenderAsync(t,a)})),u.wait(p)}},{key:"renderDefaultAsync",value:function(t){this.renderAsync(t)}},{key:"basicRender",value:function(t,e,n){return this.basicRenderWithScope(this,t,e,n)}},{key:"basicRenderWithScope",value:function(t,e,n,i){var o=this.buildRenderOptions(e,n,i);return o.Valid?(this.assignRenderContent(o.Renderable,o.DestinationAddress,this.pict.parseTemplateByHash(o.Renderable.TemplateHash,o.Record,null,[this],t,{RootRenderable:o.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(o.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(t,e,n,i){return this.basicRenderWithScopeAsync(this,t,e,n,i)}},{key:"basicRenderWithScopeAsync",value:function(t,e,n,i,o){var r=this,a="function"==typeof o?o:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(t){t&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});var s=this.buildRenderOptions(e,n,i);if(!s.Valid){var l="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(s.RenderableHash," because it is not valid.");return this.log.error(l),a(new Error(l))}this.pict.parseTemplateByHash(s.Renderable.TemplateHash,s.Record,function(t,e){return t?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(s.RenderableHash," because it did not parse the template."),t),a(t)):(r.assignRenderContent(s.Renderable,s.DestinationAddress,e),a())},[this],t,{RootRenderable:s.Renderable})}},{key:"onProject",value:function(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(t,e){return this.onProject(e),t()}},{key:"onAfterRender",value:function(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){var e,n=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{for(n.s();!(e=n.n()).done;){var i=e.value,o=this.pict.views[i.Data.ViewHash];o?(o.onAfterProject(),o.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}catch(t){n.e(t)}finally{n.f()}}return!0}},{key:"onAfterRenderAsync",value:function(t,e){var n=this;this.onAfterRender(e);var i=this.fable.newAnticipate();if(e&&e.RootRenderableViewHash===this.Hash){var o,r=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{var a=function(){var t=o.value,r=n.pict.views[t.Data.ViewHash];if(!r)return n.log.error("PictView [".concat(n.UUID,"]::[").concat(n.Hash,"] ").concat(n.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(t.Data.ViewHash,".")),1;i.anticipate(r.onAfterProjectAsync.bind(r)),i.anticipate(function(e){r.onAfterRenderAsync(e,t.Data.Renderable)})};for(r.s();!(o=r.n()).done;)a()}catch(t){r.e(t)}finally{r.f()}}return i.wait(t)}},{key:"onAfterProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(t,e){return t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeSolveAsync.bind(this)),n.anticipate(this.onSolveAsync.bind(this)),n.anticipate(this.onAfterSolveAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," solveAsync() complete.")),e.lastSolvedTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(t){return this.onBeforeMarshalFromView(),t()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(t){return this.onMarshalFromView(),t()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),n.anticipate(this.onMarshalFromViewAsync.bind(this)),n.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalFromViewAsync() complete.")),e.lastMarshalFromViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(t){return this.onAfterMarshalFromView(),t()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(t){return this.onBeforeMarshalToView(),t()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(t){return this.onMarshalToView(),t()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),n.anticipate(this.onMarshalToViewAsync.bind(this)),n.anticipate(this.onAfterMarshalToViewAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalToViewAsync() complete.")),e.lastMarshalToViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(t){return this.onAfterMarshalToView(),t()}},{key:"isPictView",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":51,"fable-serviceproviderbase":2}],53:[function(t,e,n){e.exports={Name:"Retold Content Editor",Hash:"ContentEditor",MainViewportViewIdentifier:"ContentEditor-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"ContentEditor-Pict-Application"}}},{}],54:[function(t,e,n){var i=t("pict-application"),o=t("pict-section-filebrowser"),r=t("./providers/Pict-Provider-ContentEditor.js"),a=t("./views/PictView-Editor-Layout.js"),s=t("./views/PictView-Editor-TopBar.js"),l=t("./views/PictView-Editor-MarkdownEditor.js"),c=t("./views/PictView-Editor-CodeEditor.js"),d=t("./views/PictView-Editor-SettingsPanel.js"),p=t("./views/PictView-Editor-MarkdownReference.js"),u=t("./views/PictView-Editor-Topics.js"),h=function(t){function e(t,n,i){var h;_classCallCheck(this,e),(h=_callSuper(this,e,[t,n,i])).pict.addProvider("ContentEditor-Provider",r.default_configuration,r),h.pict.addView("ContentEditor-Layout",a.default_configuration,a),h.pict.addView("ContentEditor-TopBar",s.default_configuration,s),h.pict.addView("ContentEditor-MarkdownEditor",l.default_configuration,l),h.pict.addView("ContentEditor-CodeEditor",c.default_configuration,c),h.pict.addView("ContentEditor-SettingsPanel",d.default_configuration,d),h.pict.addView("ContentEditor-MarkdownReference",p.default_configuration,p),h.pict.addView("ContentEditor-Topics",u.default_configuration,u);var f=JSON.parse(JSON.stringify(o.default_configuration));return f.DefaultDestinationAddress="#ContentEditor-Sidebar-Container",f.DefaultState.Layout="list-only",h.pict.addView("Pict-FileBrowser",f,o),h.pict.addView("Pict-FileBrowser-ListDetail",o.PictViewListDetail.default_configuration,o.PictViewListDetail),h}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){"undefined"!=typeof window&&(window.pict=this.pict),this.pict.AppData.ContentEditor={CurrentFile:"",ActiveEditor:"markdown",IsDirty:!1,IsSaving:!1,IsLoading:!1,Files:[],Document:{Segments:[{Content:""}]},CodeContent:"",SaveStatus:"",SaveStatusClass:"",AutoSegmentMarkdown:!1,AutoSegmentDepth:1,AutoContentPreview:!1,MarkdownEditingControls:!0,MarkdownWordWrap:!0,CodeWordWrap:!1,SidebarCollapsed:!1,SidebarWidth:250,AutoPreviewImages:!0,AutoPreviewVideo:!1,AutoPreviewAudio:!1,ShowHiddenFiles:!1,TopicsFilePath:".pict_documentation_topics.json"},this._loadSettings(),this.pict.views["ContentEditor-Layout"].render();var n=this,i=this.pict.providers["Pict-FileBrowser-List"];if(i){var o=i.selectFile.bind(i);i.selectFile=function(t){o(t),t&&"file"===t.Type&&n.navigateToFile(t.Path)}}var r=this.pict.providers["Pict-FileBrowser-Browse"];if(r){var a=r.navigateToFolder.bind(r);r.navigateToFolder=function(t){a(t),n.loadFileList(t)}}this.syncHiddenFilesSetting(function(){n.loadFileList(null,function(){n.resolveHash()})});var s=this.pict.AppData.ContentEditor.TopicsFilePath;if(s){var l=this.pict.views["ContentEditor-Topics"];l&&l.loadTopicsFile(s,function(){})}return _superPropGet(e,"onAfterInitializeAsync",this,3)([t])}},{key:"syncHiddenFilesSetting",value:function(t){var e="function"==typeof t?t:function(){},n=this.pict.AppData.ContentEditor.ShowHiddenFiles;fetch("/api/filebrowser/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({IncludeHiddenFiles:!!n})}).then(function(){return e()}).catch(function(){return e()})}},{key:"loadFileList",value:function(t,e){var n="function"==typeof e?e:"function"==typeof t?t:function(){},i=this,o="string"==typeof t?t:null;null===o&&this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var r="/api/filebrowser/list";o&&o.length>0&&(r+="?path="+encodeURIComponent(o)),fetch(r).then(function(t){return t.json()}).then(function(t){i.pict.AppData.PictFileBrowser=i.pict.AppData.PictFileBrowser||{},i.pict.AppData.PictFileBrowser.FileList=t||[];var e=i.pict.views["Pict-FileBrowser"];e&&e.render();var o=i.pict.views["Pict-FileBrowser-ListDetail"];return o&&o.render(),n()}).catch(function(t){return i.log.error("Failed to load file list: ".concat(t.message)),n()})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t){var e=t.split("/");if("edit"===e[0]&&e.length>=2){var n=e.slice(1).join("/");if(this.pict.AppData.ContentEditor.CurrentFile===n)return;this.navigateToFile(n)}}}},{key:"getEditorTypeForFile",value:function(t){if(!t)return"markdown";var e=t.replace(/^.*\./,"").toLowerCase();if("md"===e||"markdown"===e)return"markdown";return{png:!0,jpg:!0,jpeg:!0,gif:!0,bmp:!0,webp:!0,ico:!0,svg:!0,tiff:!0,tif:!0,avif:!0,heic:!0,heif:!0,mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0,mp4:!0,avi:!0,mkv:!0,mov:!0,wmv:!0,webm:!0,flv:!0,m4v:!0,pdf:!0,doc:!0,docx:!0,xls:!0,xlsx:!0,ppt:!0,pptx:!0,odt:!0,ods:!0,odp:!0,zip:!0,tar:!0,gz:!0,bz2:!0,xz:!0,"7z":!0,rar:!0,ttf:!0,otf:!0,woff:!0,woff2:!0,eot:!0,exe:!0,dll:!0,so:!0,dylib:!0,o:!0,class:!0,pyc:!0,wasm:!0}[e]?"binary":"code"}},{key:"_cleanupEditors",value:function(){var t=this.pict.views["ContentEditor-CodeEditor"];t&&(t.codeJar&&t.destroy(),t.initialRenderComplete=!1);var e=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");e&&e[0]&&(e[0].innerHTML="")}},{key:"_formatFileSize",value:function(t){if(0===t)return"0 B";var e=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(1024));return n>=e.length&&(n=e.length-1),(t/Math.pow(1024,n)).toFixed(0===n?0:1)+" "+e[n]}},{key:"_getMediaType",value:function(t){return{png:!0,jpg:!0,jpeg:!0,gif:!0,webp:!0,svg:!0,bmp:!0,ico:!0,avif:!0}[t]?"image":{mp4:!0,webm:!0,mov:!0,mkv:!0,avi:!0,wmv:!0,flv:!0,m4v:!0,ogv:!0}[t]?"video":{mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0,oga:!0}[t]?"audio":"other"}},{key:"_buildMediaPreviewHTML",value:function(t,e,n){return"image"===t?'<div class="binary-preview-image-wrap"><div class="binary-preview-image"><img src="'+e+'" alt="'+n+'"></div></div>':"video"===t?'<div class="binary-preview-media-wrap"><video class="binary-preview-video" controls preload="metadata"><source src="'+e+'">Your browser does not support the video tag.</video></div>':"audio"===t?'<div class="binary-preview-media-wrap"><audio class="binary-preview-audio" controls preload="metadata"><source src="'+e+'">Your browser does not support the audio tag.</audio></div>':""}},{key:"loadMediaPreview",value:function(t,e,n){var i=document.getElementById("ContentEditor-MediaPreviewPlaceholder");i&&(i.innerHTML=this._buildMediaPreviewHTML(t,e,n))}},{key:"_showBinaryPreview",value:function(t){var e=this,n=t.replace(/^.*\//,""),i=t.replace(/^.*\./,"").toLowerCase(),o="/content/"+encodeURIComponent(t),r=this._getMediaType(i),a=this.pict.AppData.ContentEditor,s=!1;"image"===r&&(s=a.AutoPreviewImages),"video"===r&&(s=a.AutoPreviewVideo),"audio"===r&&(s=a.AutoPreviewAudio),fetch("/api/filebrowser/info?path="+encodeURIComponent(t)).then(function(t){return t.json()}).then(function(t){var a=t&&"number"==typeof t.Size?e._formatFileSize(t.Size):"Unknown",l=t&&t.Modified?new Date(t.Modified).toLocaleString():"Unknown",c=e.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");if(c&&c[0]){var d="";"other"!==r&&(s?d+=e._buildMediaPreviewHTML(r,o,n):(d+='<div id="ContentEditor-MediaPreviewPlaceholder">',d+='<button class="binary-preview-btn binary-preview-btn-preview"',d+=' onclick="pict.PictApplication.loadMediaPreview(',d+="'"+r+"','"+o+"','"+n.replace(/'/g,"\\'")+"'",d+=')">Preview '+r.charAt(0).toUpperCase()+r.slice(1)+"</button>",d+="</div>")),d+='<div class="binary-preview-card">',d+='<div class="binary-preview-icon">'+i.toUpperCase()+"</div>",d+='<div class="binary-preview-info">',d+='<div class="binary-preview-name">'+n+"</div>",d+='<div class="binary-preview-meta">Size: '+a+"</div>",d+='<div class="binary-preview-meta">Modified: '+l+"</div>",d+='<div class="binary-preview-meta">Type: .'+i+"</div>",d+="</div>",d+='<div class="binary-preview-actions">',d+='<a class="binary-preview-btn" href="'+o+'" download="'+n+'">Download</a>',d+='<a class="binary-preview-btn binary-preview-btn-secondary" href="'+o+'" target="_blank">Open in New Tab</a>',d+="</div>",d+="</div>",c[0].innerHTML=d}}).catch(function(){var t=e.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");t&&t[0]&&(t[0].innerHTML='<div class="binary-preview-card"><div class="binary-preview-icon">'+i.toUpperCase()+'</div><div class="binary-preview-info"><div class="binary-preview-name">'+n+'</div><div class="binary-preview-meta">Binary file — cannot be edited in the browser</div></div><div class="binary-preview-actions"><a class="binary-preview-btn" href="'+o+'" download="'+n+'">Download</a><a class="binary-preview-btn binary-preview-btn-secondary" href="'+o+'" target="_blank">Open in New Tab</a></div></div>')})}},{key:"segmentMarkdownContent",value:function(t){var e=this.pict.AppData.ContentEditor;if(!e.AutoSegmentMarkdown||!t)return[{Content:t||""}];var n=parseInt(e.AutoSegmentDepth,10)||1;if(1===n){for(var i=t.split("\n"),o=[],r=[],a=!1,s=0;s<i.length;s++){var l=i[s];/^(`{3,}|~{3,})/.test(l.trim())?(a=!a,r.push(l)):a||""!==l.trim()?r.push(l):r.length>0&&(o.push({Content:r.join("\n")}),r=[])}return r.length>0&&o.push({Content:r.join("\n")}),o.length>0?o:[{Content:""}]}for(var c=new RegExp("^(#{1,"+n+"})\\s"),d=t.split("\n"),p=[],u=[],h=0;h<d.length;h++){var f=d[h];c.test(f.trim())&&u.length>0&&(p.push({Content:u.join("\n")}),u=[]),u.push(f)}return u.length>0&&p.push({Content:u.join("\n")}),p.length>0?p:[{Content:""}]}},{key:"navigateToFile",value:function(t){if(t){var e=this,n=this.getEditorTypeForFile(t);if(this.pict.AppData.ContentEditor.SaveStatus="",this.pict.AppData.ContentEditor.SaveStatusClass="",window.location.hash="#/edit/"+t,this.pict.AppData.ContentEditor.CurrentFile=t,this.pict.AppData.ContentEditor.IsDirty=!1,this.pict.AppData.ContentEditor.ActiveEditor=n,this._cleanupEditors(),this.pict.views["ContentEditor-TopBar"].render(),"binary"===n)return this._showBinaryPreview(t),void this.updateStats();var i=this.pict.providers["ContentEditor-Provider"];this.pict.AppData.ContentEditor.IsLoading=!0,i.loadFile(t,function(i,o){if(e.pict.AppData.ContentEditor.IsLoading=!1,i)return e.pict.AppData.ContentEditor.SaveStatus="Error loading file: "+i,e.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-error",void e.pict.views["ContentEditor-TopBar"].render();if("markdown"===n){e.pict.AppData.ContentEditor.Document.Segments=e.segmentMarkdownContent(o);var r=e.pict.views["ContentEditor-MarkdownEditor"];r&&(r.render(),r.marshalToView(),r.togglePreview(e.pict.AppData.ContentEditor.AutoContentPreview),r.toggleControls(e.pict.AppData.ContentEditor.MarkdownEditingControls)),e.updateStats()}else{e.pict.AppData.ContentEditor.CodeContent=o;var a=t.replace(/^.*\./,"").toLowerCase(),s=c.getLanguageForExtension?c.getLanguageForExtension(a):c.ExtensionLanguageMap[a]||"plaintext",l=e.pict.views["ContentEditor-CodeEditor"];l&&(l.initialRenderComplete=!1,l._language=s,l._suppressNextDirty=!0,l.render(),l.marshalToView(),e.pict.AppData.ContentEditor.CodeWordWrap&&l._editorElement&&(l._editorElement.style.whiteSpace="pre-wrap",l._editorElement.style.overflowWrap="break-word")),e.updateStats()}})}}},{key:"saveCurrentFile",value:function(){var t=this.pict.AppData.ContentEditor.CurrentFile;if(t){var e=this.pict.providers["ContentEditor-Provider"],n=this,i="";if("code"===this.pict.AppData.ContentEditor.ActiveEditor){var o=this.pict.views["ContentEditor-CodeEditor"];o&&o.marshalFromView(),i=this.pict.AppData.ContentEditor.CodeContent||""}else{var r=this.pict.views["ContentEditor-MarkdownEditor"];r&&r.marshalFromView();var a=this.pict.AppData.ContentEditor.Document.Segments;if(a&&a.length>0){for(var s=[],l=0;l<a.length;l++)s.push(a[l].Content||"");i=s.join("\n\n")}}this.pict.AppData.ContentEditor.IsSaving=!0,this.pict.AppData.ContentEditor.SaveStatus="Saving...",this.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-saving",this.pict.views["ContentEditor-TopBar"].render(),e.saveFile(t,i,function(t){n.pict.AppData.ContentEditor.IsSaving=!1,t?(n.pict.AppData.ContentEditor.SaveStatus="Error: "+t,n.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-error"):(n.pict.AppData.ContentEditor.IsDirty=!1,n.pict.AppData.ContentEditor.SaveStatus="Saved",n.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-saved",n.loadFileList(),setTimeout(function(){"Saved"===n.pict.AppData.ContentEditor.SaveStatus&&(n.pict.AppData.ContentEditor.SaveStatus="",n.pict.AppData.ContentEditor.SaveStatusClass="",n.pict.views["ContentEditor-TopBar"].render())},3e3)),n.pict.views["ContentEditor-TopBar"].render()})}}},{key:"closeCurrentFile",value:function(){this.pict.AppData.ContentEditor.CurrentFile&&(this.pict.AppData.ContentEditor.IsDirty?this._showCloseConfirmation():this._doCloseFile())}},{key:"_doCloseFile",value:function(){this._hideCloseConfirmation(),this._cleanupEditors(),this.pict.AppData.ContentEditor.CurrentFile="",this.pict.AppData.ContentEditor.ActiveEditor="markdown",this.pict.AppData.ContentEditor.IsDirty=!1,this.pict.AppData.ContentEditor.SaveStatus="",this.pict.AppData.ContentEditor.SaveStatusClass="",this.pict.AppData.ContentEditor.Document.Segments=[{Content:""}],this.pict.AppData.ContentEditor.CodeContent="",window.location.hash="",this.pict.views["ContentEditor-TopBar"].render();var t=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");t&&t[0]&&(t[0].innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#8A7F72;font-size:1.1em;">Select a file from the sidebar to begin editing</div>'),this.updateStats()}},{key:"confirmCloseFile",value:function(){this._doCloseFile()}},{key:"cancelCloseFile",value:function(){this._hideCloseConfirmation()}},{key:"_showCloseConfirmation",value:function(){var t=document.getElementById("ContentEditor-ConfirmOverlay");if(t&&t.classList.add("open"),!this._confirmKeyHandler){var e=this;this._confirmKeyHandler=function(t){var n=t.key.toLowerCase();"y"===n?(t.preventDefault(),e.confirmCloseFile()):"n"!==n&&"Escape"!==t.key||(t.preventDefault(),e.cancelCloseFile())}}window.addEventListener("keydown",this._confirmKeyHandler)}},{key:"_hideCloseConfirmation",value:function(){var t=document.getElementById("ContentEditor-ConfirmOverlay");t&&t.classList.remove("open"),this._confirmKeyHandler&&window.removeEventListener("keydown",this._confirmKeyHandler)}},{key:"createNewFile",value:function(t){if(t){t.replace(/^.*\//,"").indexOf(".")<0&&(t+=".md");var e=this.pict.providers["ContentEditor-Provider"],n=this,i="";i=t.endsWith(".md")?"# "+t.replace(/\.[^.]+$/,"").replace(/^.*\//,"")+"\n\n":"// "+t.replace(/^.*\//,"")+"\n",e.saveFile(t,i,function(e){e||n.loadFileList(null,function(){n.navigateToFile(t)})})}}},{key:"promptNewFile",value:function(){var t=prompt("Enter a name for the new file (e.g. my-page.md, script.js, style.css):");t&&t.trim()&&this.createNewFile(t.trim())}},{key:"handleF4TopicAction",value:function(){var t=this.pict.views["ContentEditor-Layout"],e=this.pict.views["ContentEditor-Topics"];if(t&&e){var n=this.pict.AppData.ContentEditor,i=n.ActiveEditor,o=n.CurrentFile,r=0,a=!1;if("markdown"===i&&o){var s=this.pict.views["ContentEditor-MarkdownEditor"];if(s&&s._segmentEditors){var l=0;for(var c in s._segmentEditors){var d=s._segmentEditors[c];if(d&&d.hasFocus){var p=d.state.selection.main.head;r=l+d.state.doc.lineAt(p).number,a=!0;break}d&&d.state&&(l+=d.state.doc.lines)}}}if(n.SidebarCollapsed&&t.toggleSidebar(),t.switchSidebarTab("topics"),a&&o){var u={TopicCode:"New-Topic",TopicHelpFilePath:o,TopicTitle:this._extractFirstHeading()||"New Topic"};r>0&&(u.RelevantMarkdownLine=r),e.addTopic(u)}}}},{key:"_extractFirstHeading",value:function(){var t=this.pict.views["ContentEditor-MarkdownEditor"];if(!t||!t._segmentEditors)return"";var e=7,n="";for(var i in t._segmentEditors){var o=t._segmentEditors[i];if(o&&o.state&&o.state.doc)for(var r=o.state.doc,a=1;a<=r.lines;a++){var s=r.line(a).text.match(/^(#{1,6})\s+(.+)/);if(s){var l=s[1].length;if(l<e&&(e=l,n=s[2].trim(),1===e))return n}}}return n}},{key:"updateStats",value:function(){var t=document.getElementById("ContentEditor-Stats");if(t){var e=this.pict.AppData.ContentEditor.ActiveEditor,n=0,i=0,o=0;if("markdown"===e){var r=this.pict.views["ContentEditor-MarkdownEditor"];if(r&&r._segmentEditors)for(var a in r._segmentEditors){var s=r._segmentEditors[a];if(s&&s.state&&s.state.doc){n+=s.state.doc.lines,i+=s.state.doc.length;var l=s.state.doc.toString().match(/\S+/g);l&&(o+=l.length)}}}else{if("code"!==e)return void(t.textContent="");var c=this.pict.views["ContentEditor-CodeEditor"];if(c&&c.codeJar){var d=c.codeJar.toString();i=d.length,n=d.split("\n").length;var p=d.match(/\S+/g);p&&(o=p.length)}}t.textContent=n+" lines · "+o+" words · "+i+" chars"}}},{key:"markDirty",value:function(){this.pict.AppData.ContentEditor.IsDirty||(this.pict.AppData.ContentEditor.IsDirty=!0,this.pict.views["ContentEditor-TopBar"].render())}},{key:"_settingsKey",get:function(){return"retold-content-editor-settings"}},{key:"saveSettings",value:function(){if("undefined"!=typeof window&&window.localStorage){var t=this.pict.AppData.ContentEditor,e={AutoSegmentMarkdown:t.AutoSegmentMarkdown,AutoSegmentDepth:t.AutoSegmentDepth,AutoContentPreview:t.AutoContentPreview,MarkdownEditingControls:t.MarkdownEditingControls,MarkdownWordWrap:t.MarkdownWordWrap,CodeWordWrap:t.CodeWordWrap,SidebarCollapsed:t.SidebarCollapsed,SidebarWidth:t.SidebarWidth,AutoPreviewImages:t.AutoPreviewImages,AutoPreviewVideo:t.AutoPreviewVideo,AutoPreviewAudio:t.AutoPreviewAudio,ShowHiddenFiles:t.ShowHiddenFiles,TopicsFilePath:t.TopicsFilePath};try{window.localStorage.setItem(this._settingsKey,JSON.stringify(e))}catch(t){this.log.warn("Failed to save settings: "+t.message)}}}},{key:"_loadSettings",value:function(){if("undefined"!=typeof window&&window.localStorage)try{var t=window.localStorage.getItem(this._settingsKey);if(!t)return;var e=JSON.parse(t),n=this.pict.AppData.ContentEditor;"boolean"==typeof e.AutoSegmentMarkdown&&(n.AutoSegmentMarkdown=e.AutoSegmentMarkdown),"number"==typeof e.AutoSegmentDepth&&(n.AutoSegmentDepth=e.AutoSegmentDepth),"boolean"==typeof e.AutoContentPreview&&(n.AutoContentPreview=e.AutoContentPreview),"boolean"==typeof e.MarkdownEditingControls&&(n.MarkdownEditingControls=e.MarkdownEditingControls),"boolean"==typeof e.MarkdownWordWrap&&(n.MarkdownWordWrap=e.MarkdownWordWrap),"boolean"==typeof e.CodeWordWrap&&(n.CodeWordWrap=e.CodeWordWrap),"boolean"==typeof e.SidebarCollapsed&&(n.SidebarCollapsed=e.SidebarCollapsed),"number"==typeof e.SidebarWidth&&(n.SidebarWidth=e.SidebarWidth),"boolean"==typeof e.AutoPreviewImages&&(n.AutoPreviewImages=e.AutoPreviewImages),"boolean"==typeof e.AutoPreviewVideo&&(n.AutoPreviewVideo=e.AutoPreviewVideo),"boolean"==typeof e.AutoPreviewAudio&&(n.AutoPreviewAudio=e.AutoPreviewAudio),"boolean"==typeof e.ShowHiddenFiles&&(n.ShowHiddenFiles=e.ShowHiddenFiles),"string"==typeof e.TopicsFilePath&&(n.TopicsFilePath=e.TopicsFilePath)}catch(t){this.log.warn("Failed to load settings: "+t.message)}}}])}(i);e.exports=h,e.exports.default_configuration=t("./Pict-Application-ContentEditor-Configuration.json")},{"./Pict-Application-ContentEditor-Configuration.json":53,"./providers/Pict-Provider-ContentEditor.js":58,"./views/PictView-Editor-CodeEditor.js":59,"./views/PictView-Editor-Layout.js":60,"./views/PictView-Editor-MarkdownEditor.js":61,"./views/PictView-Editor-MarkdownReference.js":62,"./views/PictView-Editor-SettingsPanel.js":63,"./views/PictView-Editor-TopBar.js":64,"./views/PictView-Editor-Topics.js":65,"pict-application":5,"pict-section-filebrowser":30}],55:[function(t,e,n){e.exports={Name:"Retold Content Reader",Hash:"ContentReader",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"ContentReader-Pict-Application"}}},{}],56:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){var e=this;this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"/content/",CatalogURL:"/content/retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(function(){var n=e.pict.AppData.Docuserve;return n.CoverLoaded&&n.Cover&&n.Cover.Title?document.title=n.Cover.Title.replace(/<[^>]*>/g,""):n.TopBarLoaded&&n.TopBar&&n.TopBar.Brand&&(document.title=n.TopBar.Brand.replace(/<[^>]*>/g,"")),n.TopBar?(Array.isArray(n.TopBar.ExternalLinks)||(n.TopBar.ExternalLinks=[]),n.TopBar.ExternalLinks.push({Text:"Edit",Href:"/"})):(n.TopBarLoaded=!0,n.TopBar={Brand:"Content System",NavLinks:[],ExternalLinks:[{Text:"Edit",Href:"/"}]}),e.pict.views["Docuserve-Layout"].render(),t()})}}])}(t("pict-docuserve"));e.exports=i,e.exports.default_configuration=t("./Pict-Application-ContentReader-Configuration.json")},{"./Pict-Application-ContentReader-Configuration.json":55,"pict-docuserve":10}],57:[function(t,e,n){e.exports={PictContentReader:t("./Pict-Application-ContentReader.js"),PictContentEditor:t("./Pict-Application-ContentEditor.js")},"undefined"!=typeof window&&(window.PictContentReader=e.exports.PictContentReader,window.PictContentEditor=e.exports.PictContentEditor)},{"./Pict-Application-ContentEditor.js":54,"./Pict-Application-ContentReader.js":56}],58:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"loadFile",value:function(t,e){var n=this,i="function"==typeof e?e:function(){};if(!t)return i("No file path specified","");fetch("/api/content/read/"+encodeURIComponent(t)).then(function(t){return t.ok?t.json():i("File not found: "+t.status,"")}).then(function(t){return t&&t.Success?i(null,t.Content||""):i(t?t.Error:"Unknown error","")}).catch(function(e){return n.log.warn("ContentEditor: Error loading file [".concat(t,"]: ").concat(e)),i(e.message,"")})}},{key:"saveFile",value:function(t,e,n){var i=this,o="function"==typeof n?n:function(){};if(!t)return o("No file path specified");fetch("/api/content/save/"+encodeURIComponent(t),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({Content:e})}).then(function(t){return t.ok?t.json():o("Save failed: "+t.status)}).then(function(t){return t&&t.Success?o(null):o(t?t.Error:"Unknown error")}).catch(function(e){return i.log.warn("ContentEditor: Error saving file [".concat(t,"]: ").concat(e)),o(e.message)})}},{key:"uploadImage",value:function(t,e){var n=this,i="function"==typeof e?e:function(){},o="",r=this.pict.AppData.ContentEditor.CurrentFile;if(r){var a=r.lastIndexOf("/");a>0&&(o=r.substring(0,a))}else this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var s={"Content-Type":t.type,"x-filename":t.name};o&&(s["x-upload-path"]=o),fetch("/api/content/upload-image",{method:"POST",body:t,headers:s}).then(function(t){return t.json()}).then(function(t){return t&&t.Success&&t.URL?i(null,t.URL):i(t?t.Error:"Upload failed")}).catch(function(t){return n.log.warn("ContentEditor: Image upload failed: ".concat(t)),i(t.message)})}},{key:"listUploads",value:function(t){var e=this,n="function"==typeof t?t:function(){};fetch("/api/content/uploads").then(function(t){return t.json()}).then(function(t){return t&&t.Success?n(null,t.Files||[]):n(t?t.Error:"Unknown error",[])}).catch(function(t){return e.log.warn("ContentEditor: Error listing uploads: ".concat(t)),n(t.message,[])})}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"ContentEditor-Provider",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":19}],59:[function(t,e,n){var i=t("pict-section-code"),o={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",json:"json",html:"xml",htm:"xml",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"scss",less:"less",sql:"sql",py:"python",rb:"ruby",java:"java",kt:"kotlin",kts:"kotlin",go:"go",rs:"rust",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",cs:"csharp",swift:"swift",php:"php",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",cfg:"ini",conf:"ini",dockerfile:"dockerfile",docker:"dockerfile",makefile:"makefile",mk:"makefile",md:"markdown",markdown:"markdown",lua:"lua",r:"r",pl:"perl",pm:"perl",ex:"elixir",exs:"elixir",erl:"erlang",hrl:"erlang",hs:"haskell",clj:"clojure",scala:"scala",dart:"dart",groovy:"groovy",gradle:"groovy",tf:"terraform",vim:"vim",diff:"diff",patch:"diff",log:"accesslog",txt:"plaintext"},r=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._suppressNextDirty=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterInitialRender",value:function(){if("undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.CodeJar&&this.connectCodeJarPrototype(window.CodeJarModules.CodeJar),"undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.hljs){var t=window.CodeJarModules.hljs,n=this._language;this._highlightFunction=function(e){e.removeAttribute("data-highlighted"),delete e.dataset.highlighted,e.className=e.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),e.classList.add("hljs"),n&&"plaintext"!==n&&e.classList.add("language-"+n),t.highlightElement(e)}}return _superPropGet(e,"onAfterInitialRender",this,3)([])}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,"undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.hljs){var n=window.CodeJarModules.hljs,i=t;this._highlightFunction=function(t){t.removeAttribute("data-highlighted"),delete t.dataset.highlighted,t.className=t.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),t.classList.add("hljs"),i&&"plaintext"!==i&&t.classList.add("language-"+i),n.highlightElement(t)}}if(this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var o=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this.codeJar.updateCode(o),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"onCodeChange",value:function(t){_superPropGet(e,"onCodeChange",this,3)([t]),this._suppressNextDirty?this._suppressNextDirty=!1:this.pict.PictApplication&&(this.pict.PictApplication.markDirty(),this.pict.PictApplication.updateStats())}}],[{key:"getLanguageForExtension",value:function(t){if(!t)return"plaintext";var e=t.toLowerCase();return o[e]||"plaintext"}}])}(i);e.exports=r,e.exports.default_configuration={ViewIdentifier:"ContentEditor-CodeEditor",DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#ContentEditor-Editor-Container",TargetElementAddress:"#ContentEditor-Editor-Container",CodeDataAddress:"AppData.ContentEditor.CodeContent",ReadOnly:!1,LineNumbers:!0,Language:"javascript",Tab:"\t",AutoRender:!1,Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#ContentEditor-Editor-Container"}]},e.exports.ExtensionLanguageMap=o},{"pict-section-code":22}],60:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._minSidebarWidth=140,o._maxSidebarWidth=600,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){this.pict.views["ContentEditor-TopBar"].render();var r=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");r&&r[0]&&!this.pict.AppData.ContentEditor.CurrentFile&&(r[0].innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#8A7F72;font-size:1.1em;">Select a file from the sidebar to begin editing</div>'),this.pict.CSSMap.injectCSS();var a=this.pict.AppData.ContentEditor,s=document.getElementById("ContentEditor-SidebarWrap"),l=document.getElementById("ContentEditor-SidebarToggle");s&&(s.style.width=a.SidebarWidth+"px",a.SidebarCollapsed&&(s.classList.add("collapsed"),l&&(l.innerHTML="&#x25B6;")));var c=this;return l&&l.addEventListener("click",function(){c.toggleSidebar()}),this._wireResizeHandle(),window.addEventListener("hashchange",function(){c.pict.PictApplication.resolveHash()}),window.addEventListener("keydown",function(t){if((t.metaKey||t.ctrlKey)&&"s"===t.key)return t.preventDefault(),void c.pict.PictApplication.saveCurrentFile();if("F1"===t.key)return t.preventDefault(),void c._handleF1();if("F2"===t.key)return t.preventDefault(),void c.toggleSidebar();if("F3"===t.key)return t.preventDefault(),void c.toggleUploadForm();if((t.metaKey||t.ctrlKey)&&t.shiftKey&&("u"===t.key||"U"===t.key))return t.preventDefault(),void c.toggleUploadForm();if("F4"===t.key)return t.preventDefault(),void c.pict.PictApplication.handleF4TopicAction();if((t.metaKey||t.ctrlKey)&&t.shiftKey&&("t"===t.key||"T"===t.key))return t.preventDefault(),void c.pict.PictApplication.handleF4TopicAction();if("Escape"===t.key){var e=document.getElementById("ContentEditor-UploadOverlay");if(e&&e.classList.contains("open"))return void c.closeUploadForm();var n=document.getElementById("ContentEditor-ConfirmOverlay");if(n&&n.classList.contains("open"))return;if(c.pict.AppData.ContentEditor.CurrentFile)return t.preventDefault(),void c.pict.PictApplication.closeCurrentFile()}}),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"toggleSidebar",value:function(){var t=document.getElementById("ContentEditor-SidebarWrap"),e=document.getElementById("ContentEditor-SidebarToggle");if(t){var n=this.pict.AppData.ContentEditor;n.SidebarCollapsed=!n.SidebarCollapsed,n.SidebarCollapsed?(t.classList.add("collapsed"),e&&(e.innerHTML="&#x25B6;")):(t.classList.remove("collapsed"),t.style.width=n.SidebarWidth+"px",e&&(e.innerHTML="&#x25C0;")),this.pict.PictApplication.saveSettings()}}},{key:"switchSidebarTab",value:function(t){var e={files:document.getElementById("ContentEditor-Sidebar-Container"),reference:document.getElementById("ContentEditor-SidebarReference-Container"),topics:document.getElementById("ContentEditor-SidebarTopics-Container")},n={files:document.getElementById("ContentEditor-SidebarTab-Files"),reference:document.getElementById("ContentEditor-SidebarTab-Reference"),topics:document.getElementById("ContentEditor-SidebarTab-Topics")};for(var i in e)e[i]&&(e[i].style.display="none"),n[i]&&n[i].classList.remove("active");if(e[t]&&(e[t].style.display=""),n[t]&&n[t].classList.add("active"),"reference"===t){var o=this.pict.views["ContentEditor-MarkdownReference"];o&&!o._hasRendered&&o.render()}if("topics"===t){var r=this.pict.views["ContentEditor-Topics"];r&&!r._hasRendered&&r.render()}}},{key:"_handleF1",value:function(){if(this.pict.AppData.ContentEditor.SidebarCollapsed)return this.toggleSidebar(),void this.switchSidebarTab("reference");var t=document.getElementById("ContentEditor-SidebarTab-Reference");t&&t.classList.contains("active")?this.switchSidebarTab("files"):this.switchSidebarTab("reference")}},{key:"getActiveSidebarTab",value:function(){var t=document.getElementById("ContentEditor-SidebarTab-Reference"),e=document.getElementById("ContentEditor-SidebarTab-Topics");return t&&t.classList.contains("active")?"reference":e&&e.classList.contains("active")?"topics":"files"}},{key:"toggleUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&(t.classList.contains("open")?this.closeUploadForm():this.openUploadForm())}},{key:"openUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&t.classList.add("open"),this._wireUploadDropzone()}},{key:"closeUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&t.classList.remove("open");var e=document.getElementById("ContentEditor-UploadFileInput");e&&(e.value="");var n=document.getElementById("ContentEditor-UploadStatus");n&&(n.innerHTML="");var i=document.getElementById("ContentEditor-UploadResult");i&&(i.innerHTML="")}},{key:"onUploadOverlayClick",value:function(t){"ContentEditor-UploadOverlay"===t.target.id&&this.closeUploadForm()}},{key:"onUploadFileSelected",value:function(t){t.files&&t.files.length>0&&this._uploadFile(t.files[0])}},{key:"_wireUploadDropzone",value:function(){var t=document.getElementById("ContentEditor-UploadDropzone");if(t&&!t._wired){t._wired=!0;var e=this;t.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),t.classList.add("dragover")}),t.addEventListener("dragleave",function(e){e.preventDefault(),e.stopPropagation(),t.classList.remove("dragover")}),t.addEventListener("drop",function(n){n.preventDefault(),n.stopPropagation(),t.classList.remove("dragover"),n.dataTransfer&&n.dataTransfer.files&&n.dataTransfer.files.length>0&&e._uploadFile(n.dataTransfer.files[0])})}}},{key:"_uploadFile",value:function(t){var e=document.getElementById("ContentEditor-UploadStatus"),n=document.getElementById("ContentEditor-UploadResult");if(t)if(t.type.startsWith("image/")){e&&(e.innerHTML="Uploading <strong>"+t.name+"</strong>..."),n&&(n.innerHTML="");var i=this,o=this.pict.providers["ContentEditor-Provider"];o?o.uploadImage(t,function(o,r){if(o)e&&(e.innerHTML='<span class="content-editor-upload-status-error">Upload failed: '+o+"</span>");else{e&&(e.innerHTML='<span class="content-editor-upload-status-success">Uploaded successfully!</span>');var a="!["+t.name+"]("+r+")";n&&(n.innerHTML='<div class="content-editor-upload-result"><div class="content-editor-upload-result-label">Markdown</div><div class="content-editor-upload-result-url"><span class="content-editor-upload-result-text">'+a+'</span><button class="content-editor-upload-result-copy" onclick="navigator.clipboard.writeText(\''+a.replace(/'/g,"\\'")+'\').then(function(){this.textContent=\'Copied!\'}.bind(this))">Copy</button></div><div class="content-editor-upload-result-label" style="margin-top:8px">URL</div><div class="content-editor-upload-result-url"><span class="content-editor-upload-result-text">'+r+'</span><button class="content-editor-upload-result-copy" onclick="navigator.clipboard.writeText(\''+r.replace(/'/g,"\\'")+"').then(function(){this.textContent='Copied!'}.bind(this))\">Copy</button></div></div>"),i.pict.PictApplication.loadFileList()}}):e&&(e.innerHTML='<span class="content-editor-upload-status-error">Provider not available.</span>')}else e&&(e.innerHTML='<span class="content-editor-upload-status-error">Only image files are supported.</span>')}},{key:"_wireResizeHandle",value:function(){var t=document.getElementById("ContentEditor-ResizeHandle"),e=document.getElementById("ContentEditor-SidebarWrap");if(t&&e){var n=this,i=!1,o=0,r=0;t.addEventListener("mousedown",function(l){n.pict.AppData.ContentEditor.SidebarCollapsed||(l.preventDefault(),i=!0,o=l.clientX,r=e.offsetWidth,t.classList.add("dragging"),e.style.transition="none",document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.addEventListener("mousemove",a),document.addEventListener("mouseup",s))})}function a(t){if(i){var a=t.clientX-o,s=r+a;s<n._minSidebarWidth&&(s=n._minSidebarWidth),s>n._maxSidebarWidth&&(s=n._maxSidebarWidth),e.style.width=s+"px"}}function s(){i&&(i=!1,t.classList.remove("dragging"),e.style.transition="",document.body.style.userSelect="",document.body.style.cursor="",n.pict.AppData.ContentEditor.SidebarWidth=e.offsetWidth,n.pict.PictApplication.saveSettings(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s))}}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-Layout",DefaultRenderable:"ContentEditor-Layout-Shell",DefaultDestinationAddress:"#ContentEditor-Application-Container",AutoRender:!1,CSS:"\n\t\t#ContentEditor-Application-Container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\tbackground: #F5F3EE;\n\t\t}\n\t\t#ContentEditor-TopBar-Container\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-body\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar wrapper holds the sidebar content + collapse toggle */\n\t\t.content-editor-sidebar-wrap\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tposition: relative;\n\t\t\ttransition: width 0.2s ease;\n\t\t}\n\t\t/* Inner wrapper: vertical flex for tab bar + panes */\n\t\t.content-editor-sidebar-inner\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar tab bar */\n\t\t.content-editor-sidebar-tabs\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #F5F0EA;\n\t\t}\n\t\t.content-editor-sidebar-tab\n\t\t{\n\t\t\tflex: 1;\n\t\t\tpadding: 7px 0;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-tab:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-sidebar-tab.active\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tborder-bottom-color: #2E7D74;\n\t\t}\n\t\t.content-editor-sidebar-addfile\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 30px;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 1.1rem;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, background 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-addfile:hover\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t/* Sidebar panes */\n\t\t.content-editor-sidebar-pane\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container\n\t\t{\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t/* Collapsed state */\n\t\t.content-editor-sidebar-wrap.collapsed\n\t\t{\n\t\t\twidth: 0 !important;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-inner\n\t\t{\n\t\t\tvisibility: hidden;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-resize-handle\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Collapse / expand toggle */\n\t\t.content-editor-sidebar-toggle\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: -20px;\n\t\t\twidth: 20px;\n\t\t\theight: 28px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: #FAF8F4;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-left: none;\n\t\t\tborder-radius: 0 4px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tz-index: 10;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 11px;\n\t\t\tline-height: 1;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-toggle:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-toggle\n\t\t{\n\t\t\tright: -20px;\n\t\t}\n\t\t/* Resize handle */\n\t\t.content-editor-resize-handle\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 5px;\n\t\t\tcursor: col-resize;\n\t\t\tbackground: transparent;\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\ttransition: background 0.15s;\n\t\t}\n\t\t.content-editor-resize-handle:hover,\n\t\t.content-editor-resize-handle.dragging\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tborder-right-color: #2E7D74;\n\t\t}\n\t\t/* File browser layout overrides for sidebar use */\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser\n\t\t{\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\tbackground: transparent;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-browse-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-view-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Hide size/date columns — the sidebar is too narrow for them */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-modified,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-modified\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Hide the column header bar in sidebar mode */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-header\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Editor-Container\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 44px 16px 16px 16px;\n\t\t}\n\t\t/* Code editor: fill the container and remove outer border */\n\t\t#ContentEditor-Editor-Container .pict-code-editor-wrap\n\t\t{\n\t\t\theight: calc(100% - 4px);\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t}\n\t\t#ContentEditor-Editor-Container .pict-code-editor\n\t\t{\n\t\t\tmin-height: unset;\n\t\t\theight: 100%;\n\t\t\tbackground: #FAFAFA;\n\t\t}\n\t\t/* Binary file preview */\n\t\t.binary-preview-image-wrap\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-image\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 24px;\n\t\t}\n\t\t.binary-preview-image img\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 400px;\n\t\t\tobject-fit: contain;\n\t\t\tborder-radius: 4px;\n\t\t}\n\t\t.binary-preview-card\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 20px;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 24px;\n\t\t\tmax-width: 600px;\n\t\t}\n\t\t.binary-preview-icon\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 64px;\n\t\t\theight: 64px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-radius: 8px;\n\t\t\tfont-size: 0.75rem;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #5E5549;\n\t\t\tletter-spacing: 0.5px;\n\t\t}\n\t\t.binary-preview-info\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.binary-preview-name\n\t\t{\n\t\t\tfont-size: 1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-bottom: 6px;\n\t\t\tword-break: break-all;\n\t\t}\n\t\t.binary-preview-meta\n\t\t{\n\t\t\tfont-size: 0.8rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tline-height: 1.6;\n\t\t}\n\t\t.binary-preview-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.binary-preview-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 8px 16px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.binary-preview-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.binary-preview-btn-secondary\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.binary-preview-btn-secondary:hover\n\t\t{\n\t\t\tborder-color: #8A7F72;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.binary-preview-btn-preview\n\t\t{\n\t\t\tpadding: 10px 20px;\n\t\t\tfont-size: 0.85rem;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tbackground: #FAF8F4;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 6px;\n\t\t\ttransition: background 0.15s, border-color 0.15s;\n\t\t}\n\t\t.binary-preview-btn-preview:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-color: #8A7F72;\n\t\t}\n\t\t#ContentEditor-MediaPreviewPlaceholder\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-media-wrap\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-video\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 500px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tbackground: #000;\n\t\t}\n\t\t.binary-preview-audio\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-width: 500px;\n\t\t}\n\t\t/* Image upload overlay */\n\t\t.content-editor-upload-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 1099;\n\t\t\tbackground: rgba(0, 0, 0, 0.35);\n\t\t}\n\t\t.content-editor-upload-overlay.open\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-upload-panel\n\t\t{\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 10px;\n\t\t\tbox-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);\n\t\t\twidth: 420px;\n\t\t\tmax-width: 90vw;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-upload-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 14px 18px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t}\n\t\t.content-editor-upload-title\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-upload-close\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tfont-size: 1.2rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 6px;\n\t\t\tline-height: 1;\n\t\t\tborder-radius: 4px;\n\t\t}\n\t\t.content-editor-upload-close:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t.content-editor-upload-body\n\t\t{\n\t\t\tpadding: 18px;\n\t\t}\n\t\t.content-editor-upload-dropzone\n\t\t{\n\t\t\tborder: 2px dashed #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 28px 16px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\ttransition: border-color 0.15s, background 0.15s;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.content-editor-upload-dropzone:hover,\n\t\t.content-editor-upload-dropzone.dragover\n\t\t{\n\t\t\tborder-color: #2E7D74;\n\t\t\tbackground: #F0FAF8;\n\t\t}\n\t\t.content-editor-upload-dropzone-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-upload-dropzone-text\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.content-editor-upload-dropzone-hint\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-top: 4px;\n\t\t}\n\t\t.content-editor-upload-file-input\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t.content-editor-upload-status\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\tmin-height: 20px;\n\t\t}\n\t\t.content-editor-upload-status-error\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t}\n\t\t.content-editor-upload-status-success\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.content-editor-upload-result\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tpadding: 10px 12px;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.content-editor-upload-result-label\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 4px;\n\t\t}\n\t\t.content-editor-upload-result-url\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.content-editor-upload-result-text\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-family: monospace;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #3D3229;\n\t\t\tword-break: break-all;\n\t\t}\n\t\t.content-editor-upload-result-copy\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tpadding: 4px 10px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-upload-result-copy:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.content-editor-upload-kbd\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 1px 5px;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-family: monospace;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.content-editor-upload-footer\n\t\t{\n\t\t\tpadding: 10px 18px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-align: center;\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-Layout-Shell-Template",Template:'\n<div id="ContentEditor-TopBar-Container"></div>\n<div class="content-editor-body">\n\t<div class="content-editor-sidebar-wrap" id="ContentEditor-SidebarWrap" style="width:250px">\n\t\t<div class="content-editor-sidebar-inner">\n\t\t\t<div class="content-editor-sidebar-tabs">\n\t\t\t\t<button class="content-editor-sidebar-tab active" id="ContentEditor-SidebarTab-Files"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'files\')">Files</button>\n\t\t\t\t<button class="content-editor-sidebar-tab" id="ContentEditor-SidebarTab-Reference"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'reference\')">Reference</button>\n\t\t\t\t<button class="content-editor-sidebar-tab" id="ContentEditor-SidebarTab-Topics"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'topics\')">Topics</button>\n\t\t\t\t<button class="content-editor-sidebar-addfile" title="New file"\n\t\t\t\t\tonclick="{~P~}.PictApplication.promptNewFile()">+</button>\n\t\t\t</div>\n\t\t\t<div id="ContentEditor-Sidebar-Container" class="content-editor-sidebar-pane"></div>\n\t\t\t<div id="ContentEditor-SidebarReference-Container" class="content-editor-sidebar-pane" style="display:none"></div>\n\t\t\t<div id="ContentEditor-SidebarTopics-Container" class="content-editor-sidebar-pane" style="display:none"></div>\n\t\t</div>\n\t\t<div class="content-editor-resize-handle" id="ContentEditor-ResizeHandle"></div>\n\t\t<div class="content-editor-sidebar-toggle" id="ContentEditor-SidebarToggle">&#x25C0;</div>\n\t</div>\n\t<div id="ContentEditor-Editor-Container"></div>\n</div>\n<div class="content-editor-upload-overlay" id="ContentEditor-UploadOverlay"\n\tonclick="{~P~}.views[\'ContentEditor-Layout\'].onUploadOverlayClick(event)">\n\t<div class="content-editor-upload-panel">\n\t\t<div class="content-editor-upload-header">\n\t\t\t<span class="content-editor-upload-title">Upload Image</span>\n\t\t\t<button class="content-editor-upload-close"\n\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].toggleUploadForm()">&times;</button>\n\t\t</div>\n\t\t<div class="content-editor-upload-body">\n\t\t\t<div class="content-editor-upload-dropzone" id="ContentEditor-UploadDropzone"\n\t\t\t\tonclick="document.getElementById(\'ContentEditor-UploadFileInput\').click()">\n\t\t\t\t<div class="content-editor-upload-dropzone-icon">&#x1F4F7;</div>\n\t\t\t\t<div class="content-editor-upload-dropzone-text">Drop an image here or click to browse</div>\n\t\t\t\t<div class="content-editor-upload-dropzone-hint">PNG, JPG, GIF, WebP, SVG, BMP</div>\n\t\t\t</div>\n\t\t\t<input type="file" class="content-editor-upload-file-input" id="ContentEditor-UploadFileInput"\n\t\t\t\taccept="image/png,image/jpeg,image/gif,image/webp,image/svg+xml,image/bmp"\n\t\t\t\tonchange="{~P~}.views[\'ContentEditor-Layout\'].onUploadFileSelected(this)">\n\t\t\t<div class="content-editor-upload-status" id="ContentEditor-UploadStatus"></div>\n\t\t\t<div id="ContentEditor-UploadResult"></div>\n\t\t</div>\n\t\t<div class="content-editor-upload-footer">\n\t\t\t<span class="content-editor-upload-kbd">F3</span> or\n\t\t\t<span class="content-editor-upload-kbd">Ctrl+Shift+U</span> to toggle\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-Layout-Shell",TemplateHash:"ContentEditor-Layout-Shell-Template",DestinationAddress:"#ContentEditor-Application-Container",RenderMethod:"replace"}]}},{"pict-view":52}],61:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onImageUpload",value:function(t,e,n){var i=this.pict.providers["ContentEditor-Provider"];return!!i&&(i.uploadImage(t,function(t,e){t?n(t):n(null,e)}),!0)}},{key:"customConfigureExtensions",value:function(t,e){if(this.pict.AppData.ContentEditor&&this.pict.AppData.ContentEditor.MarkdownWordWrap){var n=this._codeMirrorModules;n&&n.EditorView&&n.EditorView.lineWrapping&&t.push(n.EditorView.lineWrapping)}return t}},{key:"onContentChange",value:function(t,e){this.pict.PictApplication&&(this.pict.PictApplication.markDirty(),this.pict.PictApplication.updateStats())}}])}(t("pict-section-markdowneditor"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-MarkdownEditor",DefaultRenderable:"MarkdownEditor-Wrap",DefaultDestinationAddress:"#ContentEditor-Editor-Container",TargetElementAddress:"#ContentEditor-Editor-Container",ContentDataAddress:"AppData.ContentEditor.Document.Segments",ReadOnly:!1,EnableRichPreview:!0,AutoRender:!1,Renderables:[{RenderableHash:"MarkdownEditor-Wrap",TemplateHash:"MarkdownEditor-Container",DestinationAddress:"#ContentEditor-Editor-Container"}]}},{"pict-section-markdowneditor":50}],62:[function(t,e,n){var i={ViewIdentifier:"ContentEditor-MarkdownReference",DefaultRenderable:"ContentEditor-MarkdownReference-Display",DefaultDestinationAddress:"#ContentEditor-SidebarReference-Container",AutoRender:!1,CSS:"\n\t\t.md-ref-container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.md-ref-search-bar\n\t\t{\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 5;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t\tpadding: 6px 8px;\n\t\t\tbackground: #F5F0EA;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-search-input\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tpadding: 5px 8px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.8rem;\n\t\t\tbackground: #FFF;\n\t\t\tcolor: #3D3229;\n\t\t\toutline: none;\n\t\t}\n\t\t.md-ref-search-input:focus\n\t\t{\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.md-ref-search-nav\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\twidth: 26px;\n\t\t\theight: 26px;\n\t\t\tcursor: pointer;\n\t\t\tcolor: #5E5549;\n\t\t\tfont-size: 0.7rem;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-search-nav:hover\n\t\t{\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.md-ref-search-nav:disabled\n\t\t{\n\t\t\topacity: 0.3;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.md-ref-search-count\n\t\t{\n\t\t\tfont-size: 0.7rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\tmin-width: 32px;\n\t\t\ttext-align: center;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-content\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 12px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tline-height: 1.6;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.md-ref-content h2\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tmargin: 20px 0 8px 0;\n\t\t\tpadding-bottom: 4px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.md-ref-content h2:first-child\n\t\t{\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.md-ref-content h3\n\t\t{\n\t\t\tfont-size: 0.85rem;\n\t\t\tmargin: 14px 0 6px 0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.md-ref-content p\n\t\t{\n\t\t\tmargin: 6px 0;\n\t\t}\n\t\t.md-ref-content code\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tpadding: 1px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.md-ref-content pre\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tpadding: 8px 10px;\n\t\t\toverflow-x: auto;\n\t\t\tfont-size: 0.76rem;\n\t\t\tline-height: 1.5;\n\t\t\tmargin: 6px 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.md-ref-content pre code\n\t\t{\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.md-ref-copy-btn\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 4px;\n\t\t\tright: 4px;\n\t\t\tbackground: #FAF8F4;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 2px 6px;\n\t\t\tfont-size: 0.65rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.md-ref-content pre:hover .md-ref-copy-btn\n\t\t{\n\t\t\topacity: 1;\n\t\t}\n\t\t.md-ref-copy-btn:hover\n\t\t{\n\t\t\tbackground: #EDE9E3;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t/* Search highlight */\n\t\tmark.md-ref-highlight\n\t\t{\n\t\t\tbackground: #FFEAA7;\n\t\t\tcolor: inherit;\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 2px;\n\t\t}\n\t\tmark.md-ref-highlight-active\n\t\t{\n\t\t\tbackground: #E8A94D;\n\t\t\tcolor: #FFF;\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-MarkdownReference-Template",Template:'\n<div class="md-ref-container">\n\t<div class="md-ref-search-bar">\n\t\t<input type="text" class="md-ref-search-input"\n\t\t\tid="ContentEditor-MdRef-SearchInput"\n\t\t\tplaceholder="Search reference..."\n\t\t\toninput="{~P~}.views[\'ContentEditor-MarkdownReference\'].onSearchInput(this.value)"\n\t\t\tonkeydown="{~P~}.views[\'ContentEditor-MarkdownReference\'].onSearchKeydown(event)">\n\t\t<span class="md-ref-search-count" id="ContentEditor-MdRef-SearchCount"></span>\n\t\t<button class="md-ref-search-nav" id="ContentEditor-MdRef-SearchPrev"\n\t\t\tonclick="{~P~}.views[\'ContentEditor-MarkdownReference\'].navigateMatch(-1)" disabled>&#x25B2;</button>\n\t\t<button class="md-ref-search-nav" id="ContentEditor-MdRef-SearchNext"\n\t\t\tonclick="{~P~}.views[\'ContentEditor-MarkdownReference\'].navigateMatch(1)" disabled>&#x25BC;</button>\n\t</div>\n\t<div class="md-ref-content" id="ContentEditor-MdRef-Content">\n\n<h2>Headings</h2>\n<p>Use <code>#</code> through <code>######</code> for heading levels 1&ndash;6.</p>\n<pre><code># Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Emphasis</h2>\n<p>Bold, italic, strikethrough, and combinations.</p>\n<pre><code>**bold text**\n*italic text*\n***bold and italic***\n~~strikethrough~~\n**bold and ~~strikethrough~~**</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Inline Code</h2>\n<p>Wrap text in backticks for inline code.</p>\n<pre><code>Use `console.log()` to debug.\nUse ``double backticks for `literal` backticks``.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Links</h2>\n<p>Inline links, reference links, and autolinks.</p>\n<pre><code>[Link text](https://example.com)\n[Link with title](https://example.com "Title text")\n\n[Reference link][1]\n[1]: https://example.com\n\nAutolink: https://example.com\nEmail: user@example.com</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Images</h2>\n<pre><code>![Alt text](image.png)\n![Alt text](image.png "Image title")\n\n[![Linked image](image.png)](https://example.com)</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Unordered Lists</h2>\n<p>Use <code>-</code>, <code>*</code>, or <code>+</code> for bullet items.</p>\n<pre><code>- Item one\n- Item two\n - Nested item\n - Another nested\n - Deeply nested\n- Item three</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Ordered Lists</h2>\n<pre><code>1. First item\n2. Second item\n3. Third item\n 1. Sub-item A\n 2. Sub-item B</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Task Lists</h2>\n<pre><code>- [x] Completed task\n- [ ] Incomplete task\n- [ ] Another task</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Blockquotes</h2>\n<pre><code>&gt; This is a blockquote.\n&gt;\n&gt; It can span multiple paragraphs.\n&gt;\n&gt;&gt; Nested blockquote.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Code Blocks</h2>\n<p>Use triple backticks with an optional language identifier.</p>\n<pre><code>```javascript\nfunction hello()\n{\n console.log("Hello, world!");\n}\n```\n\n```python\ndef hello():\n print("Hello, world!")\n```\n\n```css\n.container {\n display: flex;\n gap: 16px;\n}\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Tables</h2>\n<p>Use pipes and hyphens. Colons control alignment.</p>\n<pre><code>| Left Align | Center Align | Right Align |\n|:-----------|:------------:|------------:|\n| Cell 1 | Cell 2 | Cell 3 |\n| Cell 4 | Cell 5 | Cell 6 |</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Horizontal Rules</h2>\n<p>Three or more hyphens, asterisks, or underscores.</p>\n<pre><code>---\n\n***\n\n___</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Footnotes</h2>\n<pre><code>Here is a footnote reference[^1] and another[^note].\n\n[^1]: This is the footnote content.\n[^note]: Footnotes can have any label.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>HTML in Markdown</h2>\n<p>Raw HTML is allowed in GitHub-Flavored Markdown.</p>\n<pre><code>&lt;details&gt;\n&lt;summary&gt;Click to expand&lt;/summary&gt;\n\nHidden content here.\n\n&lt;/details&gt;\n\n&lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;S&lt;/kbd&gt; to save.\n\n&lt;mark&gt;Highlighted text&lt;/mark&gt;\n\n&lt;sup&gt;superscript&lt;/sup&gt; and &lt;sub&gt;subscript&lt;/sub&gt;</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Escaping Characters</h2>\n<p>Backslash-escape special markdown characters.</p>\n<pre><code>\\*not italic\\*\n\\# not a heading\n\\[not a link\\](url)\n\\`not code\\`</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Line Breaks</h2>\n<pre><code>End a line with two spaces\nto create a line break.\n\nOr use a blank line\n\nfor a new paragraph.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>KaTeX &mdash; Inline Math</h2>\n<p>Wrap expressions with single dollar signs for inline math.</p>\n<pre><code>The equation $E = mc^2$ is famous.\n\nThe quadratic formula is $x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$.\n\nGreek letters: $\\alpha$, $\\beta$, $\\gamma$, $\\delta$, $\\theta$, $\\pi$.\n\nSubscripts and superscripts: $x_i^2$ and $a_{n+1}$.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>KaTeX &mdash; Display Math</h2>\n<p>Use double dollar signs on their own lines for display (block) math.</p>\n\n<h3>Integral</h3>\n<pre><code>$$\n\\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Summation</h3>\n<pre><code>$$\n\\sum_{n=1}^{\\infty} \\frac{1}{n^2} = \\frac{\\pi^2}{6}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Matrix</h3>\n<pre><code>$$\n\\begin{bmatrix}\na &amp; b \\\\\nc &amp; d\n\\end{bmatrix}\n\\begin{bmatrix}\nx \\\\\ny\n\\end{bmatrix}\n=\n\\begin{bmatrix}\nax + by \\\\\ncx + dy\n\\end{bmatrix}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Aligned Equations</h3>\n<pre><code>$$\n\\begin{aligned}\nf(x) &amp;= x^2 + 2x + 1 \\\\\n &amp;= (x + 1)^2\n\\end{aligned}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Cases (Piecewise)</h3>\n<pre><code>$$\nf(x) = \\begin{cases}\nx^2 &amp; \\text{if } x \\geq 0 \\\\\n-x^2 &amp; \\text{if } x &lt; 0\n\\end{cases}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Fractions &amp; Limits</h3>\n<pre><code>$$\n\\lim_{x \\to 0} \\frac{\\sin x}{x} = 1\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid &mdash; Flowchart</h2>\n<pre><code>```mermaid\ngraph TD\n A[Start] --&gt; B{Decision}\n B --&gt;|Yes| C[Do something]\n B --&gt;|No| D[Do something else]\n C --&gt; E[End]\n D --&gt; E\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid &mdash; Sequence Diagram</h2>\n<pre><code>```mermaid\nsequenceDiagram\n participant A as Alice\n participant B as Bob\n A-&gt;&gt;B: Hello Bob\n B--&gt;&gt;A: Hi Alice\n A-&gt;&gt;B: How are you?\n B--&gt;&gt;A: Great!\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid &mdash; Gantt Chart</h2>\n<pre><code>```mermaid\ngantt\n title Project Timeline\n dateFormat YYYY-MM-DD\n section Phase 1\n Research :a1, 2024-01-01, 30d\n Design :a2, after a1, 20d\n section Phase 2\n Development :b1, after a2, 40d\n Testing :b2, after b1, 15d\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid &mdash; Class Diagram</h2>\n<pre><code>```mermaid\nclassDiagram\n Animal &lt;|-- Duck\n Animal &lt;|-- Fish\n Animal : +int age\n Animal : +String gender\n Animal : +swim()\n Duck : +String beakColor\n Duck : +quack()\n Fish : +int sizeInFeet\n Fish : +canEat()\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid &mdash; State Diagram</h2>\n<pre><code>```mermaid\nstateDiagram-v2\n [*] --&gt; Idle\n Idle --&gt; Processing : Start\n Processing --&gt; Done : Complete\n Processing --&gt; Error : Fail\n Error --&gt; Idle : Reset\n Done --&gt; [*]\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-MarkdownReference-Display",TemplateHash:"ContentEditor-MarkdownReference-Template",DestinationAddress:"#ContentEditor-SidebarReference-Container",RenderMethod:"replace"}]},o=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._hasRendered=!1,o._searchMatches=[],o._currentMatchIndex=-1,o._originalContent="",o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){this._hasRendered=!0;var r=document.getElementById("ContentEditor-MdRef-Content");return r&&(this._originalContent=r.innerHTML),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"copyCodeBlock",value:function(t){var e=t.closest("pre");if(e){var n=e.querySelector("code");if(n){var i=n.textContent;navigator.clipboard&&navigator.clipboard.writeText(i).then(function(){t.textContent="Copied!",setTimeout(function(){t.textContent="Copy"},1500)})}}}},{key:"onSearchInput",value:function(t){this._performSearch(t)}},{key:"onSearchKeydown",value:function(t){"Enter"===t.key&&(t.preventDefault(),t.shiftKey?this.navigateMatch(-1):this.navigateMatch(1)),"Escape"===t.key&&(t.target.value="",this._clearSearch())}},{key:"navigateMatch",value:function(t){if(0!==this._searchMatches.length){this._currentMatchIndex>=0&&this._searchMatches[this._currentMatchIndex]&&this._searchMatches[this._currentMatchIndex].classList.remove("md-ref-highlight-active"),this._currentMatchIndex+=t,this._currentMatchIndex>=this._searchMatches.length&&(this._currentMatchIndex=0),this._currentMatchIndex<0&&(this._currentMatchIndex=this._searchMatches.length-1);var e=this._searchMatches[this._currentMatchIndex];e.classList.add("md-ref-highlight-active"),e.scrollIntoView({behavior:"smooth",block:"center"}),this._updateSearchCount()}}},{key:"_performSearch",value:function(t){var e=document.getElementById("ContentEditor-MdRef-Content");if(e){if(e.innerHTML=this._originalContent,this._searchMatches=[],this._currentMatchIndex=-1,!t||t.length<2)return this._updateSearchCount(),void this._updateNavButtons();for(var n,i=t.toLowerCase(),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),r=[];n=o.nextNode();)n.nodeValue.toLowerCase().indexOf(i)>=0&&r.push(n);for(var a=0;a<r.length;a++)this._highlightTextNode(r[a],i);this._searchMatches=Array.from(e.querySelectorAll("mark.md-ref-highlight")),this._searchMatches.length>0&&(this._currentMatchIndex=0,this._searchMatches[0].classList.add("md-ref-highlight-active"),this._searchMatches[0].scrollIntoView({behavior:"smooth",block:"center"})),this._updateSearchCount(),this._updateNavButtons()}}},{key:"_highlightTextNode",value:function(t,e){for(var n=t.nodeValue,i=n.toLowerCase(),o=t.parentNode,r=document.createDocumentFragment(),a=0,s=i.indexOf(e);s>=0;){s>a&&r.appendChild(document.createTextNode(n.substring(a,s)));var l=document.createElement("mark");l.className="md-ref-highlight",l.textContent=n.substring(s,s+e.length),r.appendChild(l),a=s+e.length,s=i.indexOf(e,a)}a<n.length&&r.appendChild(document.createTextNode(n.substring(a))),o.replaceChild(r,t)}},{key:"_updateSearchCount",value:function(){var t=document.getElementById("ContentEditor-MdRef-SearchCount");if(t)if(0===this._searchMatches.length){var e=document.getElementById("ContentEditor-MdRef-SearchInput");e&&e.value&&e.value.length>=2?t.textContent="0":t.textContent=""}else t.textContent=this._currentMatchIndex+1+"/"+this._searchMatches.length}},{key:"_updateNavButtons",value:function(){var t=document.getElementById("ContentEditor-MdRef-SearchPrev"),e=document.getElementById("ContentEditor-MdRef-SearchNext"),n=this._searchMatches.length>0;t&&(t.disabled=!n),e&&(e.disabled=!n)}},{key:"_clearSearch",value:function(){var t=document.getElementById("ContentEditor-MdRef-Content");t&&this._originalContent&&(t.innerHTML=this._originalContent),this._searchMatches=[],this._currentMatchIndex=-1,this._updateSearchCount(),this._updateNavButtons()}}])}(t("pict-view"));e.exports=o,e.exports.default_configuration=i},{"pict-view":52}],63:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._isOpen=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.AppData.ContentEditor,a=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-MarkdownWordWrap");a&&a[0]&&(a[0].checked=r.MarkdownWordWrap);var s=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-CodeWordWrap");s&&s[0]&&(s[0].checked=r.CodeWordWrap);var l=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-EditingControls");l&&l[0]&&(l[0].checked=r.MarkdownEditingControls);var c=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreview");c&&c[0]&&(c[0].checked=r.AutoContentPreview);var d=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoSegment");d&&d[0]&&(d[0].checked=r.AutoSegmentMarkdown);var p=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-SegmentDepth");p&&p[0]&&(p[0].value=String(r.AutoSegmentDepth),p[0].disabled=!r.AutoSegmentMarkdown);var u=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewImages");u&&u[0]&&(u[0].checked=r.AutoPreviewImages);var h=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewVideo");h&&h[0]&&(h[0].checked=r.AutoPreviewVideo);var f=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewAudio");f&&f[0]&&(f[0].checked=r.AutoPreviewAudio);var v=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-ShowHiddenFiles");return v&&v[0]&&(v[0].checked=r.ShowHiddenFiles),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"togglePanel",value:function(){this._isOpen?this.closePanel():this.openPanel()}},{key:"openPanel",value:function(){this._isOpen=!0;var t=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsFlyout"),e=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsOverlay"),n=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsGear");t&&t[0]&&t[0].classList.add("open"),e&&e[0]&&e[0].classList.add("open"),n&&n[0]&&n[0].classList.add("active")}},{key:"closePanel",value:function(){this._isOpen=!1;var t=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsFlyout"),e=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsOverlay"),n=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsGear");t&&t[0]&&t[0].classList.remove("open"),e&&e[0]&&e[0].classList.remove("open"),n&&n[0]&&n[0].classList.remove("active")}},{key:"onMarkdownWordWrapChanged",value:function(t){this.pict.AppData.ContentEditor.MarkdownWordWrap=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];if(e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e._segmentEditors)for(var n in e._segmentEditors){var i=e._segmentEditors[n];i&&i.contentDOM&&(t?i.contentDOM.classList.add("cm-lineWrapping"):i.contentDOM.classList.remove("cm-lineWrapping"))}}},{key:"onCodeWordWrapChanged",value:function(t){this.pict.AppData.ContentEditor.CodeWordWrap=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-CodeEditor"];e&&e._editorElement&&"code"===this.pict.AppData.ContentEditor.ActiveEditor&&(t?(e._editorElement.style.whiteSpace="pre-wrap",e._editorElement.style.overflowWrap="break-word"):(e._editorElement.style.whiteSpace="pre",e._editorElement.style.overflowWrap="normal"))}},{key:"onEditingControlsChanged",value:function(t){this.pict.AppData.ContentEditor.MarkdownEditingControls=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e.toggleControls(t)}},{key:"onAutoPreviewChanged",value:function(t){this.pict.AppData.ContentEditor.AutoContentPreview=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoSegmentChanged",value:function(t){this.pict.AppData.ContentEditor.AutoSegmentMarkdown=t,this.pict.PictApplication.saveSettings();var e=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-SegmentDepth");e&&e[0]&&(e[0].disabled=!t)}},{key:"onSegmentDepthChanged",value:function(t){this.pict.AppData.ContentEditor.AutoSegmentDepth=parseInt(t,10)||1,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewImagesChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewImages=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewVideoChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewVideo=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewAudioChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewAudio=t,this.pict.PictApplication.saveSettings()}},{key:"onShowHiddenFilesChanged",value:function(t){this.pict.AppData.ContentEditor.ShowHiddenFiles=t,this.pict.PictApplication.saveSettings();var e=this;this.pict.PictApplication.syncHiddenFilesSetting(function(){e.pict.PictApplication.loadFileList()})}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-SettingsPanel",DefaultRenderable:"ContentEditor-SettingsPanel-Display",DefaultDestinationAddress:"#ContentEditor-SettingsPanel-Container",AutoRender:!1,CSS:"\n\t\t.content-editor-settings-wrap\n\t\t{\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.content-editor-settings-gear\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 6px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder-radius: 4px;\n\t\t\tcolor: #B8AFA4;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-settings-gear:hover,\n\t\t.content-editor-settings-gear.active\n\t\t{\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.content-editor-settings-gear svg\n\t\t{\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t\t/* Flyout overlay — covers viewport to catch clicks outside */\n\t\t.content-editor-settings-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 999;\n\t\t}\n\t\t.content-editor-settings-overlay.open\n\t\t{\n\t\t\tdisplay: block;\n\t\t}\n\t\t/* Flyout panel */\n\t\t.content-editor-settings-flyout\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 44px;\n\t\t\tright: 0;\n\t\t\twidth: 270px;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tbox-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n\t\t\tz-index: 1000;\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(-4px);\n\t\t\tpointer-events: none;\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t}\n\t\t.content-editor-settings-flyout.open\n\t\t{\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t/* Speech bubble arrow */\n\t\t.content-editor-settings-flyout::before\n\t\t{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: -7px;\n\t\t\tright: 12px;\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t\tbackground: #FFF;\n\t\t\tborder-left: 1px solid #DDD6CA;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\ttransform: rotate(45deg);\n\t\t}\n\t\t.content-editor-settings-flyout-body\n\t\t{\n\t\t\tpadding: 8px;\n\t\t}\n\t\t.content-editor-settings-flyout-link\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpadding: 10px 12px;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 0.85rem;\n\t\t\tfont-weight: 500;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.content-editor-settings-flyout-link:hover\n\t\t{\n\t\t\tbackground: #F5F3EE;\n\t\t}\n\t\t.content-editor-settings-flyout-link svg\n\t\t{\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tflex-shrink: 0;\n\t\t\tfill: #8A7F72;\n\t\t}\n\t\t.content-editor-settings-divider\n\t\t{\n\t\t\theight: 1px;\n\t\t\tbackground: #EDE9E3;\n\t\t\tmargin: 4px 8px;\n\t\t}\n\t\t/* Settings controls */\n\t\t.content-editor-settings-section\n\t\t{\n\t\t\tpadding: 8px 12px;\n\t\t}\n\t\t.content-editor-settings-label\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.content-editor-settings-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 8px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-settings-row:last-child\n\t\t{\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.content-editor-settings-checkbox\n\t\t{\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\taccent-color: #2E7D74;\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-settings-checkbox-label\n\t\t{\n\t\t\tfont: inherit;\n\t\t\tfont-size: 0.85rem;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.content-editor-settings-select\n\t\t{\n\t\t\twidth: 140px;\n\t\t\tpadding: 5px 8px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: #FFF;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-settings-select:disabled\n\t\t{\n\t\t\topacity: 0.45;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.content-editor-settings-select-label\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-SettingsPanel-Template",Template:'\n<div class="content-editor-settings-wrap">\n\t<button class="content-editor-settings-gear" id="ContentEditor-SettingsGear"\n\t\tonclick="{~P~}.views[\'ContentEditor-SettingsPanel\'].togglePanel()">\n\t\t<svg viewBox="0 0 24 24"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.48.48 0 0 0-.48-.41h-3.84a.48.48 0 0 0-.48.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 0 0-.59.22L2.74 8.87a.48.48 0 0 0 .12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.26.41.48.41h3.84c.24 0 .44-.17.48-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6A3.6 3.6 0 1 1 12 8.4a3.6 3.6 0 0 1 0 7.2z"/></svg>\n\t</button>\n\t<div class="content-editor-settings-overlay" id="ContentEditor-SettingsOverlay"\n\t\tonclick="{~P~}.views[\'ContentEditor-SettingsPanel\'].closePanel()"></div>\n\t<div class="content-editor-settings-flyout" id="ContentEditor-SettingsFlyout">\n\t\t<div class="content-editor-settings-flyout-body">\n\t\t\t<a class="content-editor-settings-flyout-link"\n\t\t\t\thref="/preview.html{~D:AppData.ContentEditor.ViewerHash~}" target="_blank">\n\t\t\t\t<svg viewBox="0 0 24 24"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>\n\t\t\t\tDocuserve Preview\n\t\t\t</a>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Word Wrap</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-MarkdownWordWrap">Markdown Word Wrap</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-MarkdownWordWrap"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onMarkdownWordWrapChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-CodeWordWrap">Code Word Wrap</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-CodeWordWrap"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onCodeWordWrapChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Markdown Editor</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-EditingControls">Editing Controls</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-EditingControls"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onEditingControlsChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreview">Auto Content Preview</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreview"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoSegment">Auto Segment Markdown</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoSegment"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoSegmentChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<span class="content-editor-settings-select-label">Segment Depth</span>\n\t\t\t\t\t<select class="content-editor-settings-select"\n\t\t\t\t\t\tid="ContentEditor-Setting-SegmentDepth"\n\t\t\t\t\t\tdisabled\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onSegmentDepthChanged(this.value)">\n\t\t\t\t\t\t<option value="1">Depth 1: Blocks</option>\n\t\t\t\t\t\t<option value="2">Depth 2: ##</option>\n\t\t\t\t\t\t<option value="3">Depth 3: ###</option>\n\t\t\t\t\t\t<option value="4">Depth 4: ####</option>\n\t\t\t\t\t\t<option value="5">Depth 5: #####</option>\n\t\t\t\t\t\t<option value="6">Depth 6: ######</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Media Preview</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewImages">Auto-Preview Images</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewImages"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewImagesChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewVideo">Auto-Preview Video</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewVideo"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewVideoChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewAudio">Auto-Preview Audio</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewAudio"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewAudioChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">File Browser</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-ShowHiddenFiles">Show Hidden Files</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-ShowHiddenFiles"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onShowHiddenFilesChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-SettingsPanel-Display",TemplateHash:"ContentEditor-SettingsPanel-Template",DestinationAddress:"#ContentEditor-SettingsPanel-Container",RenderMethod:"replace"}]}},{"pict-view":52}],64:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onBeforeRender",value:function(t,n,i){var o=this.pict.AppData.ContentEditor;if(o.DirtyIndicatorHTML=o.IsDirty?' <span class="content-editor-dirty-indicator">*</span>':"",o.SaveDisabledAttr=!o.CurrentFile||o.IsSaving?"disabled":"",o.SaveVisibilityAttr=o.IsDirty||o.IsSaving||o.SaveStatus?"":'style="display:none"',o.CloseVisibilityAttr=o.CurrentFile?"":'style="display:none"',o.CurrentFile){var r=o.CurrentFile.replace(/\.md$/,"");o.ViewerHash="#/page/"+r}else o.ViewerHash="";return _superPropGet(e,"onBeforeRender",this,3)([t,n,i])}},{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.views["ContentEditor-SettingsPanel"];return r&&r.render(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-TopBar",DefaultRenderable:"ContentEditor-TopBar-Display",DefaultDestinationAddress:"#ContentEditor-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.content-editor-topbar\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0;\n\t\t\theight: 48px;\n\t\t\tborder-bottom: 3px solid #2E7D74;\n\t\t\tposition: relative;\n\t\t}\n\t\t.content-editor-topbar-brand\n\t\t{\n\t\t\tpadding: 0 16px;\n\t\t\tfont-size: 1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #E8E0D4;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t/* Centered file name — absolutely positioned so it stays\n\t\t centered in the full bar regardless of left/right content */\n\t\t.content-editor-topbar-file\n\t\t{\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t\tmax-width: 50%;\n\t\t\ttext-align: center;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.content-editor-topbar-filename\n\t\t{\n\t\t\tfont-size: 0.9rem;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: #E8E0D4;\n\t\t\tletter-spacing: 0.2px;\n\t\t}\n\t\t.content-editor-topbar-file .content-editor-dirty-indicator\n\t\t{\n\t\t\tcolor: #E8A94D;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t/* Left spacer pushes actions to the right */\n\t\t.content-editor-topbar-spacer\n\t\t{\n\t\t\tflex: 1;\n\t\t}\n\t\t.content-editor-topbar-status\n\t\t{\n\t\t\tpadding: 0 12px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-status-saving\n\t\t{\n\t\t\tcolor: #E8A94D;\n\t\t}\n\t\t.content-editor-status-saved\n\t\t{\n\t\t\tcolor: #7BC47F;\n\t\t}\n\t\t.content-editor-status-error\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t}\n\t\t.content-editor-topbar-stats\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\tpadding: 0 8px;\n\t\t\tflex-shrink: 0;\n\t\t\tletter-spacing: 0.2px;\n\t\t}\n\t\t.content-editor-topbar-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpadding: 0 12px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-topbar-btn\n\t\t{\n\t\t\tpadding: 6px 14px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.content-editor-topbar-btn-save\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.content-editor-topbar-btn-save:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.content-editor-topbar-btn-save:disabled\n\t\t{\n\t\t\tbackground: #5E5549;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.content-editor-topbar-btn-close\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #B8AFA4;\n\t\t\tborder: 1px solid #5E5549;\n\t\t}\n\t\t.content-editor-topbar-btn-close:hover\n\t\t{\n\t\t\tcolor: #E8E0D4;\n\t\t\tborder-color: #8A7F72;\n\t\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\t}\n\t\t/* Close-file confirmation overlay */\n\t\t.content-editor-confirm-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 1099;\n\t\t\tbackground: rgba(0, 0, 0, 0.35);\n\t\t}\n\t\t.content-editor-confirm-overlay.open\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-confirm-panel\n\t\t{\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 10px;\n\t\t\tbox-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);\n\t\t\twidth: 360px;\n\t\t\tmax-width: 90vw;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-confirm-body\n\t\t{\n\t\t\tpadding: 24px 22px 16px;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.content-editor-confirm-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tmargin-bottom: 8px;\n\t\t\tcolor: #E8A94D;\n\t\t}\n\t\t.content-editor-confirm-title\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-confirm-message\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-bottom: 16px;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.content-editor-confirm-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 10px;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-confirm-btn\n\t\t{\n\t\t\tpadding: 8px 20px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 5px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-confirm-btn-discard\n\t\t{\n\t\t\tbackground: #D9534F;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.content-editor-confirm-btn-discard:hover\n\t\t{\n\t\t\tbackground: #C9302C;\n\t\t}\n\t\t.content-editor-confirm-btn-cancel\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.content-editor-confirm-btn-cancel:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t.content-editor-confirm-footer\n\t\t{\n\t\t\tpadding: 10px 22px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.content-editor-confirm-kbd\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 1px 5px;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-family: monospace;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-TopBar-Template",Template:'\n<div class="content-editor-topbar">\n\t<div class="content-editor-topbar-brand">Content Editor</div>\n\t<div class="content-editor-topbar-file">\n\t\t<span class="content-editor-topbar-filename">{~D:AppData.ContentEditor.CurrentFile~}</span>{~D:AppData.ContentEditor.DirtyIndicatorHTML~}\n\t</div>\n\t<div class="content-editor-topbar-spacer"></div>\n\t<div class="content-editor-topbar-status {~D:AppData.ContentEditor.SaveStatusClass~}">\n\t\t{~D:AppData.ContentEditor.SaveStatus~}\n\t</div>\n\t<span class="content-editor-topbar-stats" id="ContentEditor-Stats"></span>\n\t<div class="content-editor-topbar-actions">\n\t\t<button class="content-editor-topbar-btn content-editor-topbar-btn-save"\n\t\t\tonclick="{~P~}.PictApplication.saveCurrentFile()"\n\t\t\t{~D:AppData.ContentEditor.SaveDisabledAttr~} {~D:AppData.ContentEditor.SaveVisibilityAttr~}>Save</button>\n\t\t<button class="content-editor-topbar-btn content-editor-topbar-btn-close"\n\t\t\tonclick="{~P~}.PictApplication.closeCurrentFile()"\n\t\t\t{~D:AppData.ContentEditor.CloseVisibilityAttr~}>Close</button>\n\t\t<div id="ContentEditor-SettingsPanel-Container"></div>\n\t</div>\n</div>\n<div class="content-editor-confirm-overlay" id="ContentEditor-ConfirmOverlay"\n\tonclick="{~P~}.PictApplication.cancelCloseFile()">\n\t<div class="content-editor-confirm-panel" onclick="event.stopPropagation()">\n\t\t<div class="content-editor-confirm-body">\n\t\t\t<div class="content-editor-confirm-icon">&#x26A0;</div>\n\t\t\t<div class="content-editor-confirm-title">Unsaved Changes</div>\n\t\t\t<div class="content-editor-confirm-message">\n\t\t\t\tThis file has unsaved changes.<br>Close without saving?\n\t\t\t</div>\n\t\t\t<div class="content-editor-confirm-actions">\n\t\t\t\t<button class="content-editor-confirm-btn content-editor-confirm-btn-discard"\n\t\t\t\t\tonclick="{~P~}.PictApplication.confirmCloseFile()">Discard &amp; Close</button>\n\t\t\t\t<button class="content-editor-confirm-btn content-editor-confirm-btn-cancel"\n\t\t\t\t\tonclick="{~P~}.PictApplication.cancelCloseFile()">Cancel</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="content-editor-confirm-footer">\n\t\t\t<span class="content-editor-confirm-kbd">Y</span> to discard &middot;\n\t\t\t<span class="content-editor-confirm-kbd">N</span> or\n\t\t\t<span class="content-editor-confirm-kbd">Esc</span> to cancel\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-TopBar-Display",TemplateHash:"ContentEditor-TopBar-Template",DestinationAddress:"#ContentEditor-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":52}],65:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._topics={},o._topicsFilePath="",o._hasRendered=!1,o._editingTopicCode=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(){this._hasRendered=!0,this.pict.CSSMap.injectCSS(),this._topicsFilePath?(this._updateHeaderTitle(),this.renderTopicList()):this._showEmptyState()}},{key:"loadTopicsFile",value:function(t,e){var n="function"==typeof e?e:function(){},i=this;if(!t)return n("No path specified");var o=this.pict.providers["ContentEditor-Provider"];if(!o)return n("Provider not available");o.loadFile(t,function(e,o){if(e)return i._topics={},i._topicsFilePath="",i._hasRendered&&i._showEmptyState(),n(e);try{var r=JSON.parse(o);"object"!==_typeof(r)||null===r||Array.isArray(r)?i._topics={}:i._topics=r}catch(t){i._topics={},i.log.warn("ContentEditor-Topics: Failed to parse topics JSON: "+t.message)}return i._topicsFilePath=t,i.pict.AppData.ContentEditor.TopicsFilePath=t,i.pict.PictApplication.saveSettings(),i._hasRendered&&(i._updateHeaderTitle(),i.renderTopicList(),i._showFooter(!0)),n(null)})}},{key:"saveTopicsFile",value:function(t){var e="function"==typeof t?t:function(){};if(!this._topicsFilePath)return e("No topics file loaded");var n=this.pict.providers["ContentEditor-Provider"];if(!n)return e("Provider not available");var i=JSON.stringify(this._topics,null,"\t");n.saveFile(this._topicsFilePath,i,e)}},{key:"closeTopicsFile",value:function(){this._topics={},this._topicsFilePath="",this._editingTopicCode=null,this.pict.AppData.ContentEditor.TopicsFilePath="",this.pict.PictApplication.saveSettings(),this._hasRendered&&this._showEmptyState()}},{key:"addTopic",value:function(t){var e=this;if(this._topicsFilePath){var n=t||{},i=n.TopicCode||this._generateUniqueCode("New-Topic"),o={TopicCode:i,TopicHelpFilePath:n.TopicHelpFilePath||"",TopicTitle:n.TopicTitle||""};"number"==typeof n.RelevantMarkdownLine&&(o.RelevantMarkdownLine=n.RelevantMarkdownLine),this._topics[i]=o;var r=this;this.saveTopicsFile(function(){r.renderTopicList(),r.startEditTopic(i)})}else this._createDefaultTopicsFile(function(){e.addTopic(t)})}},{key:"removeTopic",value:function(t){if(t&&this._topics[t]&&confirm('Remove topic "'+t+'"?')){delete this._topics[t],this._editingTopicCode=null;var e=this;this.saveTopicsFile(function(){e.renderTopicList()})}}},{key:"startEditTopic",value:function(t){if(t&&this._topics[t]){this._editingTopicCode=t,this.renderTopicList();var e=document.getElementById("topics-edit-code");e&&(e.focus(),e.select())}}},{key:"saveEditTopic",value:function(t){if(t&&this._topics[t]){var e=document.getElementById("topics-edit-code"),n=document.getElementById("topics-edit-title"),i=document.getElementById("topics-edit-path"),o=document.getElementById("topics-edit-line");if(e){var r=e.value.trim(),a=n?n.value.trim():"",s=i?i.value.trim():"",l=o?parseInt(o.value,10):NaN;if(r){if(r!==t&&this._topics[r])return e.style.borderColor="#D9534F",void alert('A topic with code "'+r+'" already exists.');r!==t&&delete this._topics[t];var c={TopicCode:r,TopicHelpFilePath:s,TopicTitle:a};!isNaN(l)&&l>0&&(c.RelevantMarkdownLine=l),this._topics[r]=c,this._editingTopicCode=null;var d=this;this.saveTopicsFile(function(){d.renderTopicList()})}else e.style.borderColor="#D9534F"}}}},{key:"cancelEditTopic",value:function(){this._editingTopicCode=null,this.renderTopicList()}},{key:"navigateToTopic",value:function(t){var e=this;if(t&&this._topics[t]){var n=this._topics[t],i=n.TopicHelpFilePath;if(i&&(this.pict.PictApplication.navigateToFile(i),"number"==typeof n.RelevantMarkdownLine&&n.RelevantMarkdownLine>0)){var o=n.RelevantMarkdownLine;setTimeout(function(){var t=e.pict.views["ContentEditor-MarkdownEditor"];if(t&&t._segmentEditors){var n=0;for(var i in t._segmentEditors){var r=t._segmentEditors[i];if(r&&r.state&&r.state.doc){var a=r.state.doc.lines;if(n+a>=o){var s=o-n;s<1&&(s=1),s>a&&(s=a);var l=r.state.doc.line(s);r.dispatch({selection:{anchor:l.from},scrollIntoView:!0}),r.focus();break}n+=a}}}},500)}}}},{key:"renderTopicList",value:function(){var t=document.getElementById("ContentEditor-Topics-List");if(t){var e=Object.keys(this._topics);if(0!==e.length){for(var n="",i=0;i<e.length;i++){var o=e[i],r=this._topics[o];this._editingTopicCode===o?n+=this._buildEditFormHTML(r):n+=this._buildTopicRowHTML(r)}t.innerHTML=n}else t.innerHTML='<div style="padding:16px;text-align:center;color:#8A7F72;font-size:0.78rem;">No topics yet. Click "+ Add Topic" to create one.</div>'}}},{key:"_buildTopicRowHTML",value:function(t){var e=this._escapeHTML(t.TopicCode||""),n=this._escapeHTML(t.TopicTitle||""),i=this._escapeHTML(t.TopicHelpFilePath||""),o="number"==typeof t.RelevantMarkdownLine?" :"+t.RelevantMarkdownLine:"",r=this._escapeAttr(t.TopicCode||""),a="<div class=\"topics-row\" ondblclick=\"pict.views['ContentEditor-Topics'].startEditTopic('"+r+"')\">";return a+='<div class="topics-row-info">',a+='<div class="topics-row-code">'+e+"</div>",n&&(a+='<div class="topics-row-title">'+n+"</div>"),i&&(a+='<div class="topics-row-path">'+i+o+"</div>"),a+="</div>",a+='<div class="topics-row-actions">',a+='<button class="topics-row-btn" title="Edit" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].startEditTopic(\''+r+"')\">✎</button>",a+='<button class="topics-row-btn topics-row-btn-delete" title="Delete" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].removeTopic(\''+r+"')\">✖</button>",i&&(a+='<button class="topics-row-btn" title="Go to file" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].navigateToTopic(\''+r+"')\">→</button>"),a+="</div>",a+="</div>"}},{key:"_buildEditFormHTML",value:function(t){var e='<div class="topics-edit">';return e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Topic Code</label>',e+='<input class="topics-edit-input" id="topics-edit-code" type="text" value="'+this._escapeAttr(t.TopicCode||"")+'" placeholder="My-Topic-Code">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Title</label>',e+='<input class="topics-edit-input" id="topics-edit-title" type="text" value="'+this._escapeAttr(t.TopicTitle||"")+'" placeholder="Topic title">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Help File Path</label>',e+='<input class="topics-edit-input" id="topics-edit-path" type="text" value="'+this._escapeAttr(t.TopicHelpFilePath||"")+'" placeholder="path/to/file.md">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Line Number (optional)</label>',e+='<input class="topics-edit-input" id="topics-edit-line" type="number" value="'+("number"==typeof t.RelevantMarkdownLine?t.RelevantMarkdownLine:"")+'" placeholder="e.g. 23" min="1">',e+="</div>",e+='<div class="topics-edit-actions">',e+="<button class=\"topics-edit-save\" onclick=\"pict.views['ContentEditor-Topics'].saveEditTopic('"+this._escapeAttr(t.TopicCode||"")+"')\">Save</button>",e+='<button class="topics-edit-cancel" onclick="pict.views[\'ContentEditor-Topics\'].cancelEditTopic()">Cancel</button>',e+="</div>",e+="</div>"}},{key:"_showEmptyState",value:function(){var t=document.getElementById("ContentEditor-Topics-Container");if(t)t.innerHTML=this._buildEmptyStateHTML();else{var e=document.getElementById("ContentEditor-SidebarTopics-Container");e&&(e.innerHTML=this._buildEmptyStateHTML())}}},{key:"_buildEmptyStateHTML",value:function(){return'<div class="topics-empty"><div class="topics-empty-icon">&#x1F4D1;</div><div>No topics file loaded</div><button class="topics-empty-btn" onclick="pict.views[\'ContentEditor-Topics\'].loadDefaultTopicsFile()">Load .pict_documentation_topics.json</button><button class="topics-empty-btn topics-empty-btn-secondary" onclick="pict.views[\'ContentEditor-Topics\'].promptSelectTopicsFile()">Select file...</button></div>'}},{key:"loadDefaultTopicsFile",value:function(){var t=this;this.loadTopicsFile(".pict_documentation_topics.json",function(e){e&&t._createDefaultTopicsFile()})}},{key:"promptSelectTopicsFile",value:function(){var t=prompt("Enter the path to a topics JSON file:",".pict_documentation_topics.json");if(t&&t.trim()){var e=this;this.loadTopicsFile(t.trim(),function(n){n&&confirm('File not found. Create "'+t.trim()+'"?')&&(e._topicsFilePath=t.trim(),e._topics={},e.pict.AppData.ContentEditor.TopicsFilePath=t.trim(),e.pict.PictApplication.saveSettings(),e.saveTopicsFile(function(){e._hasRendered&&e.render()}))})}}},{key:"_createDefaultTopicsFile",value:function(t){var e="function"==typeof t?t:function(){},n=this,i=".pict_documentation_topics.json";this._topicsFilePath=i,this._topics={},this.pict.AppData.ContentEditor.TopicsFilePath=i,this.pict.PictApplication.saveSettings(),this.saveTopicsFile(function(){n._hasRendered&&n.render(),e()})}},{key:"_updateHeaderTitle",value:function(){var t=document.getElementById("ContentEditor-Topics-HeaderTitle");if(t){var e=this._topicsFilePath.replace(/^.*\//,"");t.textContent=e||"Topics",t.title=this._topicsFilePath}}},{key:"_showFooter",value:function(t){var e=document.getElementById("ContentEditor-Topics-Footer");e&&(e.style.display=t?"":"none")}},{key:"_generateUniqueCode",value:function(t){if(!this._topics[t])return t;for(var e=2;this._topics[t+"-"+e];)e++;return t+"-"+e}},{key:"_escapeHTML",value:function(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}},{key:"_escapeAttr",value:function(t){return String(t).replace(/&/g,"&amp;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-Topics",DefaultRenderable:"Topics-Wrap",DefaultDestinationAddress:"#ContentEditor-SidebarTopics-Container",AutoRender:!1,CSS:"\n\t\t.topics-container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.topics-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t\tbackground: #FAF8F4;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.topics-header-title\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.topics-header-btn\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tpadding: 2px 6px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.topics-header-btn:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.topics-list\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t}\n\t\t.topics-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #F0EDE8;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.topics-row:hover\n\t\t{\n\t\t\tbackground: #F5F0EA;\n\t\t}\n\t\t.topics-row-info\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.topics-row-code\n\t\t{\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #2E7D74;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.topics-row-title\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-top: 1px;\n\t\t}\n\t\t.topics-row-path\n\t\t{\n\t\t\tfont-size: 0.68rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-top: 1px;\n\t\t}\n\t\t.topics-row-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tgap: 2px;\n\t\t\tpadding-top: 1px;\n\t\t}\n\t\t.topics-row-btn\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.topics-row-btn:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.topics-row-btn-delete:hover\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t\tbackground: #FDF0EF;\n\t\t}\n\t\t/* Inline edit form */\n\t\t.topics-edit\n\t\t{\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #FFF9F0;\n\t\t}\n\t\t.topics-edit-field\n\t\t{\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.topics-edit-label\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 2px;\n\t\t}\n\t\t.topics-edit-input\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 4px 6px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: #FFF;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.topics-edit-input:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.topics-edit-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 6px;\n\t\t\tmargin-top: 8px;\n\t\t}\n\t\t.topics-edit-save\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 4px 12px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-edit-save:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.topics-edit-cancel\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 4px 12px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-edit-cancel:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t/* Footer add button */\n\t\t.topics-footer\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.topics-add-btn\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tpadding: 6px 0;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.topics-add-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t/* Empty state */\n\t\t.topics-empty\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 12px;\n\t\t\tpadding: 32px 16px;\n\t\t\ttext-align: center;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 0.82rem;\n\t\t}\n\t\t.topics-empty-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: #C4BDB3;\n\t\t}\n\t\t.topics-empty-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 6px 14px;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-empty-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.topics-empty-btn-secondary\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.topics-empty-btn-secondary:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-color: #8A7F72;\n\t\t}\n\t",Templates:[{Hash:"Topics-Container-Template",Template:'\n<div class="topics-container" id="ContentEditor-Topics-Container">\n\t<div class="topics-header">\n\t\t<span class="topics-header-title" id="ContentEditor-Topics-HeaderTitle">Topics</span>\n\t\t<button class="topics-header-btn" title="Close topics file"\n\t\t\tonclick="pict.views[\'ContentEditor-Topics\'].closeTopicsFile()">&times;</button>\n\t</div>\n\t<div class="topics-list" id="ContentEditor-Topics-List"></div>\n\t<div class="topics-footer" id="ContentEditor-Topics-Footer">\n\t\t<button class="topics-add-btn"\n\t\t\tonclick="pict.views[\'ContentEditor-Topics\'].addTopic()">+ Add Topic</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Topics-Wrap",TemplateHash:"Topics-Container-Template",DestinationAddress:"#ContentEditor-SidebarTopics-Container"}]}},{"pict-view":52}],66:[function(t,e,n){},{}],67:[function(t,e,n){arguments[4][66][0].apply(n,arguments)},{dup:66}],68:[function(t,e,n){var i=t("function-bind"),o=t("./functionApply"),r=t("./functionCall"),a=t("./reflectApply");e.exports=a||i.call(r,o)},{"./functionApply":69,"./functionCall":70,"./reflectApply":72,"function-bind":87}],69:[function(t,e,n){e.exports=Function.prototype.apply},{}],70:[function(t,e,n){e.exports=Function.prototype.call},{}],71:[function(t,e,n){var i=t("function-bind"),o=t("es-errors/type"),r=t("./functionCall"),a=t("./actualApply");e.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return a(i,r,t)}},{"./actualApply":68,"./functionCall":70,"es-errors/type":81,"function-bind":87}],72:[function(t,e,n){e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},{}],73:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bind-apply-helpers"),r=o([i("%String.prototype.indexOf%")]);e.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&r(t,".prototype.")>-1?o([n]):n}},{"call-bind-apply-helpers":71,"get-intrinsic":88}],74:[function(t,e,n){var i,o=t("call-bind-apply-helpers"),r=t("gopd");try{i=[].__proto__===Array.prototype}catch(t){if(!t||"object"!==_typeof(t)||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var a=!!i&&r&&r(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof l&&function(t){return l(null==t?t:s(t))}},{"call-bind-apply-helpers":71,gopd:93}],75:[function(t,e,n){var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch(t){i=!1}e.exports=i},{}],76:[function(t,e,n){e.exports=EvalError},{}],77:[function(t,e,n){e.exports=Error},{}],78:[function(t,e,n){e.exports=RangeError},{}],79:[function(t,e,n){e.exports=ReferenceError},{}],80:[function(t,e,n){e.exports=SyntaxError},{}],81:[function(t,e,n){e.exports=TypeError},{}],82:[function(t,e,n){e.exports=URIError},{}],83:[function(t,e,n){e.exports=Object},{}],84:[function(t,e,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],85:[function(t,e,n){arguments[4][2][0].apply(n,arguments)},{"../package.json":84,dup:2}],86:[function(t,e,n){var i=Object.prototype.toString,o=Math.max,r=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n};e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.apply(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,a=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n}(arguments,1),s=o(0,e.length-a.length),l=[],c=0;c<s;c++)l[c]="$"+c;if(n=Function("binder","return function ("+function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n}(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var i=e.apply(this,r(a,arguments));return Object(i)===i?i:this}return e.apply(t,r(a,arguments))}),e.prototype){var d=function(){};d.prototype=e.prototype,n.prototype=new d,d.prototype=null}return n}},{}],87:[function(t,e,n){var i=t("./implementation");e.exports=Function.prototype.bind||i},{"./implementation":86}],88:[function(t,e,n){var i,o=t("es-object-atoms"),r=t("es-errors"),a=t("es-errors/eval"),s=t("es-errors/range"),l=t("es-errors/ref"),c=t("es-errors/syntax"),d=t("es-errors/type"),p=t("es-errors/uri"),u=t("math-intrinsics/abs"),h=t("math-intrinsics/floor"),f=t("math-intrinsics/max"),v=t("math-intrinsics/min"),m=t("math-intrinsics/pow"),g=t("math-intrinsics/round"),y=t("math-intrinsics/sign"),b=Function,w=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}},C=t("gopd"),x=t("es-define-property"),A=function(){throw new d},k=C?function(){try{return A}catch(t){try{return C(arguments,"callee").get}catch(t){return A}}}():A,D=t("has-symbols")(),P=t("get-proto"),E=t("get-proto/Object.getPrototypeOf"),S=t("get-proto/Reflect.getPrototypeOf"),F=t("call-bind-apply-helpers/functionApply"),T=t("call-bind-apply-helpers/functionCall"),_={},R="undefined"!=typeof Uint8Array&&P?P(Uint8Array):i,I={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":D&&P?P([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":_,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&P?P(P([][Symbol.iterator]())):i,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":_typeof(JSON))?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&D&&P?P((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&D&&P?P((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&P?P(""[Symbol.iterator]()):i,"%Symbol%":D?Symbol:i,"%SyntaxError%":c,"%ThrowTypeError%":k,"%TypedArray%":R,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":F,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":u,"%Math.floor%":h,"%Math.max%":f,"%Math.min%":v,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(P)try{null.error}catch(t){var L=P(P(t));I["%Error.prototype%"]=L}var M=function t(e){var n;if("%AsyncFunction%"===e)n=w("async function () {}");else if("%GeneratorFunction%"===e)n=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=w("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&P&&(n=P(o.prototype))}return I[e]=n,n},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},H=t("function-bind"),V=t("hasown"),j=H.call(T,Array.prototype.concat),z=H.call(F,Array.prototype.splice),N=H.call(T,String.prototype.replace),O=H.call(T,String.prototype.slice),U=H.call(T,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,q=function(t,e){var n,i=t;if(V(B,i)&&(i="%"+(n=B[i])[0]+"%"),V(I,i)){var o=I[i];if(o===_&&(o=M(i)),void 0===o&&!e)throw new d("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new c("intrinsic "+t+" does not exist!")};e.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new d('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=O(t,0,1),n=O(t,-1);if("%"===e&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var i=[];return N(t,G,function(t,e,n,o){i[i.length]=n?N(o,W,"$1"):e||t}),i}(t),i=n.length>0?n[0]:"",o=q("%"+i+"%",e),r=o.name,a=o.value,s=!1,l=o.alias;l&&(i=l[0],z(n,j([0,1],l)));for(var p=1,u=!0;p<n.length;p+=1){var h=n[p],f=O(h,0,1),v=O(h,-1);if(('"'===f||"'"===f||"`"===f||'"'===v||"'"===v||"`"===v)&&f!==v)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&u||(s=!0),V(I,r="%"+(i+="."+h)+"%"))a=I[r];else if(null!=a){if(!(h in a)){if(!e)throw new d("base intrinsic for "+t+" exists, but the property is not available.");return}if(C&&p+1>=n.length){var m=C(a,h);a=(u=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[h]}else u=V(a,h),a=a[h];u&&!s&&(I[r]=a)}}return a}},{"call-bind-apply-helpers/functionApply":69,"call-bind-apply-helpers/functionCall":70,"es-define-property":75,"es-errors":77,"es-errors/eval":76,"es-errors/range":78,"es-errors/ref":79,"es-errors/syntax":80,"es-errors/type":81,"es-errors/uri":82,"es-object-atoms":83,"function-bind":87,"get-proto":91,"get-proto/Object.getPrototypeOf":89,"get-proto/Reflect.getPrototypeOf":90,gopd:93,"has-symbols":94,hasown:96,"math-intrinsics/abs":97,"math-intrinsics/floor":98,"math-intrinsics/max":100,"math-intrinsics/min":101,"math-intrinsics/pow":102,"math-intrinsics/round":103,"math-intrinsics/sign":104}],89:[function(t,e,n){var i=t("es-object-atoms");e.exports=i.getPrototypeOf||null},{"es-object-atoms":83}],90:[function(t,e,n){e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},{}],91:[function(t,e,n){var i=t("./Reflect.getPrototypeOf"),o=t("./Object.getPrototypeOf"),r=t("dunder-proto/get");e.exports=i?function(t){return i(t)}:o?function(t){if(!t||"object"!==_typeof(t)&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:r?function(t){return r(t)}:null},{"./Object.getPrototypeOf":89,"./Reflect.getPrototypeOf":90,"dunder-proto/get":74}],92:[function(t,e,n){e.exports=Object.getOwnPropertyDescriptor},{}],93:[function(t,e,n){var i=t("./gOPD");if(i)try{i([],"length")}catch(t){i=null}e.exports=i},{"./gOPD":92}],94:[function(t,e,n){var i="undefined"!=typeof Symbol&&Symbol,o=t("./shams");e.exports=function(){return"function"==typeof i&&("function"==typeof Symbol&&("symbol"===_typeof(i("foo"))&&("symbol"===_typeof(Symbol("bar"))&&o())))}},{"./shams":95}],95:[function(t,e,n){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===_typeof(Symbol.iterator))return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var i in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(t,e);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},{}],96:[function(t,e,n){var i=Function.prototype.call,o=Object.prototype.hasOwnProperty,r=t("function-bind");e.exports=r.call(i,o)},{"function-bind":87}],97:[function(t,e,n){e.exports=Math.abs},{}],98:[function(t,e,n){e.exports=Math.floor},{}],99:[function(t,e,n){e.exports=Number.isNaN||function(t){return t!=t}},{}],100:[function(t,e,n){e.exports=Math.max},{}],101:[function(t,e,n){e.exports=Math.min},{}],102:[function(t,e,n){e.exports=Math.pow},{}],103:[function(t,e,n){e.exports=Math.round},{}],104:[function(t,e,n){var i=t("./isNaN");e.exports=function(t){return i(t)||0===t?t:t<0?-1:1}},{"./isNaN":99}],105:[function(t,e,n){(function(n){(function(){var i="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=i&&o&&"function"==typeof o.get?o.get:null,a=i&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,d=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,C=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,k=Array.prototype.join,D=Array.prototype.slice,P=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"==typeof Symbol&&"symbol"===_typeof(Symbol.iterator)?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"===_typeof(Symbol.iterator),_="function"==typeof Symbol&&Symbol.toStringTag&&(_typeof(Symbol.toStringTag)===T||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function L(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var i=t<0?-P(-t):P(t);if(i!==t){var o=String(i),r=y.call(e,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,n,"$&_")}var M=t("./util.inspect"),B=M.custom,H=W(B)?B:null,V={__proto__:null,double:'"',single:"'"},j={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function z(t,e,n){var i=n.quoteStyle||e,o=V[i];return o+t+o}function N(t){return b.call(String(t),/"/g,"&quot;")}function O(t){return!_||!("object"===_typeof(t)&&(_ in t||void 0!==t[_]))}function U(t){return"[object Array]"===J(t)&&O(t)}function G(t){return"[object RegExp]"===J(t)&&O(t)}function W(t){if(T)return t&&"object"===_typeof(t)&&t instanceof Symbol;if("symbol"===_typeof(t))return!0;if(!t||"object"!==_typeof(t)||!F)return!1;try{return F.call(t),!0}catch(t){}return!1}e.exports=function t(e,i,o,s){var l=i||{};if(Q(l,"quoteStyle")&&!Q(V,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!Q(l,"customInspect")||l.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=l.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return K(e,l);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var x=String(e);return w?L(e,x):x}if("bigint"==typeof e){var P=String(e)+"n";return w?L(e,P):P}var S=void 0===l.depth?5:l.depth;if(void 0===o&&(o=0),o>=S&&S>0&&"object"===_typeof(e))return U(e)?"[Array]":"[Object]";var B=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=k.call(Array(t.indent+1)," ")}return{base:n,prev:k.call(Array(e+1),n)}}(l,o);if(void 0===s)s=[];else if($(s,e)>=0)return"[Circular]";function j(e,n,i){if(n&&(s=D.call(s)).push(n),i){var r={depth:l.depth};return Q(l,"quoteStyle")&&(r.quoteStyle=l.quoteStyle),t(e,r,o+1,s)}return t(e,l,o+1,s)}if("function"==typeof e&&!G(e)){var q=function(t){if(t.name)return t.name;var e=g.call(m.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),Z=nt(e,j);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(Z.length>0?" { "+k.call(Z,", ")+" }":"")}if(W(e)){var it=T?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(e);return"object"!==_typeof(e)||T?it:X(it)}if(function(t){if(!t||"object"!==_typeof(t))return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var ot="<"+C.call(String(e.nodeName)),rt=e.attributes||[],at=0;at<rt.length;at++)ot+=" "+rt[at].name+"="+z(N(rt[at].value),"double",l);return ot+=">",e.childNodes&&e.childNodes.length&&(ot+="..."),ot+="</"+C.call(String(e.nodeName))+">"}if(U(e)){if(0===e.length)return"[]";var st=nt(e,j);return B&&!function(t){for(var e=0;e<t.length;e++)if($(t[e],"\n")>=0)return!1;return!0}(st)?"["+et(st,B)+"]":"[ "+k.call(st,", ")+" ]"}if(function(t){return"[object Error]"===J(t)&&O(t)}(e)){var lt=nt(e,j);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===lt.length?"["+String(e)+"]":"{ ["+String(e)+"] "+k.call(lt,", ")+" }":"{ ["+String(e)+"] "+k.call(A.call("[cause]: "+j(e.cause),lt),", ")+" }"}if("object"===_typeof(e)&&v){if(H&&"function"==typeof e[H]&&M)return M(e,{depth:S-o});if("symbol"!==v&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!==_typeof(t))return!1;try{r.call(t);try{c.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return a&&a.call(e,function(t,n){ct.push(j(n,e,!0)+" => "+j(t,e))}),tt("Map",r.call(e),ct,B)}if(function(t){if(!c||!t||"object"!==_typeof(t))return!1;try{c.call(t);try{r.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var dt=[];return d&&d.call(e,function(t){dt.push(j(t,e))}),tt("Set",c.call(e),dt,B)}if(function(t){if(!p||!t||"object"!==_typeof(t))return!1;try{p.call(t,p);try{u.call(t,u)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!u||!t||"object"!==_typeof(t))return!1;try{u.call(t,u);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!h||!t||"object"!==_typeof(t))return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return"[object Number]"===J(t)&&O(t)}(e))return X(j(Number(e)));if(function(t){if(!t||"object"!==_typeof(t)||!E)return!1;try{return E.call(t),!0}catch(t){}return!1}(e))return X(j(E.call(e)));if(function(t){return"[object Boolean]"===J(t)&&O(t)}(e))return X(f.call(e));if(function(t){return"[object String]"===J(t)&&O(t)}(e))return X(j(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==n&&e===n)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===J(t)&&O(t)}(e)&&!G(e)){var pt=nt(e,j),ut=I?I(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",ft=!ut&&_&&Object(e)===e&&_ in e?y.call(J(e),8,-1):ht?"Object":"",vt=(ut||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ft||ht?"["+k.call(A.call([],ft||[],ht||[]),": ")+"] ":"");return 0===pt.length?vt+"{}":B?vt+"{"+et(pt,B)+"}":vt+"{ "+k.call(pt,", ")+" }"}return String(e)};var q=Object.prototype.hasOwnProperty||function(t){return t in this};function Q(t,e){return q.call(t,e)}function J(t){return v.call(t)}function $(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}function K(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return K(y.call(t,0,e.maxStringLength),e)+i}var o=j[e.quoteStyle||"single"];return o.lastIndex=0,z(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,Z),"single",e)}function Z(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function X(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function tt(t,e,n,i){return t+" ("+e+") {"+(i?et(n,i):k.call(n,", "))+"}"}function et(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+k.call(t,","+n)+"\n"+e.prev}function nt(t,e){var n=U(t),i=[];if(n){i.length=t.length;for(var o=0;o<t.length;o++)i[o]=Q(t,o)?e(t[o],t):""}var r,a="function"==typeof S?S(t):[];if(T){r={};for(var s=0;s<a.length;s++)r["$"+a[s]]=a[s]}for(var l in t)Q(t,l)&&(n&&String(Number(l))===l&&l<t.length||T&&r["$"+l]instanceof Symbol||(x.call(/[^\w$]/,l)?i.push(e(l,t)+": "+e(t[l],t)):i.push(l+": "+e(t[l],t))));if("function"==typeof S)for(var c=0;c<a.length;c++)R.call(t,a[c])&&i.push("["+e(a[c])+"]: "+e(t[a[c]],t));return i}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":66}],106:[function(t,e,n){(function(t){(function(){function n(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var n,i="",o=0,r=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(r===s-1||1===a);else if(r!==s-1&&2===a){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",o=0):o=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),r=s,a=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=s,a=0;continue}e&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+t.slice(r+1,s):i=t.slice(r+1,s),o=s-r-1;r=s,a=0}else 46===n&&-1!==a?++a:a=-1}return i}var o={resolve:function(){for(var e,o="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=t.cwd()),s=e),n(s),0!==s.length&&(o=s+"/"+o,r=47===s.charCodeAt(0))}return o=i(o,!r),r?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(t){if(n(t),0===t.length)return".";var e=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&o&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return n(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var i=arguments[e];n(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":o.normalize(t)},relative:function(t,e){if(n(t),n(e),t===e)return"";if((t=o.resolve(t))===(e=o.resolve(e)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var r=t.length,a=r-i,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var l=e.length-s,c=a<l?a:l,d=-1,p=0;p<=c;++p){if(p===c){if(l>c){if(47===e.charCodeAt(s+p))return e.slice(s+p+1);if(0===p)return e.slice(s+p)}else a>c&&(47===t.charCodeAt(i+p)?d=p:0===p&&(d=0));break}var u=t.charCodeAt(i+p);if(u!==e.charCodeAt(s+p))break;47===u&&(d=p)}var h="";for(p=i+d+1;p<=r;++p)p!==r&&47!==t.charCodeAt(p)||(0===h.length?h+="..":h+="/..");return h.length>0?h+e.slice(s+d):(s+=d,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(n(t),0===t.length)return".";for(var e=t.charCodeAt(0),i=47===e,o=-1,r=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!r){o=a;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');n(t);var i,o=0,r=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,l=-1;for(i=t.length-1;i>=0;--i){var c=t.charCodeAt(i);if(47===c){if(!a){o=i+1;break}}else-1===l&&(a=!1,l=i+1),s>=0&&(c===e.charCodeAt(s)?-1===--s&&(r=i):(s=-1,r=l))}return o===r?r=l:-1===r&&(r=t.length),t.slice(o,r)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!a){o=i+1;break}}else-1===r&&(a=!1,r=i+1);return-1===r?"":t.slice(o,r)},extname:function(t){n(t);for(var e=-1,i=0,o=-1,r=!0,a=0,s=t.length-1;s>=0;--s){var l=t.charCodeAt(s);if(47!==l)-1===o&&(r=!1,o=s+1),46===l?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!r){i=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===i+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!==_typeof(t))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(t));return function(t,e){var n=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+i:n+t+i:i}("/",t)},parse:function(t){n(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var i,o=t.charCodeAt(0),r=47===o;r?(e.root="/",i=1):i=0;for(var a=-1,s=0,l=-1,c=!0,d=t.length-1,p=0;d>=i;--d)if(47!==(o=t.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===o?-1===a?a=d:1!==p&&(p=1):-1!==a&&(p=-1);else if(!c){s=d+1;break}return-1===a||-1===l||0===p||1===p&&a===l-1&&a===s+1?-1!==l&&(e.base=e.name=0===s&&r?t.slice(1,l):t.slice(s,l)):(0===s&&r?(e.name=t.slice(1,a),e.base=t.slice(1,l)):(e.name=t.slice(s,a),e.base=t.slice(s,l)),e.ext=t.slice(a,l)),s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,e.exports=o}).call(this)}).call(this,t("_process"))},{_process:126}],107:[function(t,e,n){arguments[4][18][0].apply(n,arguments)},{dup:18}],108:[function(t,e,n){arguments[4][19][0].apply(n,arguments)},{"../package.json":107,dup:19,"fable-serviceproviderbase":85}],109:[function(t,e,n){arguments[4][29][0].apply(n,arguments)},{dup:29}],110:[function(t,e,n){arguments[4][30][0].apply(n,arguments)},{"./providers/Pict-Provider-FileBrowserBrowse.js":111,"./providers/Pict-Provider-FileBrowserIcons.js":112,"./providers/Pict-Provider-FileBrowserLayout.js":113,"./providers/Pict-Provider-FileBrowserList.js":114,"./providers/Pict-Provider-FileBrowserView.js":115,"./services/Pict-Service-FileBrowser.js":116,"./views/Pict-View-FileBrowser-BrowseSearch.js":117,"./views/Pict-View-FileBrowser-BrowseTree.js":118,"./views/Pict-View-FileBrowser-ListDetail.js":119,"./views/Pict-View-FileBrowser-ListIcons.js":120,"./views/Pict-View-FileBrowser-ViewFileInfo.js":121,"./views/Pict-View-FileBrowser-ViewImage.js":122,"./views/Pict-View-FileBrowser.js":123,dup:30}],111:[function(t,e,n){arguments[4][31][0].apply(n,arguments)},{dup:31,"pict-provider":108}],112:[function(t,e,n){arguments[4][32][0].apply(n,arguments)},{dup:32,"pict-provider":108}],113:[function(t,e,n){arguments[4][33][0].apply(n,arguments)},{dup:33,"pict-provider":108}],114:[function(t,e,n){arguments[4][34][0].apply(n,arguments)},{dup:34,"pict-provider":108}],115:[function(t,e,n){arguments[4][35][0].apply(n,arguments)},{dup:35,"pict-provider":108}],116:[function(t,e,n){(function(n){(function(){
89
+ /**
90
+ * Pict FileBrowser Service
91
+ *
92
+ * A Fable service that provides:
93
+ * 1. REST API endpoints for browsing a filesystem path
94
+ * 2. A static web app that uses the pict-section-filebrowser control
95
+ *
96
+ * Usage:
97
+ * const libFable = require('fable');
98
+ * const libOrator = require('orator');
99
+ * const libOratorServiceServerRestify = require('orator-serviceserver-restify');
100
+ * const libPictFileBrowser = require('pict-section-filebrowser');
101
+ *
102
+ * let tmpFable = new libFable({ Product: 'MyApp', APIServerPort: 8080 });
103
+ * tmpFable.serviceManager.addServiceType('OratorServiceServer', libOratorServiceServerRestify);
104
+ * tmpFable.serviceManager.addServiceType('Orator', libOrator);
105
+ *
106
+ * let tmpOrator = tmpFable.serviceManager.instantiateServiceProvider('Orator');
107
+ * let tmpFileBrowser = new libPictFileBrowser.FileBrowserService(tmpFable,
108
+ * { BasePath: '/path/to/browse', APIRoutePrefix: '/api/filebrowser' });
109
+ *
110
+ * tmpOrator.startService(() =>
111
+ * {
112
+ * tmpFileBrowser.connectRoutes();
113
+ * console.log('File browser ready at http://localhost:8080/filebrowser/');
114
+ * });
115
+ *
116
+ * @license MIT
117
+ * @author Steven Velozo <steven@velozo.com>
118
+ */
119
+ var i=t("fable-serviceproviderbase"),o=t("path"),r=t("fs"),a=t("url"),s={BasePath:".",APIRoutePrefix:"/api/filebrowser",WebAppRoute:"/filebrowser/*",WebAppRouteStrip:"/filebrowser/",ServeWebApp:!0,IncludeHiddenFiles:!1,MaxTreeDepth:2},l=function(t){function e(t,n,i){var r;for(var a in _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).serviceType="PictFileBrowserService",s)a in r.options||(r.options[a]=s[a]);return r.basePath=o.resolve(r.options.BasePath),r}return _inherits(e,t),_createClass(e,[{key:"connectRoutes",value:function(){var t=this;if(!this.fable.Orator||!this.fable.Orator.serviceServer)return this.log.error("PictFileBrowserService: Orator service server is not available. Initialize Orator first."),!1;var e=this.fable.Orator.serviceServer,i=this.options.APIRoutePrefix;if(e.get(i+"/list",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listDirectory(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/tree",function(e,n,i){var o=t.parseQueryParams(e),r=t.options.MaxTreeDepth;o.depth&&(r=parseInt(o.depth)||t.options.MaxTreeDepth),t.buildFolderTree("",r,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/info",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.getFileInfo(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/children",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listChildFolders(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),this.options.ServeWebApp){var r=o.join(n,"..","www");this.fable.Orator.addStaticRoute(r,"index.html",this.options.WebAppRoute,this.options.WebAppRouteStrip)}return this.log.info("PictFileBrowserService: Routes connected. Browsing path: "+this.basePath),!0}},{key:"parseQueryParams",value:function(t){return t.query&&"object"===_typeof(t.query)?t.query:a.parse(t.url,!0).query||{}}},{key:"resolveSafePath",value:function(t){var e=(t||"").replace(/\.\./g,"").replace(/\/\//g,"/"),n=o.resolve(this.basePath,e);return 0!==n.indexOf(this.basePath)?null:n}},{key:"listDirectory",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);var l=[],c=s.length;if(0===c)return e(null,l);for(var d=0;d<s.length;d++){var p=s[d],u=p.name;if(n.options.IncludeHiddenFiles||"."!==u.charAt(0)){var h=o.join(i,u),f=t?t+"/"+u:u;r.stat(h,function(t,n,i){return function(r,a){var s={Name:t,Path:n,Type:i?"folder":"file"};if(a&&!r&&(s.Size=a.size,s.Modified=a.mtime,s.Created=a.birthtime,i||(s.Extension=o.extname(t))),l.push(s),0===--c)return e(null,l)}}(u,f,p.isDirectory()))}else if(0===--c)return e(null,l)}})}},{key:"listChildFolders",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);for(var l=[],c=0;c<s.length;c++)if(s[c].isDirectory()){var d=s[c].name;(n.options.IncludeHiddenFiles||"."!==d.charAt(0))&&l.push(d)}if(l.sort(function(t,e){return t.localeCompare(e)}),0===l.length)return e(null,[]);for(var p=[],u=l.length,h=0;h<l.length;h++){var f=l[h],v=o.join(i,f),m=t?t+"/"+f:f;r.readdir(v,{withFileTypes:!0},function(t,i){return function(o,r){var a=!1;if(!o&&r)for(var s=0;s<r.length;s++)if(r[s].isDirectory()){var l=r[s].name;if(n.options.IncludeHiddenFiles||"."!==l.charAt(0)){a=!0;break}}if(p.push({Name:t,Path:i,HasChildren:a}),0===--u)return p.sort(function(t,e){return t.Name.localeCompare(e.Name)}),e(null,p)}}(f,m))}})}},{key:"buildFolderTree",value:function(t,e,n){var i=this.resolveSafePath(t);if(!i)return n(new Error("Invalid path"));this._buildTreeRecursive(i,t,e,0,n)}},{key:"_buildTreeRecursive",value:function(t,e,n,i,a){var s=this;if(n>0&&i>=n)return a(null,[]);r.readdir(t,{withFileTypes:!0},function(r,l){if(r)return a(null,[]);for(var c=[],d=0;d<l.length;d++)if(l[d].isDirectory()){var p=l[d].name;if(!s.options.IncludeHiddenFiles&&"."===p.charAt(0))continue;c.push(p)}if(0===c.length)return a(null,[]);for(var u=[],h=c.length,f=0;f<c.length;f++){var v=c[f],m=o.join(t,v),g=e?e+"/"+v:v;s._buildTreeRecursive(m,g,n,i+1,function(t,e){return function(n,i){if(u.push({Name:t,Path:e,Children:i||[]}),0===--h)return u.sort(function(t,e){return t.Name.localeCompare(e.Name)}),a(null,u)}}(v,g))}})}},{key:"getFileInfo",value:function(t,e){var n=this.resolveSafePath(t);if(!n)return e(new Error("Invalid path"));r.stat(n,function(i,r){if(i)return"ENOENT"===i.code?e(new Error("Path not found")):e(i);var a=o.basename(n),s={Name:a,Path:t||a,Type:r.isDirectory()?"folder":"file",Size:r.size,Modified:r.mtime,Created:r.birthtime};return r.isDirectory()||(s.Extension=o.extname(a)),e(null,s)})}}])}(i);e.exports=l,e.exports.default_configuration=s}).call(this)}).call(this,"/node_modules/pict-section-filebrowser/source/services")},{"fable-serviceproviderbase":85,fs:67,path:106,url:137}],117:[function(t,e,n){arguments[4][37][0].apply(n,arguments)},{dup:37,"pict-view":125}],118:[function(t,e,n){arguments[4][38][0].apply(n,arguments)},{dup:38,"pict-view":125}],119:[function(t,e,n){arguments[4][39][0].apply(n,arguments)},{dup:39,"pict-view":125}],120:[function(t,e,n){arguments[4][40][0].apply(n,arguments)},{dup:40,"pict-view":125}],121:[function(t,e,n){arguments[4][41][0].apply(n,arguments)},{dup:41,"pict-view":125}],122:[function(t,e,n){arguments[4][42][0].apply(n,arguments)},{dup:42,"pict-view":125}],123:[function(t,e,n){arguments[4][43][0].apply(n,arguments)},{"../Pict-Section-FileBrowser-DefaultConfiguration.js":109,"../providers/Pict-Provider-FileBrowserBrowse.js":111,"../providers/Pict-Provider-FileBrowserIcons.js":112,"../providers/Pict-Provider-FileBrowserLayout.js":113,"../providers/Pict-Provider-FileBrowserList.js":114,"../providers/Pict-Provider-FileBrowserView.js":115,dup:43,"pict-view":125}],124:[function(t,e,n){arguments[4][51][0].apply(n,arguments)},{dup:51}],125:[function(t,e,n){arguments[4][52][0].apply(n,arguments)},{"../package.json":124,dup:52,"fable-serviceproviderbase":85}],126:[function(t,e,n){var i,o,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(t){i=a}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(t){o=s}}();var c,d=[],p=!1,u=-1;function h(){p&&c&&(p=!1,c.length?d=c.concat(d):u=-1,d.length&&f())}function f(){if(!p){var t=l(h);p=!0;for(var e=d.length;e;){for(c=d,d=[];++u<e;)c&&c[u].run();u=-1,e=d.length}c=null,p=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{return o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function v(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new v(t,e)),1!==d.length||p||l(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],127:[function(t,e,n){(function(t){(function(){!function(i){var o="object"==_typeof(n)&&n&&!n.nodeType&&n,r="object"==_typeof(e)&&e&&!e.nodeType&&e,a="object"==_typeof(t)&&t;a.global!==a&&a.window!==a&&a.self!==a||(i=a);var s,l,c=2147483647,d=36,p=/^xn--/,u=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,m=String.fromCharCode;function g(t){throw new RangeError(f[t])}function y(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function b(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+y((t=t.replace(h,".")).split("."),e).join(".")}function w(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function C(t){return y(t,function(t){var e="";return t>65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=m(t)}).join("")}function x(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d}function A(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function k(t,e,n){var i=0;for(t=n?v(t/700):t>>1,t+=v(t/e);t>455;i+=d)t=v(t/35);return v(i+36*t/(t+38))}function D(t){var e,n,i,o,r,a,s,l,p,u,h=[],f=t.length,m=0,y=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&g("not-basic"),h.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<f;){for(r=m,a=1,s=d;o>=f&&g("invalid-input"),((l=x(t.charCodeAt(o++)))>=d||l>v((c-m)/a))&&g("overflow"),m+=l*a,!(l<(p=s<=b?1:s>=b+26?26:s-b));s+=d)a>v(c/(u=d-p))&&g("overflow"),a*=u;b=k(m-r,e=h.length+1,0==r),v(m/e)>c-y&&g("overflow"),y+=v(m/e),m%=e,h.splice(m++,0,y)}return C(h)}function P(t){var e,n,i,o,r,a,s,l,p,u,h,f,y,b,C,x=[];for(f=(t=w(t)).length,e=128,n=0,r=72,a=0;a<f;++a)(h=t[a])<128&&x.push(m(h));for(i=o=x.length,o&&x.push("-");i<f;){for(s=c,a=0;a<f;++a)(h=t[a])>=e&&h<s&&(s=h);for(s-e>v((c-n)/(y=i+1))&&g("overflow"),n+=(s-e)*y,e=s,a=0;a<f;++a)if((h=t[a])<e&&++n>c&&g("overflow"),h==e){for(l=n,p=d;!(l<(u=p<=r?1:p>=r+26?26:p-r));p+=d)C=l-u,b=d-u,x.push(m(A(u+C%b,0))),l=v(C/b);x.push(m(A(l,0))),r=k(n,y,i==o),n=0,++i}++n,++e}return x.join("")}if(s={version:"1.4.1",ucs2:{decode:w,encode:C},decode:D,encode:P,toASCII:function(t){return b(t,function(t){return u.test(t)?"xn--"+P(t):t})},toUnicode:function(t){return b(t,function(t){return p.test(t)?D(t.slice(4).toLowerCase()):t})}},o&&r)if(e.exports==o)r.exports=s;else for(l in s)s.hasOwnProperty(l)&&(o[l]=s[l]);else i.punycode=s}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],128:[function(t,e,n){var i=String.prototype.replace,o=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(t){return i.call(t,o,"+")},RFC3986:function(t){return String(t)}},RFC1738:r,RFC3986:a}},{}],129:[function(t,e,n){var i=t("./stringify"),o=t("./parse"),r=t("./formats");e.exports={formats:r,parse:o,stringify:i}},{"./formats":128,"./parse":130,"./stringify":131}],130:[function(t,e,n){var i=t("./utils"),o=Object.prototype.hasOwnProperty,r=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},l=function(t,e,n){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&n>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},c=function(t,e,n,r){if(t){var a=function(t,e){var n=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(e.depth<=0){if(!e.plainObjects&&o.call(Object.prototype,n)&&!e.allowPrototypes)return;return[n]}var i=/(\[[^[\]]*])/g,r=/(\[[^[\]]*])/.exec(n),a=r?n.slice(0,r.index):n,s=[];if(a){if(!e.plainObjects&&o.call(Object.prototype,a)&&!e.allowPrototypes)return;s[s.length]=a}for(var l=0;null!==(r=i.exec(n))&&l<e.depth;){l+=1;var c=r[1].slice(1,-1);if(!e.plainObjects&&o.call(Object.prototype,c)&&!e.allowPrototypes)return;s[s.length]=r[1]}if(r){if(!0===e.strictDepth)throw new RangeError("Input depth exceeded depth option of "+e.depth+" and strictDepth is true");s[s.length]="["+n.slice(r.index)+"]"}return s}(t,n);if(a)return function(t,e,n,o){var r=0;if(t.length>0&&"[]"===t[t.length-1]){var a=t.slice(0,-1).join("");r=Array.isArray(e)&&e[a]?e[a].length:0}for(var s=o?e:l(e,n,r),c=t.length-1;c>=0;--c){var d,p=t[c];if("[]"===p&&n.parseArrays)d=i.isOverflow(s)?s:n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:i.combine([],s,n.arrayLimit,n.plainObjects);else{d=n.plainObjects?{__proto__:null}:{};var u="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,h=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,f=parseInt(h,10),v=!isNaN(f)&&p!==h&&String(f)===h&&f>=0&&n.parseArrays;if(n.parseArrays||""!==h)if(v&&f<n.arrayLimit)(d=[])[f]=s;else{if(v&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");v?(d[f]=s,i.markOverflow(d,f)):"__proto__"!==h&&(d[h]=s)}else d={0:s}}s=d}return s}(a,e,n,r)}};e.exports=function(t,e){var n=function(t){if(!t)return a;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=void 0===t.charset?a.charset:t.charset,n=void 0===t.duplicates?a.duplicates:t.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||a.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,duplicates:n,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:a.strictDepth,strictMerge:"boolean"==typeof t.strictMerge?!!t.strictMerge:a.strictMerge,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(e);if(""===t||null==t)return n.plainObjects?{__proto__:null}:{};for(var d="string"==typeof t?function(t,e){var n={__proto__:null},c=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var d=e.parameterLimit===1/0?void 0:e.parameterLimit,p=c.split(e.delimiter,e.throwOnLimitExceeded?d+1:d);if(e.throwOnLimitExceeded&&p.length>d)throw new RangeError("Parameter limit exceeded. Only "+d+" parameter"+(1===d?"":"s")+" allowed.");var u,h=-1,f=e.charset;if(e.charsetSentinel)for(u=0;u<p.length;++u)0===p[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[u]?f="utf-8":"utf8=%26%2310003%3B"===p[u]&&(f="iso-8859-1"),h=u,u=p.length);for(u=0;u<p.length;++u)if(u!==h){var v,m,g=p[u],y=g.indexOf("]="),b=-1===y?g.indexOf("="):y+1;if(-1===b?(v=e.decoder(g,a.decoder,f,"key"),m=e.strictNullHandling?null:""):null!==(v=e.decoder(g.slice(0,b),a.decoder,f,"key"))&&(m=i.maybeMap(l(g.slice(b+1),e,r(n[v])?n[v].length:0),function(t){return e.decoder(t,a.decoder,f,"value")})),m&&e.interpretNumericEntities&&"iso-8859-1"===f&&(m=s(String(m))),g.indexOf("[]=")>-1&&(m=r(m)?[m]:m),e.comma&&r(m)&&m.length>e.arrayLimit){if(e.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");m=i.combine([],m,e.arrayLimit,e.plainObjects)}if(null!==v){var w=o.call(n,v);w&&("combine"===e.duplicates||g.indexOf("[]=")>-1)?n[v]=i.combine(n[v],m,e.arrayLimit,e.plainObjects):w&&"last"!==e.duplicates||(n[v]=m)}}return n}(t,n):t,p=n.plainObjects?{__proto__:null}:{},u=Object.keys(d),h=0;h<u.length;++h){var f=u[h],v=c(f,d[f],n,"string"==typeof t);p=i.merge(p,v,n)}return!0===n.allowSparse?p:i.compact(p)}},{"./utils":132}],131:[function(t,e,n){var i=t("side-channel"),o=t("./utils"),r=t("./formats"),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},l=Array.isArray,c=Array.prototype.push,d=function(t,e){c.apply(t,l(e)?e:[e])},p=Date.prototype.toISOString,u=r.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},f={},v=function t(e,n,r,a,s,c,p,u,v,m,g,y,b,w,C,x,A,k){for(var D,P=e,E=k,S=0,F=!1;void 0!==(E=E.get(f))&&!F;){var T=E.get(e);if(S+=1,void 0!==T){if(T===S)throw new RangeError("Cyclic object value");F=!0}void 0===E.get(f)&&(S=0)}if("function"==typeof m?P=m(n,P):P instanceof Date?P=b(P):"comma"===r&&l(P)&&(P=o.maybeMap(P,function(t){return t instanceof Date?b(t):t})),null===P){if(c)return v&&!x?v(n,h.encoder,A,"key",w):n;P=""}if("string"==typeof(D=P)||"number"==typeof D||"boolean"==typeof D||"symbol"===_typeof(D)||"bigint"==typeof D||o.isBuffer(P))return v?[C(x?n:v(n,h.encoder,A,"key",w))+"="+C(v(P,h.encoder,A,"value",w))]:[C(n)+"="+C(String(P))];var _,R=[];if(void 0===P)return R;if("comma"===r&&l(P))x&&v&&(P=o.maybeMap(P,v)),_=[{value:P.length>0?P.join(",")||null:void 0}];else if(l(m))_=m;else{var I=Object.keys(P);_=g?I.sort(g):I}var L=u?String(n).replace(/\./g,"%2E"):String(n),M=a&&l(P)&&1===P.length?L+"[]":L;if(s&&l(P)&&0===P.length)return M+"[]";for(var B=0;B<_.length;++B){var H=_[B],V="object"===_typeof(H)&&H&&void 0!==H.value?H.value:P[H];if(!p||null!==V){var j=y&&u?String(H).replace(/\./g,"%2E"):String(H),z=l(P)?"function"==typeof r?r(M,j):M:M+(y?"."+j:"["+j+"]");k.set(e,S);var N=i();N.set(f,k),d(R,t(V,z,r,a,s,c,p,u,"comma"===r&&x&&l(P)?null:v,m,g,y,b,w,C,x,A,N))}}return R};e.exports=function(t,e){var n,o=t,c=function(t){if(!t)return h;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=r.default;if(void 0!==t.format){if(!a.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i,o=r.formatters[n],c=h.filter;if(("function"==typeof t.filter||l(t.filter))&&(c=t.filter),i=t.arrayFormat in s?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===t.allowDots?!0===t.encodeDotInKeys||h.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:i,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:c,format:n,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof c.filter?o=(0,c.filter)("",o):l(c.filter)&&(n=c.filter);var p=[];if("object"!==_typeof(o)||null===o)return"";var u=s[c.arrayFormat],f="comma"===u&&c.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var m=i(),g=0;g<n.length;++g){var y=n[g],b=o[y];c.skipNulls&&null===b||d(p,v(b,y,u,f,c.allowEmptyArrays,c.strictNullHandling,c.skipNulls,c.encodeDotInKeys,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,m))}var w=p.join(c.delimiter),C=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?C+="utf8=%26%2310003%3B&":C+="utf8=%E2%9C%93&"),w.length>0?C+w:""}},{"./formats":128,"./utils":132,"side-channel":136}],132:[function(t,e,n){var i=t("./formats"),o=t("side-channel"),r=Object.prototype.hasOwnProperty,a=Array.isArray,s=o(),l=function(t,e){return s.set(t,e),t},c=function(t){return s.has(t)},d=function(t){return s.get(t)},p=function(t,e){s.set(t,e)},u=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),h=function(t,e){for(var n=e&&e.plainObjects?{__proto__:null}:{},i=0;i<t.length;++i)void 0!==t[i]&&(n[i]=t[i]);return n},f=1024;e.exports={arrayToObject:h,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e,n,i){if(c(t)){var o=d(t)+1;return t[o]=e,p(t,o),t}var r=[].concat(t,e);return r.length>n?l(h(r,{plainObjects:i}),r.length-1):r},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],i=0;i<e.length;++i)for(var o=e[i],r=o.obj[o.prop],s=Object.keys(r),l=0;l<s.length;++l){var c=s[l],d=r[c];"object"===_typeof(d)&&null!==d&&-1===n.indexOf(d)&&(e[e.length]={obj:r,prop:c},n[n.length]=d)}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(a(n)){for(var i=[],o=0;o<n.length;++o)void 0!==n[o]&&(i[i.length]=n[o]);e.obj[e.prop]=i}}}(e),t},decode:function(t,e,n){var i=t.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(t){return i}},encode:function(t,e,n,o,r){if(0===t.length)return t;var a=t;if("symbol"===_typeof(t)?a=Symbol.prototype.toString.call(t):"string"!=typeof t&&(a=String(t)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var s="",l=0;l<a.length;l+=f){for(var c=a.length>=f?a.slice(l,l+f):a,d=[],p=0;p<c.length;++p){var h=c.charCodeAt(p);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||r===i.RFC1738&&(40===h||41===h)?d[d.length]=c.charAt(p):h<128?d[d.length]=u[h]:h<2048?d[d.length]=u[192|h>>6]+u[128|63&h]:h<55296||h>=57344?d[d.length]=u[224|h>>12]+u[128|h>>6&63]+u[128|63&h]:(p+=1,h=65536+((1023&h)<<10|1023&c.charCodeAt(p)),d[d.length]=u[240|h>>18]+u[128|h>>12&63]+u[128|h>>6&63]+u[128|63&h])}s+=d.join("")}return s},isBuffer:function(t){return!(!t||"object"!==_typeof(t))&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isOverflow:c,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},markOverflow:l,maybeMap:function(t,e){if(a(t)){for(var n=[],i=0;i<t.length;i+=1)n[n.length]=e(t[i]);return n}return e(t)},merge:function t(e,n,i){if(!n)return e;if("object"!==_typeof(n)&&"function"!=typeof n){if(a(e)){var o=e.length;if(i&&"number"==typeof i.arrayLimit&&o>i.arrayLimit)return l(h(e.concat(n),i),o);e[o]=n}else{if(!e||"object"!==_typeof(e))return[e,n];if(c(e)){var s=d(e)+1;e[s]=n,p(e,s)}else{if(i&&i.strictMerge)return[e,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(e[n]=!0)}}return e}if(!e||"object"!==_typeof(e)){if(c(n)){for(var u=Object.keys(n),f=i&&i.plainObjects?{__proto__:null,0:e}:{0:e},v=0;v<u.length;v++){f[parseInt(u[v],10)+1]=n[u[v]]}return l(f,d(n)+1)}var m=[e].concat(n);return i&&"number"==typeof i.arrayLimit&&m.length>i.arrayLimit?l(h(m,i),m.length-1):m}var g=e;return a(e)&&!a(n)&&(g=h(e,i)),a(e)&&a(n)?(n.forEach(function(n,o){if(r.call(e,o)){var a=e[o];a&&"object"===_typeof(a)&&n&&"object"===_typeof(n)?e[o]=t(a,n,i):e[e.length]=n}else e[o]=n}),e):Object.keys(n).reduce(function(e,o){var a=n[o];if(r.call(e,o)?e[o]=t(e[o],a,i):e[o]=a,c(n)&&!c(e)&&l(e,d(n)),c(e)){var s=parseInt(o,10);String(s)===o&&s>=0&&s>d(e)&&p(e,s)}return e},g)}}},{"./formats":128,"side-channel":136}],133:[function(t,e,n){var i=t("object-inspect"),o=t("es-errors/type"),r=function(t,e,n){for(var i,o=t;null!=(i=o.next);o=i)if(i.key===e)return o.next=i.next,n||(i.next=t.next,t.next=i),i};e.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+i(t))},delete:function(e){var n=t&&t.next,i=function(t,e){if(t)return r(t,e,!0)}(t,e);return i&&n&&n===i&&(t=void 0),!!i},get:function(e){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!r(t,e)}(t,e)},set:function(e,n){t||(t={next:void 0}),function(t,e,n){var i=r(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n}}(t,e,n)}};return e}},{"es-errors/type":81,"object-inspect":105}],134:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bound"),r=t("object-inspect"),a=t("es-errors/type"),s=i("%Map%",!0),l=o("Map.prototype.get",!0),c=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),p=o("Map.prototype.delete",!0),u=o("Map.prototype.size",!0);e.exports=!!s&&function(){var t,e={assert:function(t){if(!e.has(t))throw new a("Side channel does not contain "+r(t))},delete:function(e){if(t){var n=p(t,e);return 0===u(t)&&(t=void 0),n}return!1},get:function(e){if(t)return l(t,e)},has:function(e){return!!t&&d(t,e)},set:function(e,n){t||(t=new s),c(t,e,n)}};return e}},{"call-bound":73,"es-errors/type":81,"get-intrinsic":88,"object-inspect":105}],135:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bound"),r=t("object-inspect"),a=t("side-channel-map"),s=t("es-errors/type"),l=i("%WeakMap%",!0),c=o("WeakMap.prototype.get",!0),d=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),u=o("WeakMap.prototype.delete",!0);e.exports=l?function(){var t,e,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+r(t))},delete:function(n){if(l&&n&&("object"===_typeof(n)||"function"==typeof n)){if(t)return u(t,n)}else if(a&&e)return e.delete(n);return!1},get:function(n){return l&&n&&("object"===_typeof(n)||"function"==typeof n)&&t?c(t,n):e&&e.get(n)},has:function(n){return l&&n&&("object"===_typeof(n)||"function"==typeof n)&&t?p(t,n):!!e&&e.has(n)},set:function(n,i){l&&n&&("object"===_typeof(n)||"function"==typeof n)?(t||(t=new l),d(t,n,i)):a&&(e||(e=a()),e.set(n,i))}};return n}:a},{"call-bound":73,"es-errors/type":81,"get-intrinsic":88,"object-inspect":105,"side-channel-map":134}],136:[function(t,e,n){var i=t("es-errors/type"),o=t("object-inspect"),r=t("side-channel-list"),a=t("side-channel-map"),s=t("side-channel-weakmap")||a||r;e.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new i("Side channel does not contain "+o(t))},delete:function(e){return!!t&&t.delete(e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,n){t||(t=s()),t.set(e,n)}};return e}},{"es-errors/type":81,"object-inspect":105,"side-channel-list":133,"side-channel-map":134,"side-channel-weakmap":135}],137:[function(t,e,n){var i=t("punycode/");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),d=["%","/","?",";","#"].concat(c),p=["/","?","#"],u=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=t("qs");function y(t,e,n){if(t&&"object"===_typeof(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+_typeof(t));var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",l=t.split(a);l[0]=l[0].replace(/\\/g,"/");var y=t=l.join(a);if(y=y.trim(),!n&&1===t.split("#").length){var b=s.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?g.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var w=r.exec(y);if(w){var C=(w=w[0]).toLowerCase();this.protocol=C,y=y.substr(w.length)}if(n||w||y.match(/^\/\/[^@/]+@[^@/]+/)){var x="//"===y.substr(0,2);!x||w&&v[w]||(y=y.substr(2),this.slashes=!0)}if(!v[w]&&(x||w&&!m[w])){for(var A,k,D=-1,P=0;P<p.length;P++){-1!==(E=y.indexOf(p[P]))&&(-1===D||E<D)&&(D=E)}-1!==(k=-1===D?y.lastIndexOf("@"):y.lastIndexOf("@",D))&&(A=y.slice(0,k),y=y.slice(k+1),this.auth=decodeURIComponent(A)),D=-1;for(P=0;P<d.length;P++){var E;-1!==(E=y.indexOf(d[P]))&&(-1===D||E<D)&&(D=E)}-1===D&&(D=y.length),this.host=y.slice(0,D),y=y.slice(D),this.parseHost(),this.hostname=this.hostname||"";var S="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!S)for(var F=this.hostname.split(/\./),T=(P=0,F.length);P<T;P++){var _=F[P];if(_&&!_.match(u)){for(var R="",I=0,L=_.length;I<L;I++)_.charCodeAt(I)>127?R+="x":R+=_[I];if(!R.match(u)){var M=F.slice(0,P),B=F.slice(P+1),H=_.match(h);H&&(M.push(H[1]),B.unshift(H[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),S||(this.hostname=i.toASCII(this.hostname));var V=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+V,this.href+=this.host,S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!f[C])for(P=0,T=c.length;P<T;P++){var z=c[P];if(-1!==y.indexOf(z)){var N=encodeURIComponent(z);N===z&&(N=escape(z)),y=y.split(z).join(N)}}var O=y.indexOf("#");-1!==O&&(this.hash=y.substr(O),y=y.slice(0,O));var U=y.indexOf("?");if(-1!==U?(this.search=y.substr(U),this.query=y.substr(U+1),e&&(this.query=g.parse(this.query)),y=y.slice(0,U)):e&&(this.search="",this.query={}),y&&(this.pathname=y),m[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var G=this.search||"";this.path=V+G}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,r="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"===_typeof(this.query)&&Object.keys(this.query).length&&(r=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||r&&"?"+r||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||m[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if("string"==typeof t){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,i=Object.keys(this),r=0;r<i.length;r++){var a=i[r];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),l=0;l<s.length;l++){var c=s[l];"protocol"!==c&&(n[c]=t[c])}return m[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname="/",n.path=n.pathname),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!m[t.protocol]){for(var d=Object.keys(t),p=0;p<d.length;p++){var u=d[p];n[u]=t[u]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||v[t.protocol])n.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var f=n.pathname||"",g=n.search||"";n.path=f+g}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=b||y||n.host&&t.pathname,C=w,x=n.pathname&&n.pathname.split("/")||[],A=(h=t.pathname&&t.pathname.split("/")||[],n.protocol&&!m[n.protocol]);if(A&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),w=w&&(""===h[0]||""===x[0])),b)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),n.search=t.search,n.query=t.query;else if(null!=t.search){if(A)n.host=x.shift(),n.hostname=n.host,(S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=S.shift(),n.hostname=S.shift(),n.host=n.hostname);return n.search=t.search,n.query=t.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=x.slice(-1)[0],D=(n.host||t.host||x.length>1)&&("."===k||".."===k)||""===k,P=0,E=x.length;E>=0;E--)"."===(k=x[E])?x.splice(E,1):".."===k?(x.splice(E,1),P++):P&&(x.splice(E,1),P--);if(!w&&!C)for(;P--;P)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),D&&"/"!==x.join("/").substr(-1)&&x.push("");var S,F=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(n.hostname=F?"":x.length?x.shift():"",n.host=n.hostname,(S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=S.shift(),n.hostname=S.shift(),n.host=n.hostname));return(w=w||n.host&&x.length)&&!F&&x.unshift(""),x.length>0?n.pathname=x.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},n.parse=y,n.resolve=function(t,e){return y(t,!1,!0).resolve(e)},n.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},n.format=function(t){return"string"==typeof t&&(t=y(t)),t instanceof o?t.format():o.prototype.format.call(t)},n.Url=o},{"punycode/":127,qs:129}],138:[function(t,e,n){e.exports={Name:"Retold Remote",MainViewportViewIdentifier:"ContentEditor-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1}},{}],139:[function(t,e,n){var i=t("retold-content-system").PictContentEditor,o=(t("pict-section-filebrowser"),t("./providers/Pict-Provider-RetoldRemote.js")),r=t("./providers/Pict-Provider-GalleryNavigation.js"),a=t("./providers/Pict-Provider-GalleryFilterSort.js"),s=t("./providers/Pict-Provider-RetoldRemoteIcons.js"),l=t("./providers/Pict-Provider-RetoldRemoteTheme.js"),c=t("./views/PictView-Remote-Layout.js"),d=t("./views/PictView-Remote-TopBar.js"),p=t("./views/PictView-Remote-SettingsPanel.js"),u=t("./views/PictView-Remote-Gallery.js"),h=t("./views/PictView-Remote-MediaViewer.js"),f=t("./views/PictView-Remote-ImageViewer.js"),v=t("./Pict-Application-RetoldRemote-Configuration.json"),m=function(t){function e(t,n,i){var m;return _classCallCheck(this,e),(m=_callSuper(this,e,[t,Object.assign({},v,n),i])).pict.addView("ContentEditor-Layout",c.default_configuration,c),m.pict.addView("ContentEditor-TopBar",d.default_configuration,d),m.pict.addView("RetoldRemote-Gallery",u.default_configuration,u),m.pict.addView("RetoldRemote-MediaViewer",h.default_configuration,h),m.pict.addView("RetoldRemote-ImageViewer",f.default_configuration,f),m.pict.addView("RetoldRemote-SettingsPanel",p.default_configuration,p),m.pict.addProvider("RetoldRemote-Provider",o.default_configuration,o),m.pict.addProvider("RetoldRemote-GalleryNavigation",r.default_configuration,r),m.pict.addProvider("RetoldRemote-GalleryFilterSort",a.default_configuration,a),m.pict.addProvider("RetoldRemote-Icons",s.default_configuration,s),m.pict.addProvider("RetoldRemote-Theme",l.default_configuration,l),m}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){"undefined"!=typeof window&&(window.pict=this.pict),this.pict.AppData.RetoldRemote={ActiveMode:"gallery",Theme:"twilight",ViewMode:"list",ThumbnailSize:"medium",RawFileList:[],GalleryItems:[],GalleryCursorIndex:0,GalleryFilter:"all",SearchQuery:"",ServerCapabilities:{},FolderSummary:null,CurrentViewerFile:"",CurrentViewerMediaType:"",HashedFilenames:!1,ShowHiddenFiles:!1,DistractionFreeShowNav:!0,ImageFitMode:"auto",SidebarCollapsed:!1,SidebarWidth:250,FilterState:{MediaType:"all",Extensions:[],SizeMin:null,SizeMax:null,DateModifiedAfter:null,DateModifiedBefore:null,DateCreatedAfter:null,DateCreatedBefore:null},SortField:"folder-first",SortDirection:"asc",FilterPanelOpen:!1,FilterPresets:[]},this._loadRemoteSettings();var e=this.pict.providers["RetoldRemote-Theme"];e&&e.applyTheme(this.pict.AppData.RetoldRemote.Theme),this.pict.AppData.ContentEditor={CurrentFile:"",ActiveEditor:"markdown",IsDirty:!1,IsSaving:!1,IsLoading:!1,Files:[],Document:{Segments:[{Content:""}]},CodeContent:"",SaveStatus:"",SaveStatusClass:"",AutoSegmentMarkdown:!1,AutoSegmentDepth:1,AutoContentPreview:!1,MarkdownEditingControls:!0,MarkdownWordWrap:!0,CodeWordWrap:!1,SidebarCollapsed:this.pict.AppData.RetoldRemote.SidebarCollapsed,SidebarWidth:this.pict.AppData.RetoldRemote.SidebarWidth,AutoPreviewImages:!0,AutoPreviewVideo:!1,AutoPreviewAudio:!1,ShowHiddenFiles:this.pict.AppData.RetoldRemote.ShowHiddenFiles,TopicsFilePath:""},this.pict.views["ContentEditor-Layout"].render(),this.pict.views["ContentEditor-TopBar"].render();var n=this,i=this.pict.providers["Pict-FileBrowser-List"];if(i){var o=i.selectFile.bind(i);i.selectFile=function(t){o(t),t&&"file"===t.Type&&n.navigateToFile(t.Path)}}var r=this.pict.providers["Pict-FileBrowser-Browse"];if(r){var a=r.navigateToFolder.bind(r);r.navigateToFolder=function(t){a(t),n.loadFileList(t)}}var s=this.pict.providers["RetoldRemote-Provider"];s&&(s.fetchCapabilities(function(t,e){!t&&e&&(n.pict.AppData.RetoldRemote.ServerCapabilities=e)}),s.fetchRemoteSettings(function(t,e){!t&&e&&(n.pict.AppData.RetoldRemote.HashedFilenames=!!e.HashedFilenames)}));var l=this.pict.providers["RetoldRemote-GalleryNavigation"];if(l&&l.bindKeyboardNavigation(),this.syncHiddenFilesSetting(function(){n.loadFileList(null,function(){n.resolveHash()})}),"function"==typeof t)return t()}},{key:"_getMediaType",value:function(t){if({pdf:!0,epub:!0,mobi:!0}[t])return"document";return{js:!0,mjs:!0,cjs:!0,ts:!0,tsx:!0,jsx:!0,py:!0,rb:!0,java:!0,c:!0,cpp:!0,h:!0,hpp:!0,cs:!0,go:!0,rs:!0,php:!0,sh:!0,bash:!0,zsh:!0,pl:!0,r:!0,swift:!0,kt:!0,scala:!0,lua:!0,json:!0,xml:!0,yaml:!0,yml:!0,toml:!0,ini:!0,cfg:!0,conf:!0,env:!0,properties:!0,md:!0,markdown:!0,txt:!0,csv:!0,tsv:!0,log:!0,html:!0,htm:!0,css:!0,scss:!0,sass:!0,less:!0,sql:!0,graphql:!0,gql:!0,makefile:!0,dockerfile:!0,gitignore:!0,editorconfig:!0,htaccess:!0,npmrc:!0,eslintrc:!0,prettierrc:!0}[t]?"text":_superPropGet(e,"_getMediaType",this,3)([t])}},{key:"navigateToFile",value:function(t){if(t){var e=this.getEditorTypeForFile(t),n=t.replace(/^.*\./,"").toLowerCase(),i=this._getMediaType(n),o=(this.pict.AppData.RetoldRemote,this.pict.providers["RetoldRemote-Provider"]),r=o?o.getFragmentIdentifier(t):t;if(window.location.hash="#/view/"+r,this.pict.AppData.ContentEditor.CurrentFile=t,this.pict.AppData.ContentEditor.ActiveEditor=e,"binary"===e){var a=this.pict.views["RetoldRemote-MediaViewer"];a&&a.showMedia(t,i)}else if("text"===i){var s=this.pict.views["RetoldRemote-MediaViewer"];s&&s.showMedia(t,"text")}else if("other"===i){var l=this.pict.views["RetoldRemote-MediaViewer"];l&&l.showMedia(t,"document")}else{var c=this.pict.views["RetoldRemote-MediaViewer"];c&&c.showMedia(t,i)}var d=this.pict.views["ContentEditor-TopBar"];d&&d.updateInfo()}}},{key:"loadFileList",value:function(t,e){var n="function"==typeof e?e:"function"==typeof t?t:function(){},i=this,o="string"==typeof t?t:null;null===o&&this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var r="/api/filebrowser/list";if(o&&o.length>0){var a=i.pict.providers["RetoldRemote-Provider"];r+=a?"?path="+a._getPathParam(o):"?path="+encodeURIComponent(o)}fetch(r).then(function(t){var e=t.headers.get("X-Retold-Folder-Hash");if(e&&o){var n=i.pict.providers["RetoldRemote-Provider"];n&&n.registerHash(o,e)}return t.json()}).then(function(e){i.pict.AppData.PictFileBrowser=i.pict.AppData.PictFileBrowser||{},i.pict.AppData.PictFileBrowser.FileList=e||[],i.pict.AppData.PictFileBrowser.CurrentLocation="string"==typeof t?t:i.pict.AppData.PictFileBrowser.CurrentLocation||"";var o=i.pict.providers["RetoldRemote-Provider"];if(o&&Array.isArray(e))for(var r=0;r<e.length;r++)e[r].Hash&&e[r].Path&&o.registerHash(e[r].Path,e[r].Hash);var a=i.pict.views["Pict-FileBrowser"];a&&a.render();var s=i.pict.views["Pict-FileBrowser-ListDetail"];s&&s.render();var l=i.pict.AppData.RetoldRemote;l.RawFileList=e||[],l.ActiveMode="gallery",l.SearchQuery="",l.FilterState={MediaType:l.FilterState.MediaType,Extensions:[],SizeMin:null,SizeMax:null,DateModifiedAfter:null,DateModifiedBefore:null,DateCreatedAfter:null,DateCreatedBefore:null};var c=document.getElementById("RetoldRemote-Gallery-Container"),d=document.getElementById("RetoldRemote-Viewer-Container");c&&(c.style.display=""),d&&(d.style.display="none");var p=i.pict.providers["RetoldRemote-GalleryFilterSort"];if(p)p.applyFilterSort();else{l.GalleryItems=e||[],l.GalleryCursorIndex=0;var u=i.pict.views["RetoldRemote-Gallery"];u&&u.renderGallery()}var h=i.pict.AppData.PictFileBrowser.CurrentLocation||"",f=i.pict.providers["RetoldRemote-Provider"],v=f&&h?f.getFragmentIdentifier(h):h;window.location.hash=v?"#/browse/"+v:"#/browse/";var m=i.pict.providers["RetoldRemote-Provider"];if(m)m.fetchFolderSummary(h,function(t,e){if(!t&&e){l.FolderSummary=e;var n=i.pict.views["ContentEditor-TopBar"];n&&(n.updateLocation(),n.updateInfo())}});else{var g=i.pict.views["ContentEditor-TopBar"];g&&(g.updateLocation(),g.updateInfo())}return n()}).catch(function(t){return i.log.error("Failed to load file list: ".concat(t.message)),n()})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t){var e=t.split("/"),n=this.pict.providers["RetoldRemote-Provider"];if("browse"===e[0]){var i=e.slice(1).join("/"),o=n?n.resolveFragmentIdentifier(i):i;o!==(this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation||"")&&this.loadFileList(o)}else if("view"===e[0]&&e.length>=2){var r=e.slice(1).join("/"),a=n?n.resolveFragmentIdentifier(r):r;if(this.pict.AppData.ContentEditor.CurrentFile===a)return;this.navigateToFile(a)}else if("edit"===e[0]&&e.length>=2){var s=e.slice(1).join("/"),l=n?n.resolveFragmentIdentifier(s):s;this.navigateToFile(l)}}}},{key:"saveSettings",value:function(){try{var t=this.pict.AppData.RetoldRemote,e={Theme:t.Theme,ViewMode:t.ViewMode,ThumbnailSize:t.ThumbnailSize,GalleryFilter:t.GalleryFilter,ShowHiddenFiles:t.ShowHiddenFiles,DistractionFreeShowNav:t.DistractionFreeShowNav,ImageFitMode:t.ImageFitMode,SidebarCollapsed:t.SidebarCollapsed,SidebarWidth:t.SidebarWidth,SortField:t.SortField,SortDirection:t.SortDirection,FilterPresets:t.FilterPresets,FilterPanelOpen:t.FilterPanelOpen};localStorage.setItem("retold-remote-settings",JSON.stringify(e))}catch(t){}}},{key:"_loadRemoteSettings",value:function(){try{var t=localStorage.getItem("retold-remote-settings");if(t){var e=JSON.parse(t),n=this.pict.AppData.RetoldRemote;e.Theme&&(n.Theme=e.Theme),e.ViewMode&&(n.ViewMode=e.ViewMode),e.ThumbnailSize&&(n.ThumbnailSize=e.ThumbnailSize),e.GalleryFilter&&(n.GalleryFilter=e.GalleryFilter,n.FilterState.MediaType=e.GalleryFilter),"boolean"==typeof e.ShowHiddenFiles&&(n.ShowHiddenFiles=e.ShowHiddenFiles),"boolean"==typeof e.DistractionFreeShowNav&&(n.DistractionFreeShowNav=e.DistractionFreeShowNav),e.ImageFitMode&&(n.ImageFitMode=e.ImageFitMode),"boolean"==typeof e.SidebarCollapsed&&(n.SidebarCollapsed=e.SidebarCollapsed),e.SidebarWidth&&(n.SidebarWidth=e.SidebarWidth),e.SortField&&(n.SortField=e.SortField),e.SortDirection&&(n.SortDirection=e.SortDirection),Array.isArray(e.FilterPresets)&&(n.FilterPresets=e.FilterPresets),"boolean"==typeof e.FilterPanelOpen&&(n.FilterPanelOpen=e.FilterPanelOpen)}}catch(t){}}}])}(i);e.exports=m},{"./Pict-Application-RetoldRemote-Configuration.json":138,"./providers/Pict-Provider-GalleryFilterSort.js":141,"./providers/Pict-Provider-GalleryNavigation.js":142,"./providers/Pict-Provider-RetoldRemote.js":143,"./providers/Pict-Provider-RetoldRemoteIcons.js":144,"./providers/Pict-Provider-RetoldRemoteTheme.js":145,"./views/PictView-Remote-Gallery.js":146,"./views/PictView-Remote-ImageViewer.js":147,"./views/PictView-Remote-Layout.js":148,"./views/PictView-Remote-MediaViewer.js":149,"./views/PictView-Remote-SettingsPanel.js":150,"./views/PictView-Remote-TopBar.js":151,"pict-section-filebrowser":110,"retold-content-system":57}],140:[function(t,e,n){e.exports={RetoldRemoteApplication:t("./Pict-Application-RetoldRemote.js")},"undefined"!=typeof window&&(window.RetoldRemoteApplication=e.exports.RetoldRemoteApplication)},{"./Pict-Application-RetoldRemote.js":139}],141:[function(t,e,n){var i=t("pict-provider"),o={png:!0,jpg:!0,jpeg:!0,gif:!0,webp:!0,svg:!0,bmp:!0,ico:!0,avif:!0,tiff:!0,tif:!0},r={mp4:!0,webm:!0,mov:!0,mkv:!0,avi:!0,wmv:!0,flv:!0,m4v:!0},a={mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0},s={pdf:!0,epub:!0,mobi:!0},l=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"applyFilterSort",value:function(){var t=this.pict.AppData.RetoldRemote;if(t){var e=(t.RawFileList||[]).slice();e=this._applySearch(e,t.SearchQuery);var n=t.FilterState||{};e=this._applyMediaTypeFilter(e,n.MediaType||"all"),e=this._applyExtensionFilter(e,n.Extensions||[]),e=this._applySizeFilter(e,n.SizeMin,n.SizeMax),e=this._applyDateFilter(e,n),e=this._sortItems(e,t.SortField||"folder-first",t.SortDirection||"asc"),t.GalleryItems=e,t.GalleryCursorIndex=0;var i=this.pict.views["RetoldRemote-Gallery"];i&&i.renderGallery()}}},{key:"_applySearch",value:function(t,e){if(!e)return t;var n=e.toLowerCase();return t.filter(function(t){return t.Name.toLowerCase().includes(n)})}},{key:"_applyMediaTypeFilter",value:function(t,e){var n=this;return"all"===e?t:t.filter(function(t){if("folder"===t.Type)return!0;var i=n.getCategory((t.Extension||"").toLowerCase());return"images"===e?"image"===i:"video"===e?"video"===i:"audio"===e?"audio"===i:"documents"!==e||"document"===i})}},{key:"_applyExtensionFilter",value:function(t,e){if(!e||0===e.length)return t;for(var n={},i=0;i<e.length;i++)n[e[i].toLowerCase()]=!0;return t.filter(function(t){if("folder"===t.Type)return!0;var e=(t.Extension||"").replace(/^\./,"").toLowerCase();return!0===n[e]})}},{key:"_applySizeFilter",value:function(t,e,n){return null===e&&null===n?t:t.filter(function(t){if("folder"===t.Type)return!0;var i=t.Size||0;return!(null!==e&&i<e)&&!(null!==n&&i>n)})}},{key:"_applyDateFilter",value:function(t,e){var n=e.DateModifiedAfter?new Date(e.DateModifiedAfter).getTime():null,i=e.DateModifiedBefore?new Date(e.DateModifiedBefore+"T23:59:59").getTime():null,o=e.DateCreatedAfter?new Date(e.DateCreatedAfter).getTime():null,r=e.DateCreatedBefore?new Date(e.DateCreatedBefore+"T23:59:59").getTime():null;return null===n&&null===i&&null===o&&null===r?t:t.filter(function(t){if("folder"===t.Type)return!0;if(null!==n||null!==i){var e=t.Modified?new Date(t.Modified).getTime():0;if(null!==n&&e<n)return!1;if(null!==i&&e>i)return!1}if(null!==o||null!==r){var a=t.Created?new Date(t.Created).getTime():0;if(null!==o&&a<o)return!1;if(null!==r&&a>r)return!1}return!0})}},{key:"_sortItems",value:function(t,e,n){var i="desc"===n?-1:1;return t.slice().sort(function(t,n){if("folder-first"===e){if("folder"===t.Type&&"folder"!==n.Type)return-1;if("folder"!==t.Type&&"folder"===n.Type)return 1;var o=(t.Name||"").toLowerCase(),r=(n.Name||"").toLowerCase();return o<r?-1*i:o>r?1*i:0}if("name"===e){var a=(t.Name||"").toLowerCase(),s=(n.Name||"").toLowerCase();return a<s?-1*i:a>s?1*i:0}if("modified"===e){var l=t.Modified?new Date(t.Modified).getTime():0,c=n.Modified?new Date(n.Modified).getTime():0;if(l!==c)return(l-c)*i;var d=(t.Name||"").toLowerCase(),p=(n.Name||"").toLowerCase();return d<p?-1:d>p?1:0}if("created"===e){var u=t.Created?new Date(t.Created).getTime():0,h=n.Created?new Date(n.Created).getTime():0;if(u!==h)return(u-h)*i;var f=(t.Name||"").toLowerCase(),v=(n.Name||"").toLowerCase();return f<v?-1:f>v?1:0}return 0})}},{key:"getCategory",value:function(t){var e=(t||"").replace(/^\./,"").toLowerCase();return o[e]?"image":r[e]?"video":a[e]?"audio":s[e]?"document":"other"}},{key:"getAvailableExtensions",value:function(){for(var t=this.pict.AppData.RetoldRemote,e=t?t.RawFileList:[],n={},i=0;i<e.length;i++){var o=e[i];if("folder"!==o.Type){var r=(o.Extension||"").replace(/^\./,"").toLowerCase();r&&(n[r]||(n[r]={ext:r,category:this.getCategory(r),count:0}),n[r].count++)}}var a={image:0,video:1,audio:2,document:3,other:4},s=Object.values(n);return s.sort(function(t,e){var n=a[t.category]||99,i=a[e.category]||99;return n!==i?n-i:t.ext<e.ext?-1:t.ext>e.ext?1:0}),s}},{key:"getActiveFilterChips",value:function(){var t=this.pict.AppData.RetoldRemote;if(!t)return[];var e=[],n=t.FilterState||{};if(n.MediaType&&"all"!==n.MediaType){e.push({key:"mediaType",label:{images:"Images",video:"Video",audio:"Audio",documents:"Docs"}[n.MediaType]||n.MediaType})}var i=n.Extensions||[];if(i.length>0)for(var o=0;o<i.length;o++)e.push({key:"ext:"+i[o],label:"."+i[o]});return null!==n.SizeMin&&void 0!==n.SizeMin&&e.push({key:"sizeMin",label:"≥ "+this._formatSizeKB(n.SizeMin)}),null!==n.SizeMax&&void 0!==n.SizeMax&&e.push({key:"sizeMax",label:"≤ "+this._formatSizeKB(n.SizeMax)}),n.DateModifiedAfter&&e.push({key:"dateModifiedAfter",label:"Modified after "+n.DateModifiedAfter}),n.DateModifiedBefore&&e.push({key:"dateModifiedBefore",label:"Modified before "+n.DateModifiedBefore}),n.DateCreatedAfter&&e.push({key:"dateCreatedAfter",label:"Created after "+n.DateCreatedAfter}),n.DateCreatedBefore&&e.push({key:"dateCreatedBefore",label:"Created before "+n.DateCreatedBefore}),t.SearchQuery&&e.push({key:"search",label:'Search: "'+t.SearchQuery+'"'}),e}},{key:"_formatSizeKB",value:function(t){return t>=1048576?(t/1048576).toFixed(1)+" MB":Math.round(t/1024)+" KB"}},{key:"removeFilter",value:function(t){var e=this.pict.AppData.RetoldRemote;if(e){var n=e.FilterState;if("mediaType"===t)n.MediaType="all",e.GalleryFilter="all";else if(t.startsWith("ext:")){var i=t.substring(4);n.Extensions=(n.Extensions||[]).filter(function(t){return t!==i})}else"sizeMin"===t?n.SizeMin=null:"sizeMax"===t?n.SizeMax=null:"dateModifiedAfter"===t?n.DateModifiedAfter=null:"dateModifiedBefore"===t?n.DateModifiedBefore=null:"dateCreatedAfter"===t?n.DateCreatedAfter=null:"dateCreatedBefore"===t?n.DateCreatedBefore=null:"search"===t&&(e.SearchQuery="")}}},{key:"clearAllFilters",value:function(){var t=this.pict.AppData.RetoldRemote;t&&(t.SearchQuery="",t.GalleryFilter="all",t.FilterState={MediaType:"all",Extensions:[],SizeMin:null,SizeMax:null,DateModifiedAfter:null,DateModifiedBefore:null,DateCreatedAfter:null,DateCreatedBefore:null})}},{key:"savePreset",value:function(t){if(t){var e=this.pict.AppData.RetoldRemote;if(e){var n={Name:t,FilterState:JSON.parse(JSON.stringify(e.FilterState)),SortField:e.SortField,SortDirection:e.SortDirection};e.FilterPresets=e.FilterPresets||[],e.FilterPresets.push(n)}}}},{key:"loadPreset",value:function(t){var e=this.pict.AppData.RetoldRemote;if(e&&e.FilterPresets){var n=e.FilterPresets[t];n&&(e.FilterState=JSON.parse(JSON.stringify(n.FilterState)),e.GalleryFilter=e.FilterState.MediaType||"all",e.SortField=n.SortField||"folder-first",e.SortDirection=n.SortDirection||"asc")}}},{key:"deletePreset",value:function(t){var e=this.pict.AppData.RetoldRemote;e&&e.FilterPresets&&e.FilterPresets.splice(t,1)}}])}(i);l.default_configuration={ProviderIdentifier:"RetoldRemote-GalleryFilterSort",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!1},e.exports=l},{"pict-provider":108}],142:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._columnsPerRow=4,o._keydownBound=!1,o._helpPanelVisible=!1,o}return _inherits(e,t),_createClass(e,[{key:"recalculateColumns",value:function(){if("list"!==this.pict.AppData.RetoldRemote.ViewMode){var t=document.querySelectorAll(".retold-remote-tile");if(t.length<2)this._columnsPerRow=Math.max(1,t.length);else{for(var e=t[0].offsetTop,n=1,i=1;i<t.length&&t[i].offsetTop===e;i++)n++;this._columnsPerRow=n}}else this._columnsPerRow=1}},{key:"bindKeyboardNavigation",value:function(){if(!this._keydownBound){var t=this;this._keydownHandler=function(e){if("F1"===e.key)return e.preventDefault(),void t._toggleHelpPanel();if("INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&!e.target.isContentEditable){if(t._helpPanelVisible&&"Escape"===e.key)return e.preventDefault(),void t._toggleHelpPanel();var n=t.pict.AppData.RetoldRemote.ActiveMode;"gallery"===n?t._handleGalleryKey(e):"viewer"===n&&t._handleViewerKey(e)}},document.addEventListener("keydown",this._keydownHandler),this._keydownBound=!0}}},{key:"_handleGalleryKey",value:function(t){var e=this.pict.AppData.RetoldRemote,n=e.GalleryItems||[],i=e.GalleryCursorIndex||0;switch(t.key){case"ArrowRight":t.preventDefault(),this.moveCursor(Math.min(i+1,n.length-1));break;case"ArrowLeft":t.preventDefault(),this.moveCursor(Math.max(i-1,0));break;case"ArrowDown":t.preventDefault(),this.moveCursor(Math.min(i+this._columnsPerRow,n.length-1));break;case"ArrowUp":t.preventDefault(),this.moveCursor(Math.max(i-this._columnsPerRow,0));break;case"Enter":t.preventDefault(),this.openCurrent();break;case"Escape":t.preventDefault(),this.navigateUp();break;case"g":t.preventDefault(),this._toggleViewMode();break;case"/":t.preventDefault(),this._focusSearch();break;case"Home":t.preventDefault(),this.moveCursor(0);break;case"End":t.preventDefault(),this.moveCursor(n.length-1);break;case"f":t.preventDefault();var o=this.pict.views["RetoldRemote-Gallery"];o&&o.toggleFilterPanel();break;case"s":t.preventDefault();var r=document.getElementById("RetoldRemote-Gallery-Sort");r&&r.focus();break;case"c":t.preventDefault(),this._toggleSettingsPanel();break;case"d":t.preventDefault(),this._toggleDistractionFree()}}},{key:"_handleViewerKey",value:function(t){switch(t.key){case"Escape":t.preventDefault(),this.closeViewer();break;case"ArrowRight":case"j":t.preventDefault(),this.nextFile();break;case"ArrowLeft":case"k":t.preventDefault(),this.prevFile();break;case"f":t.preventDefault(),this._toggleFullscreen();break;case"i":t.preventDefault(),this._toggleFileInfo();break;case" ":t.preventDefault(),this._togglePlayPause();break;case"+":case"=":t.preventDefault(),this._zoomIn();break;case"-":t.preventDefault(),this._zoomOut();break;case"0":t.preventDefault(),this._zoomReset();break;case"z":t.preventDefault(),this._cycleFitMode();break;case"d":t.preventDefault(),this._toggleDistractionFree()}}},{key:"moveCursor",value:function(t){var e=this.pict.AppData.RetoldRemote,n=e.GalleryCursorIndex||0;if(t!==n){e.GalleryCursorIndex=t;var i=document.querySelector('.retold-remote-tile[data-index="'.concat(n,'"], .retold-remote-list-row[data-index="').concat(n,'"]')),o=document.querySelector('.retold-remote-tile[data-index="'.concat(t,'"], .retold-remote-list-row[data-index="').concat(t,'"]'));i&&i.classList.remove("selected"),o&&(o.classList.add("selected"),o.scrollIntoView({block:"nearest",behavior:"smooth"}))}}},{key:"openCurrent",value:function(){var t=this.pict.AppData.RetoldRemote,e=t.GalleryItems||[],n=t.GalleryCursorIndex||0;if(!(n>=e.length)){var i=e[n];if("folder"===i.Type){var o=this.pict.PictApplication;o&&o.loadFileList&&o.loadFileList(i.Path)}else{var r=this.pict.PictApplication;r&&r.navigateToFile&&r.navigateToFile(i.Path)}}}},{key:"navigateUp",value:function(){var t=this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation||"";if(t){var e=t.replace(/\/[^/]+\/?$/,"")||"",n=this.pict.PictApplication;n&&n.loadFileList&&n.loadFileList(e)}}},{key:"closeViewer",value:function(){this.pict.AppData.RetoldRemote.ActiveMode="gallery";var t=document.getElementById("RetoldRemote-Gallery-Container"),e=document.getElementById("RetoldRemote-Viewer-Container");t&&(t.style.display=""),e&&(e.style.display="none");var n=this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation||"",i=this.pict.providers["RetoldRemote-Provider"],o=i&&n?i.getFragmentIdentifier(n):n;window.location.hash=o?"#/browse/"+o:"#/browse/";var r=this.pict.views["RetoldRemote-Gallery"];r&&r.renderGallery()}},{key:"nextFile",value:function(){for(var t=this.pict.AppData.RetoldRemote,e=t.GalleryItems||[],n=(t.GalleryCursorIndex||0)+1;n<e.length;n++)if("file"===e[n].Type){t.GalleryCursorIndex=n;var i=this.pict.PictApplication;return void(i&&i.navigateToFile&&i.navigateToFile(e[n].Path))}}},{key:"prevFile",value:function(){for(var t=this.pict.AppData.RetoldRemote,e=t.GalleryItems||[],n=(t.GalleryCursorIndex||0)-1;n>=0;n--)if("file"===e[n].Type){t.GalleryCursorIndex=n;var i=this.pict.PictApplication;return void(i&&i.navigateToFile&&i.navigateToFile(e[n].Path))}}},{key:"_toggleViewMode",value:function(){var t=this.pict.AppData.RetoldRemote;t.ViewMode="gallery"===t.ViewMode?"list":"gallery";var e=this.pict.views["RetoldRemote-Gallery"];e&&e.renderGallery();var n=this.pict.PictApplication;n&&"function"==typeof n.saveSettings&&n.saveSettings()}},{key:"_focusSearch",value:function(){var t=document.getElementById("RetoldRemote-Gallery-Search");t&&t.focus()}},{key:"_toggleHelpPanel",value:function(){var t=document.getElementById("RetoldRemote-Help-Panel");if(t)return t.remove(),void(this._helpPanelVisible=!1);this._helpPanelVisible=!0;var e=document.createElement("div");e.id="RetoldRemote-Help-Panel",e.innerHTML=this._buildHelpPanelHTML(),(document.fullscreenElement||document.body).appendChild(e)}},{key:"_buildHelpPanelHTML",value:function(){var t=this.pict.AppData.RetoldRemote.ActiveMode||"gallery",e='<div class="retold-remote-help-backdrop" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\']._toggleHelpPanel()">';e+='<div class="retold-remote-help-flyout" onclick="event.stopPropagation()">',e+='<div class="retold-remote-help-header">',e+='<span class="retold-remote-help-title">Keyboard Shortcuts</span>',e+='<button class="retold-remote-help-close" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\']._toggleHelpPanel()">&times;</button>',e+="</div>",e+='<div class="retold-remote-help-section">',e+='<div class="retold-remote-help-section-title">Gallery / File List</div>';for(var n=[["← → ↑ ↓","Navigate tiles"],["Enter","Open selected item"],["Escape","Go up one folder"],["Home / End","Jump to first / last"],["g","Toggle gallery / list view"],["/","Focus search bar"],["f","Toggle filter panel"],["s","Focus sort dropdown"],["c","Settings / config panel"],["d","Distraction-free mode"]],i=0;i<n.length;i++)e+='<div class="retold-remote-help-row">',e+='<kbd class="retold-remote-help-key">'+n[i][0]+"</kbd>",e+='<span class="retold-remote-help-desc">'+n[i][1]+"</span>",e+="</div>";e+="</div>",e+='<div class="retold-remote-help-section">',e+='<div class="retold-remote-help-section-title">Media Viewer</div>';for(var o=[["← / k","Previous file"],["→ / j","Next file"],["Escape","Back to gallery"],["f","Toggle fullscreen"],["i","Toggle file info"],["Space","Play / pause media"],["z","Cycle fit mode"],["+ / -","Zoom in / out"],["0","Reset zoom"],["d","Distraction-free mode"]],r=0;r<o.length;r++)e+='<div class="retold-remote-help-row">',e+='<kbd class="retold-remote-help-key">'+o[r][0]+"</kbd>",e+='<span class="retold-remote-help-desc">'+o[r][1]+"</span>",e+="</div>";e+="</div>",e+='<div class="retold-remote-help-section">',e+='<div class="retold-remote-help-section-title">Global</div>';for(var a=[["F1","Toggle this help panel"],["Escape","Close help panel"]],s=0;s<a.length;s++)e+='<div class="retold-remote-help-row">',e+='<kbd class="retold-remote-help-key">'+a[s][0]+"</kbd>",e+='<span class="retold-remote-help-desc">'+a[s][1]+"</span>",e+="</div>";return e+="</div>",e+='<div class="retold-remote-help-footer">',e+="Current mode: <strong>"+("viewer"===t?"Media Viewer":"Gallery")+"</strong>",e+="</div>",e+="</div>",e+="</div>"}},{key:"_toggleSettingsPanel",value:function(){var t=this.pict.views["ContentEditor-Layout"];if(t){var e=document.querySelector(".content-editor-sidebar-wrap");if(e){var n=e.classList.contains("collapsed"),i=document.querySelector('.content-editor-sidebar-tab[data-tab="settings"]'),o=i&&i.classList.contains("active");n?(t.toggleSidebar(),t.switchSidebarTab("settings")):o?t.switchSidebarTab("files"):t.switchSidebarTab("settings")}}}},{key:"_toggleFilterPresets",value:function(){var t=this.pict.AppData.RetoldRemote,e=this.pict.views["RetoldRemote-Gallery"];"gallery"===t.ActiveMode&&(!t.FilterPanelOpen&&e&&e.toggleFilterPanel(),setTimeout(function(){var t=document.getElementById("RetoldRemote-Filter-PresetSelect");if(t)t.focus(),t.click();else{var e=document.getElementById("RetoldRemote-Filter-PresetName");e&&e.focus()}},50))}},{key:"_toggleDistractionFree",value:function(){var t=this,e=this.pict.AppData.RetoldRemote,n=document.getElementById("ContentEditor-TopBar-Container"),i=document.querySelector(".content-editor-sidebar-wrap");if(n&&i){if(e._distractionFreeMode||!1){n.style.display="",i.style.display="",e._distractionFreeMode=!1;var o=document.querySelector(".retold-remote-viewer-header");o&&(o.style.display="")}else if(n.style.display="none",i.style.display="none",e._distractionFreeMode=!0,!e.DistractionFreeShowNav){var r=document.querySelector(".retold-remote-viewer-header");r&&(r.style.display="none")}setTimeout(function(){return t.recalculateColumns()},100)}}},{key:"_toggleFullscreen",value:function(){var t=document.getElementById("RetoldRemote-Viewer-Container");t&&(document.fullscreenElement?document.exitFullscreen():t.requestFullscreen())}},{key:"_toggleFileInfo",value:function(){var t=document.getElementById("RetoldRemote-FileInfo-Overlay");t&&(t.style.display="none"===t.style.display?"":"none")}},{key:"_togglePlayPause",value:function(){var t=document.querySelector("#RetoldRemote-Viewer-Container video"),e=document.querySelector("#RetoldRemote-Viewer-Container audio"),n=t||e;n&&(n.paused?n.play():n.pause())}},{key:"_zoomIn",value:function(){var t=this.pict.views["RetoldRemote-ImageViewer"];t&&t.zoomIn&&t.zoomIn()}},{key:"_zoomOut",value:function(){var t=this.pict.views["RetoldRemote-ImageViewer"];t&&t.zoomOut&&t.zoomOut()}},{key:"_zoomReset",value:function(){var t=this.pict.views["RetoldRemote-ImageViewer"];t&&t.zoomReset&&t.zoomReset()}},{key:"_cycleFitMode",value:function(){var t=this.pict.views["RetoldRemote-ImageViewer"];t&&t.cycleFitMode&&t.cycleFitMode()}}])}(t("pict-provider"));i.default_configuration={ProviderIdentifier:"RetoldRemote-GalleryNavigation",AutoInitialize:!0,AutoSolveWithApp:!1},e.exports=i},{"pict-provider":108}],143:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._pathToHash={},o._hashToPath={},o}return _inherits(e,t),_createClass(e,[{key:"fetchCapabilities",value:function(t){fetch("/api/media/capabilities").then(function(t){return t.json()}).then(function(e){return e&&e.Capabilities?t(null,e.Capabilities):t(null,{})}).catch(function(e){return t(e)})}},{key:"fetchRemoteSettings",value:function(t){fetch("/api/remote/settings").then(function(t){return t.json()}).then(function(e){return t(null,e||{})}).catch(function(e){return t(e)})}},{key:"registerHash",value:function(t,e){t&&e&&(this._pathToHash[t]=e,this._hashToPath[e]=t)}},{key:"getHashForPath",value:function(t){return this._pathToHash[t]||null}},{key:"getPathForHash",value:function(t){return this._hashToPath[t]||null}},{key:"_getPathParam",value:function(t){if(this.pict.AppData.RetoldRemote.HashedFilenames){var e=this.getHashForPath(t);if(e)return e}return encodeURIComponent(t)}},{key:"getFragmentIdentifier",value:function(t){if(this.pict.AppData.RetoldRemote.HashedFilenames){var e=this.getHashForPath(t);if(e)return e}return t}},{key:"resolveFragmentIdentifier",value:function(t){if(t&&/^[a-f0-9]{10}$/.test(t)){var e=this.getPathForHash(t);if(null!==e)return e}return t}},{key:"getContentURL",value:function(t){return"/content/"+t.split("/").map(function(t){return encodeURIComponent(t)}).join("/")}},{key:"getThumbnailURL",value:function(t,e,n){var i=this.pict.AppData.RetoldRemote.ServerCapabilities,o=t.replace(/^.*\./,"").toLowerCase(),r=this._isImageExtension(o);return i&&(i.sharp||i.imagemagick)?"/api/media/thumbnail?path="+this._getPathParam(t)+"&width="+(e||200)+"&height="+(n||200):r?this.getContentURL(t):null}},{key:"fetchMediaProbe",value:function(t,e){var n=this;fetch("/api/media/probe?path="+this._getPathParam(t)).then(function(t){return t.json()}).then(function(t){t&&t.Hash&&t.Path&&n.registerHash(t.Path,t.Hash),e(null,t)}).catch(function(t){return e(t)})}},{key:"fetchFolderSummary",value:function(t,e){var n="/api/media/folder-summary";t&&(n+="?path="+this._getPathParam(t)),fetch(n).then(function(t){return t.json()}).then(function(t){return e(null,t)}).catch(function(t){return e(t)})}},{key:"_isImageExtension",value:function(t){return!!{png:!0,jpg:!0,jpeg:!0,gif:!0,webp:!0,svg:!0,bmp:!0,ico:!0,avif:!0,tiff:!0,tif:!0}[t]}}])}(t("pict-provider"));i.default_configuration={ProviderIdentifier:"RetoldRemote-Provider",AutoInitialize:!0,AutoSolveWithApp:!1},e.exports=i},{"pict-provider":108}],144:[function(t,e,n){var i,o=t("pict-provider"),r={Primary:"#C0C0DD",Accent:"#66C2B8",Muted:"#6A6A8A",Light:"#2A2A4A",WarmBeige:"#2E2E4E",TealTint:"#1E3A3A",Lavender:"#2A2A48",AmberTint:"#3A3028",PdfFill:"#3A2028",PdfText:"#E06060"};try{i=t("pict-section-filebrowser/source/providers/Pict-Provider-FileBrowserIcons.js").ExtensionMap}catch(t){i={}}var a=Object.keys(i).length>0?i:{".jpg":"file-image",".jpeg":"file-image",".png":"file-image",".gif":"file-image",".svg":"file-image",".webp":"file-image",".bmp":"file-image",".ico":"file-image",".tiff":"file-image",".tif":"file-image",".heic":"file-image",".heif":"file-image",".avif":"file-image",".raw":"file-image",".txt":"file-text",".md":"file-text",".rtf":"file-text",".doc":"file-text",".docx":"file-text",".pdf":"file-pdf",".xls":"file-spreadsheet",".xlsx":"file-spreadsheet",".csv":"file-spreadsheet",".ods":"file-spreadsheet",".js":"file-code",".ts":"file-code",".jsx":"file-code",".tsx":"file-code",".py":"file-code",".rb":"file-code",".java":"file-code",".c":"file-code",".cpp":"file-code",".h":"file-code",".go":"file-code",".rs":"file-code",".swift":"file-code",".kt":"file-code",".scala":"file-code",".sh":"file-code",".bash":"file-code",".zsh":"file-code",".php":"file-code",".lua":"file-code",".r":"file-code",".sql":"file-code",".pl":"file-code",".html":"file-web",".htm":"file-web",".css":"file-web",".scss":"file-web",".less":"file-web",".xml":"file-web",".json":"file-config",".yaml":"file-config",".yml":"file-config",".toml":"file-config",".ini":"file-config",".env":"file-config",".conf":"file-config",".cfg":"file-config",".zip":"file-archive",".tar":"file-archive",".gz":"file-archive",".rar":"file-archive",".7z":"file-archive",".bz2":"file-archive",".xz":"file-archive",".tgz":"file-archive",".mp3":"file-audio",".wav":"file-audio",".flac":"file-audio",".ogg":"file-audio",".aac":"file-audio",".wma":"file-audio",".m4a":"file-audio",".opus":"file-audio",".aiff":"file-audio",".mp4":"file-video",".avi":"file-video",".mov":"file-video",".mkv":"file-video",".webm":"file-video",".wmv":"file-video",".flv":"file-video",".m4v":"file-video",".epub":"file-text",".mobi":"file-text"},s=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._colors=Object.assign({},r),o._icons=o._buildIconSet(),o._customIcons={},o._extensionMap=Object.assign({},a),o._cssInjected=!1,o}return _inherits(e,t),_createClass(e,[{key:"_buildIconSet",value:function(){var t=this;return{folder:function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+n.WarmBeige+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 9H20.8" stroke="'+n.Primary+'" stroke-width="1" opacity="0.3" /></svg>'},"folder-open":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+n.WarmBeige+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 10.2L5.8 17.8C6 18.4 6.6 18.9 7.2 18.9H19.8L22.1 11.2C22.3 10.6 21.8 10 21.2 10H5.2C4.6 10 4 10.4 3.8 11" stroke="'+n.Primary+'" stroke-width="1.5" fill="'+n.Light+'" stroke-linecap="round" stroke-linejoin="round" opacity="0.7" /></svg>'},file:function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.Light+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-text":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.Light+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><line x1="8.1" y1="12.8" x2="15.9" y2="12.8" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="15.8" x2="15.9" y2="15.8" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="18.8" x2="12.2" y2="18.8" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-code":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.Light+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M8.5 13.2L6.8 15.1L8.6 16.8" stroke="'+n.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><path d="M15.5 13.2L17.2 15.1L15.4 16.8" stroke="'+n.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><line x1="12.8" y1="12" x2="11.2" y2="18" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-image":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><rect x="3.1" y="3.2" width="17.8" height="17.7" rx="2" fill="'+n.Lavender+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="8.3" cy="8.7" r="1.8" fill="'+n.Accent+'" /><path d="M20.8 15.2L15.9 10.1L5.2 20.8" stroke="'+n.Primary+'" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-pdf":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.PdfFill+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><text x="8.2" y="16.8" font-family="sans-serif" font-weight="700" font-size="6.5" fill="'+n.PdfText+'" letter-spacing="-0.3">PDF</text></svg>'},"file-spreadsheet":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.TealTint+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="7.2" y="11.1" width="9.8" height="7.8" rx="0.5" fill="none" stroke="'+n.Accent+'" stroke-width="1.2" /><line x1="7.2" y1="13.7" x2="17" y2="13.7" stroke="'+n.Accent+'" stroke-width="1" /><line x1="7.2" y1="16.3" x2="17" y2="16.3" stroke="'+n.Accent+'" stroke-width="1" /><line x1="10.9" y1="11.1" x2="10.9" y2="18.9" stroke="'+n.Accent+'" stroke-width="1" /></svg>'},"file-archive":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.WarmBeige+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="8.8" y="11.2" width="2.5" height="2" rx="0.4" fill="'+n.Primary+'" /><rect x="8.8" y="14.2" width="2.5" height="2" rx="0.4" fill="'+n.Primary+'" /><rect x="8.8" y="17.2" width="2.5" height="2" rx="0.4" fill="'+n.Primary+'" /></svg>'},"file-audio":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.AmberTint+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="10.2" cy="16.8" r="2.1" fill="none" stroke="'+n.Accent+'" stroke-width="1.5" /><path d="M12.2 16.8V11.2L16.1 10.1" stroke="'+n.Accent+'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none" /><circle cx="16.1" cy="15.3" r="1.4" fill="none" stroke="'+n.Accent+'" stroke-width="1.2" /></svg>'},"file-video":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.Lavender+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M9.8 12.2V18.2L15.8 15.2L9.8 12.2Z" fill="'+n.Accent+'" stroke="'+n.Accent+'" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-web":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="8.9" fill="'+n.TealTint+'" stroke="'+n.Primary+'" stroke-width="1.8" /><ellipse cx="12" cy="12" rx="4.1" ry="8.9" fill="none" stroke="'+n.Primary+'" stroke-width="1.2" /><line x1="3.1" y1="12" x2="20.9" y2="12" stroke="'+n.Primary+'" stroke-width="1" /><path d="M4.8 7.8C7 8.5 9.4 8.9 12 8.9C14.6 8.9 17 8.5 19.2 7.8" stroke="'+n.Primary+'" stroke-width="1" fill="none" /><path d="M4.8 16.2C7 15.5 9.4 15.1 12 15.1C14.6 15.1 17 15.5 19.2 16.2" stroke="'+n.Primary+'" stroke-width="1" fill="none" /></svg>'},"file-config":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.Light+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="12" cy="15" r="2.8" fill="none" stroke="'+n.Muted+'" stroke-width="1.5" /><line x1="12" y1="11" x2="12" y2="12.2" stroke="'+n.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="12" y1="17.8" x2="12" y2="19" stroke="'+n.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="13.2" x2="15.8" y2="12.6" stroke="'+n.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="17" x2="9.2" y2="16.4" stroke="'+n.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="16.8" x2="15.8" y2="17.4" stroke="'+n.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="13" x2="9.2" y2="13.6" stroke="'+n.Muted+'" stroke-width="1.3" stroke-linecap="round" /></svg>'},home:function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M3.1 9.6L12 3.1L20.9 9.6V19.9C20.9 20.5 20.5 21 19.9 20.9H4.1C3.5 21 3 20.5 3.1 19.9V9.6Z" fill="'+n.TealTint+'" stroke="'+n.Accent+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="9.2" y="14.1" width="5.6" height="6.9" rx="0.5" fill="'+n.Accent+'" /></svg>'},"arrow-up":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M12.1 19.1V5.1" stroke="'+n.Muted+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M5.2 11.9L12.1 5.1L18.9 11.9" stroke="'+n.Muted+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-right":function(e){return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M9.2 6.1L14.8 12.1L9.1 17.9" stroke="'+t._colors.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-down":function(e){return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M6.1 9.2L12.1 14.8L17.9 9.1" stroke="'+t._colors.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},search:function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><circle cx="10.8" cy="10.8" r="6.8" stroke="'+n.Primary+'" stroke-width="1.8" /><line x1="15.9" y1="16.1" x2="20.8" y2="20.8" stroke="'+n.Primary+'" stroke-width="2" stroke-linecap="round" /></svg>'},"sort-asc":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+n.Primary+'" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+n.Muted+'" opacity="0.35" /></svg>'},"sort-desc":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+n.Muted+'" opacity="0.35" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+n.Primary+'" /></svg>'},"music-note":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><circle cx="8.2" cy="17.8" r="3.1" fill="'+n.AmberTint+'" stroke="'+n.Accent+'" stroke-width="1.8" /><path d="M11.2 17.8V5.2L19.1 3.1V14.8" stroke="'+n.Accent+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" /><circle cx="16.1" cy="14.8" r="2.4" fill="'+n.AmberTint+'" stroke="'+n.Accent+'" stroke-width="1.5" /></svg>'},"film-strip":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><rect x="3" y="4" width="18" height="16" rx="2" stroke="'+n.Primary+'" stroke-width="1.8" fill="'+n.Lavender+'" /><path d="M9.5 8.5V15.5L16 12L9.5 8.5Z" fill="'+n.Accent+'" stroke="'+n.Accent+'" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"gallery-empty":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+n.WarmBeige+'" stroke="'+n.Muted+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><line x1="9" y1="11" x2="15" y2="17" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" opacity="0.5" /><line x1="15" y1="11" x2="9" y2="17" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" opacity="0.5" /></svg>'},"document-large":function(e){var n=t._colors;return'<svg width="'+e+'" height="'+e+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+n.Light+'" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+n.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><line x1="8.1" y1="13" x2="15.9" y2="13" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="16" x2="15.9" y2="16" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="19" x2="12" y2="19" stroke="'+n.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'}}}},{key:"getIcon",value:function(t,e){var n=e||16,i=this._customIcons[t]||this._icons[t];return"function"==typeof i?i(n):""}},{key:"getIconForEntry",value:function(t,e){if(!t)return"";if(t.Icon&&"string"==typeof t.Icon&&0===t.Icon.indexOf("<svg"))return t.Icon;var n=e||16;if("folder"===t.Type)return this.getIcon("folder",n);var i=(t.Extension||"").toLowerCase();return i&&this._extensionMap[i]?this.getIcon(this._extensionMap[i],n):this.getIcon("file",n)}},{key:"getUIIcon",value:function(t,e){return this.getIcon(t,e||16)}},{key:"registerIcon",value:function(t,e){return!(!t||"function"!=typeof e)&&(this._customIcons[t]=e,!0)}},{key:"registerExtension",value:function(t,e){return!(!t||!e)&&(this._extensionMap[t.toLowerCase()]=e,!0)}},{key:"setColors",value:function(t){t&&"object"===_typeof(t)&&(Object.assign(this._colors,t),this._icons=this._buildIconSet())}},{key:"getColors",value:function(){return Object.assign({},this._colors)}},{key:"getIconNames",value:function(){for(var t=Object.keys(this._icons),e=Object.keys(this._customIcons),n=0;n<e.length;n++)t.indexOf(e[n])<0&&t.push(e[n]);return t}},{key:"getExtensionMap",value:function(){return Object.assign({},this._extensionMap)}},{key:"injectCSS",value:function(){this._cssInjected||this.pict&&this.pict.CSSMap&&(this.pict.CSSMap.addCSS("RetoldRemoteIcons",".retold-remote-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }\n.retold-remote-icon svg { display: block; }\n.retold-remote-icon-sm svg { width: 16px; height: 16px; }\n.retold-remote-icon-md svg { width: 48px; height: 48px; }\n.retold-remote-icon-lg svg { width: 64px; height: 64px; }\n.retold-remote-icon-xl svg { width: 96px; height: 96px; }\n"),this._cssInjected=!0)}},{key:"onAfterInitialize",value:function(){return this.injectCSS(),_superPropGet(e,"onAfterInitialize",this,3)([])}}])}(o);e.exports=s,e.exports.default_configuration={ProviderIdentifier:"RetoldRemote-Icons",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.DefaultColors=r},{"pict-provider":108,"pict-section-filebrowser/source/providers/Pict-Provider-FileBrowserIcons.js":112}],145:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._themes={},o._themeOrder=[],o._currentTheme="twilight",o._buildThemes(),o}return _inherits(e,t),_createClass(e,[{key:"_buildThemes",value:function(){var t=this;t._addTheme("daylight",{Name:"Daylight",Category:"Grey",Description:"Bright white, dark text",Variables:{"--retold-bg-primary":"#FFFFFF","--retold-bg-secondary":"#F0F0F0","--retold-bg-tertiary":"#E8E8E8","--retold-bg-panel":"#F5F5F5","--retold-bg-viewer":"#FAFAFA","--retold-bg-hover":"#E0E0E0","--retold-bg-selected":"#C8C8C8","--retold-bg-thumb":"#F0F0F0","--retold-text-primary":"#1A1A1A","--retold-text-secondary":"#333333","--retold-text-muted":"#666666","--retold-text-dim":"#888888","--retold-text-placeholder":"#AAAAAA","--retold-accent":"#444444","--retold-accent-hover":"#222222","--retold-border":"#D0D0D0","--retold-border-light":"#E0E0E0","--retold-danger":"#CC0000","--retold-danger-muted":"#884444","--retold-scrollbar":"#C0C0C0","--retold-scrollbar-hover":"#A0A0A0","--retold-selection-bg":"rgba(68, 68, 68, 0.2)","--retold-focus-outline":"#444444","--retold-font-family":"'Segoe UI', system-ui, -apple-system, sans-serif","--retold-font-mono":"'SF Mono', 'Fira Code', 'Consolas', monospace"},IconColors:{Primary:"#333333",Accent:"#444444",Muted:"#888888",Light:"#E8E8E8",WarmBeige:"#F0F0F0",TealTint:"#E0E0E0",Lavender:"#EBEBEB",AmberTint:"#F0EDE8",PdfFill:"#F0E0E0",PdfText:"#CC0000"}}),t._addTheme("afternoon",{Name:"Afternoon",Category:"Grey",Description:"Warm light grey, softer contrast",Variables:{"--retold-bg-primary":"#E8E4E0","--retold-bg-secondary":"#DAD6D2","--retold-bg-tertiary":"#D0CCC8","--retold-bg-panel":"#DDD9D5","--retold-bg-viewer":"#F0ECE8","--retold-bg-hover":"#CCC8C4","--retold-bg-selected":"#B8B4B0","--retold-bg-thumb":"#DAD6D2","--retold-text-primary":"#2A2A2A","--retold-text-secondary":"#404040","--retold-text-muted":"#707070","--retold-text-dim":"#909090","--retold-text-placeholder":"#B0B0B0","--retold-accent":"#555555","--retold-accent-hover":"#333333","--retold-border":"#C0BCB8","--retold-border-light":"#D0CCC8","--retold-danger":"#AA3333","--retold-danger-muted":"#886655","--retold-scrollbar":"#B8B4B0","--retold-scrollbar-hover":"#A0A09C","--retold-selection-bg":"rgba(85, 85, 85, 0.2)","--retold-focus-outline":"#555555","--retold-font-family":"Georgia, 'Times New Roman', serif","--retold-font-mono":"'Courier New', Courier, monospace"},IconColors:{Primary:"#404040",Accent:"#555555",Muted:"#909090",Light:"#D0CCC8",WarmBeige:"#DAD6D2",TealTint:"#CCC8C4",Lavender:"#D2D0CE",AmberTint:"#D8D2C8",PdfFill:"#D8C8C0",PdfText:"#AA3333"}}),t._addTheme("evening",{Name:"Evening",Category:"Grey",Description:"Medium grey, transitional",Variables:{"--retold-bg-primary":"#484848","--retold-bg-secondary":"#3C3C3C","--retold-bg-tertiary":"#424242","--retold-bg-panel":"#454545","--retold-bg-viewer":"#363636","--retold-bg-hover":"#525252","--retold-bg-selected":"#606060","--retold-bg-thumb":"#3C3C3C","--retold-text-primary":"#E0E0E0","--retold-text-secondary":"#D0D0D0","--retold-text-muted":"#A0A0A0","--retold-text-dim":"#888888","--retold-text-placeholder":"#707070","--retold-accent":"#C0C0C0","--retold-accent-hover":"#E0E0E0","--retold-border":"#585858","--retold-border-light":"#606060","--retold-danger":"#FF6666","--retold-danger-muted":"#AA6666","--retold-scrollbar":"#585858","--retold-scrollbar-hover":"#686868","--retold-selection-bg":"rgba(192, 192, 192, 0.25)","--retold-focus-outline":"#C0C0C0","--retold-font-family":"system-ui, -apple-system, sans-serif","--retold-font-mono":"'SF Mono', 'Fira Code', 'Consolas', monospace"},IconColors:{Primary:"#D0D0D0",Accent:"#C0C0C0",Muted:"#888888",Light:"#424242",WarmBeige:"#484848",TealTint:"#3E3E3E",Lavender:"#444444",AmberTint:"#4A4640",PdfFill:"#4A3C3C",PdfText:"#FF6666"}}),t._addTheme("twilight",{Name:"Twilight",Category:"Grey",Description:"Dark grey, low light (default)",Variables:{"--retold-bg-primary":"#1E1E1E","--retold-bg-secondary":"#181818","--retold-bg-tertiary":"#252525","--retold-bg-panel":"#202020","--retold-bg-viewer":"#141414","--retold-bg-hover":"#2E2E2E","--retold-bg-selected":"#404040","--retold-bg-thumb":"#181818","--retold-text-primary":"#E0E0E0","--retold-text-secondary":"#C8C8C8","--retold-text-muted":"#909090","--retold-text-dim":"#707070","--retold-text-placeholder":"#585858","--retold-accent":"#A0A0A0","--retold-accent-hover":"#C0C0C0","--retold-border":"#333333","--retold-border-light":"#404040","--retold-danger":"#FF6666","--retold-danger-muted":"#AA6666","--retold-scrollbar":"#404040","--retold-scrollbar-hover":"#505050","--retold-selection-bg":"rgba(160, 160, 160, 0.25)","--retold-focus-outline":"#A0A0A0","--retold-font-family":"system-ui, -apple-system, sans-serif","--retold-font-mono":"'SF Mono', 'Fira Code', 'Consolas', monospace"},IconColors:{Primary:"#C8C8C8",Accent:"#A0A0A0",Muted:"#707070",Light:"#252525",WarmBeige:"#2A2A2A",TealTint:"#222222",Lavender:"#282828",AmberTint:"#2E2A24",PdfFill:"#2E2224",PdfText:"#E06060"}}),t._addTheme("night",{Name:"Night",Category:"Grey",Description:"Near-black, minimal contrast",Variables:{"--retold-bg-primary":"#0A0A0A","--retold-bg-secondary":"#060606","--retold-bg-tertiary":"#0E0E0E","--retold-bg-panel":"#0C0C0C","--retold-bg-viewer":"#040404","--retold-bg-hover":"#161616","--retold-bg-selected":"#252525","--retold-bg-thumb":"#060606","--retold-text-primary":"#888888","--retold-text-secondary":"#707070","--retold-text-muted":"#555555","--retold-text-dim":"#444444","--retold-text-placeholder":"#333333","--retold-accent":"#666666","--retold-accent-hover":"#808080","--retold-border":"#1A1A1A","--retold-border-light":"#222222","--retold-danger":"#AA4444","--retold-danger-muted":"#663333","--retold-scrollbar":"#1A1A1A","--retold-scrollbar-hover":"#2A2A2A","--retold-selection-bg":"rgba(102, 102, 102, 0.2)","--retold-focus-outline":"#666666","--retold-font-family":"system-ui, -apple-system, sans-serif","--retold-font-mono":"'SF Mono', 'Fira Code', 'Consolas', monospace"},IconColors:{Primary:"#707070",Accent:"#666666",Muted:"#444444",Light:"#0E0E0E",WarmBeige:"#121212",TealTint:"#0C0C0C",Lavender:"#101010",AmberTint:"#141210",PdfFill:"#141010",PdfText:"#AA4444"}}),t._addTheme("neo-tokyo",{Name:"Neo-Tokyo",Category:"Fun",Description:"Neon pink on dark navy",Variables:{"--retold-bg-primary":"#0D0D2B","--retold-bg-secondary":"#080820","--retold-bg-tertiary":"#121235","--retold-bg-panel":"#0F0F28","--retold-bg-viewer":"#060615","--retold-bg-hover":"#1A1A42","--retold-bg-selected":"#2A1845","--retold-bg-thumb":"#080820","--retold-text-primary":"#E8E0F0","--retold-text-secondary":"#D0C8E0","--retold-text-muted":"#9088A8","--retold-text-dim":"#6860A0","--retold-text-placeholder":"#504888","--retold-accent":"#FF2D8A","--retold-accent-hover":"#FF5AA0","--retold-border":"#2A2050","--retold-border-light":"#382868","--retold-danger":"#FF4466","--retold-danger-muted":"#AA3355","--retold-scrollbar":"#2A2050","--retold-scrollbar-hover":"#3A3068","--retold-selection-bg":"rgba(255, 45, 138, 0.25)","--retold-focus-outline":"#FF2D8A","--retold-font-family":"'Courier New', monospace","--retold-font-mono":"'Courier New', monospace"},IconColors:{Primary:"#D0C8E0",Accent:"#FF2D8A",Muted:"#6860A0",Light:"#121235",WarmBeige:"#141438",TealTint:"#100E30",Lavender:"#141232",AmberTint:"#1A1228",PdfFill:"#1A1028",PdfText:"#FF4466"}}),t._addTheme("cyberpunk",{Name:"Cyberpunk",Category:"Fun",Description:"Electric green on black",Variables:{"--retold-bg-primary":"#0A0E0A","--retold-bg-secondary":"#060806","--retold-bg-tertiary":"#0E120E","--retold-bg-panel":"#0C100C","--retold-bg-viewer":"#040604","--retold-bg-hover":"#142014","--retold-bg-selected":"#1A3A1A","--retold-bg-thumb":"#060806","--retold-text-primary":"#C8FFC8","--retold-text-secondary":"#A0D8A0","--retold-text-muted":"#608860","--retold-text-dim":"#406040","--retold-text-placeholder":"#305030","--retold-accent":"#00FF41","--retold-accent-hover":"#44FF77","--retold-border":"#1A2A1A","--retold-border-light":"#224022","--retold-danger":"#FF3333","--retold-danger-muted":"#AA2222","--retold-scrollbar":"#1A2A1A","--retold-scrollbar-hover":"#2A4A2A","--retold-selection-bg":"rgba(0, 255, 65, 0.2)","--retold-focus-outline":"#00FF41","--retold-font-family":"'Lucida Console', 'Courier New', monospace","--retold-font-mono":"'Lucida Console', 'Courier New', monospace"},IconColors:{Primary:"#A0D8A0",Accent:"#00FF41",Muted:"#406040",Light:"#0E120E",WarmBeige:"#101610",TealTint:"#0C140C",Lavender:"#0E120E",AmberTint:"#141810",PdfFill:"#181010",PdfText:"#FF3333"}}),t._addTheme("hotdog",{Name:"Hotdog",Category:"Fun",Description:"Red and mustard yellow, garish",Variables:{"--retold-bg-primary":"#8B0000","--retold-bg-secondary":"#6B0000","--retold-bg-tertiary":"#7B0000","--retold-bg-panel":"#750000","--retold-bg-viewer":"#550000","--retold-bg-hover":"#AA1111","--retold-bg-selected":"#BB3300","--retold-bg-thumb":"#6B0000","--retold-text-primary":"#FFD700","--retold-text-secondary":"#FFC000","--retold-text-muted":"#CC9900","--retold-text-dim":"#AA7700","--retold-text-placeholder":"#886600","--retold-accent":"#FFD700","--retold-accent-hover":"#FFEE44","--retold-border":"#AA2222","--retold-border-light":"#BB3333","--retold-danger":"#FFFF00","--retold-danger-muted":"#CCCC00","--retold-scrollbar":"#AA2222","--retold-scrollbar-hover":"#CC3333","--retold-selection-bg":"rgba(255, 215, 0, 0.3)","--retold-focus-outline":"#FFD700","--retold-font-family":"Impact, 'Arial Black', sans-serif","--retold-font-mono":"'Courier New', monospace"},IconColors:{Primary:"#FFC000",Accent:"#FFD700",Muted:"#AA7700",Light:"#7B0000",WarmBeige:"#800000",TealTint:"#6B0000",Lavender:"#780000",AmberTint:"#7A1000",PdfFill:"#6B0000",PdfText:"#FFFF00"}}),t._addTheme("1970s-console",{Name:"1970s Console",Category:"Fun",Description:"Amber phosphor on brown-black",Variables:{"--retold-bg-primary":"#1A1000","--retold-bg-secondary":"#140C00","--retold-bg-tertiary":"#1E1400","--retold-bg-panel":"#1C1200","--retold-bg-viewer":"#100A00","--retold-bg-hover":"#2A1C00","--retold-bg-selected":"#3A2800","--retold-bg-thumb":"#140C00","--retold-text-primary":"#FFAA00","--retold-text-secondary":"#DD8800","--retold-text-muted":"#AA6600","--retold-text-dim":"#884400","--retold-text-placeholder":"#663300","--retold-accent":"#FFCC00","--retold-accent-hover":"#FFDD44","--retold-border":"#2A1800","--retold-border-light":"#3A2200","--retold-danger":"#FF4400","--retold-danger-muted":"#AA3300","--retold-scrollbar":"#2A1800","--retold-scrollbar-hover":"#3A2800","--retold-selection-bg":"rgba(255, 204, 0, 0.2)","--retold-focus-outline":"#FFCC00","--retold-font-family":"'Courier New', 'Lucida Console', monospace","--retold-font-mono":"'Courier New', 'Lucida Console', monospace"},IconColors:{Primary:"#DD8800",Accent:"#FFCC00",Muted:"#884400",Light:"#1E1400",WarmBeige:"#201800",TealTint:"#1A1000",Lavender:"#1C1200",AmberTint:"#221800",PdfFill:"#201000",PdfText:"#FF4400"}}),t._addTheme("1980s-console",{Name:"1980s Console",Category:"Fun",Description:"Green phosphor on black",Variables:{"--retold-bg-primary":"#001200","--retold-bg-secondary":"#000E00","--retold-bg-tertiary":"#001600","--retold-bg-panel":"#001400","--retold-bg-viewer":"#000A00","--retold-bg-hover":"#002200","--retold-bg-selected":"#003800","--retold-bg-thumb":"#000E00","--retold-text-primary":"#00FF00","--retold-text-secondary":"#00CC00","--retold-text-muted":"#009900","--retold-text-dim":"#006600","--retold-text-placeholder":"#004400","--retold-accent":"#00FF66","--retold-accent-hover":"#44FF88","--retold-border":"#002A00","--retold-border-light":"#003A00","--retold-danger":"#FF0000","--retold-danger-muted":"#AA0000","--retold-scrollbar":"#002A00","--retold-scrollbar-hover":"#004400","--retold-selection-bg":"rgba(0, 255, 102, 0.2)","--retold-focus-outline":"#00FF66","--retold-font-family":"'Courier New', monospace","--retold-font-mono":"'Courier New', monospace"},IconColors:{Primary:"#00CC00",Accent:"#00FF66",Muted:"#006600",Light:"#001600",WarmBeige:"#001A00",TealTint:"#001200",Lavender:"#001400",AmberTint:"#001800",PdfFill:"#140000",PdfText:"#FF0000"}}),t._addTheme("1990s-website",{Name:"1990s Web Site",Category:"Fun",Description:"Blue links on grey, beveled",Variables:{"--retold-bg-primary":"#C0C0C0","--retold-bg-secondary":"#B0B0B0","--retold-bg-tertiary":"#A8A8A8","--retold-bg-panel":"#B8B8B8","--retold-bg-viewer":"#D0D0D0","--retold-bg-hover":"#B8B8D0","--retold-bg-selected":"#000080","--retold-bg-thumb":"#B0B0B0","--retold-text-primary":"#000000","--retold-text-secondary":"#000080","--retold-text-muted":"#404040","--retold-text-dim":"#606060","--retold-text-placeholder":"#808080","--retold-accent":"#0000FF","--retold-accent-hover":"#0000CC","--retold-border":"#808080","--retold-border-light":"#A0A0A0","--retold-danger":"#FF0000","--retold-danger-muted":"#990000","--retold-scrollbar":"#808080","--retold-scrollbar-hover":"#606060","--retold-selection-bg":"rgba(0, 0, 128, 0.3)","--retold-focus-outline":"#0000FF","--retold-font-family":"'Times New Roman', Times, serif","--retold-font-mono":"'Courier New', Courier, monospace"},IconColors:{Primary:"#000080",Accent:"#0000FF",Muted:"#606060",Light:"#A8A8A8",WarmBeige:"#B0B0B0",TealTint:"#A0A0A0",Lavender:"#ABABD0",AmberTint:"#B8B0A0",PdfFill:"#C0A0A0",PdfText:"#FF0000"}}),t._addTheme("early-2000s",{Name:"Early 2000s Web",Category:"Fun",Description:"Teal and silver, Web 2.0",Variables:{"--retold-bg-primary":"#E8F4F8","--retold-bg-secondary":"#D0E8EE","--retold-bg-tertiary":"#C0DDE6","--retold-bg-panel":"#D8EEF2","--retold-bg-viewer":"#F0F8FA","--retold-bg-hover":"#B0D4E0","--retold-bg-selected":"#88C4D8","--retold-bg-thumb":"#D0E8EE","--retold-text-primary":"#1A3A4A","--retold-text-secondary":"#2A4A5A","--retold-text-muted":"#5A7A8A","--retold-text-dim":"#7A9AAA","--retold-text-placeholder":"#9ABACA","--retold-accent":"#0099CC","--retold-accent-hover":"#00AADD","--retold-border":"#A0C8D8","--retold-border-light":"#B8D8E4","--retold-danger":"#CC3300","--retold-danger-muted":"#994422","--retold-scrollbar":"#A0C8D8","--retold-scrollbar-hover":"#88B8CC","--retold-selection-bg":"rgba(0, 153, 204, 0.2)","--retold-focus-outline":"#0099CC","--retold-font-family":"Verdana, Geneva, Tahoma, sans-serif","--retold-font-mono":"'Lucida Console', Monaco, monospace"},IconColors:{Primary:"#2A4A5A",Accent:"#0099CC",Muted:"#7A9AAA",Light:"#C0DDE6",WarmBeige:"#D0E8EE",TealTint:"#B0D8E4",Lavender:"#C8DCE6",AmberTint:"#D8E0D0",PdfFill:"#E0C8C0",PdfText:"#CC3300"}}),t._addTheme("synthwave",{Name:"Synthwave",Category:"Fun",Description:"Purple and pink neon",Variables:{"--retold-bg-primary":"#1A0A2E","--retold-bg-secondary":"#140824","--retold-bg-tertiary":"#200E38","--retold-bg-panel":"#1C0C32","--retold-bg-viewer":"#100620","--retold-bg-hover":"#2A1848","--retold-bg-selected":"#3A2060","--retold-bg-thumb":"#140824","--retold-text-primary":"#E8C0F8","--retold-text-secondary":"#D0A8E8","--retold-text-muted":"#9878B8","--retold-text-dim":"#7858A8","--retold-text-placeholder":"#584088","--retold-accent":"#FF71CE","--retold-accent-hover":"#FF99DD","--retold-border":"#302050","--retold-border-light":"#402868","--retold-danger":"#FF4488","--retold-danger-muted":"#AA3366","--retold-scrollbar":"#302050","--retold-scrollbar-hover":"#402868","--retold-selection-bg":"rgba(255, 113, 206, 0.25)","--retold-focus-outline":"#FF71CE","--retold-font-family":"'Trebuchet MS', sans-serif","--retold-font-mono":"'Courier New', monospace"},IconColors:{Primary:"#D0A8E8",Accent:"#FF71CE",Muted:"#7858A8",Light:"#200E38",WarmBeige:"#221040",TealTint:"#1A0C30",Lavender:"#1E0E36",AmberTint:"#241028",PdfFill:"#241020",PdfText:"#FF4488"}}),t._addTheme("solarized-dark",{Name:"Solarized Dark",Category:"Fun",Description:"Schoonover's classic palette",Variables:{"--retold-bg-primary":"#002B36","--retold-bg-secondary":"#073642","--retold-bg-tertiary":"#003B4A","--retold-bg-panel":"#00303C","--retold-bg-viewer":"#001E28","--retold-bg-hover":"#0A4858","--retold-bg-selected":"#155868","--retold-bg-thumb":"#073642","--retold-text-primary":"#FDF6E3","--retold-text-secondary":"#EEE8D5","--retold-text-muted":"#93A1A1","--retold-text-dim":"#839496","--retold-text-placeholder":"#657B83","--retold-accent":"#268BD2","--retold-accent-hover":"#45A0E0","--retold-border":"#0A4050","--retold-border-light":"#125868","--retold-danger":"#DC322F","--retold-danger-muted":"#AA2A28","--retold-scrollbar":"#0A4050","--retold-scrollbar-hover":"#125868","--retold-selection-bg":"rgba(38, 139, 210, 0.25)","--retold-focus-outline":"#268BD2","--retold-font-family":"'Source Code Pro', 'Fira Code', monospace","--retold-font-mono":"'Source Code Pro', 'Fira Code', monospace"},IconColors:{Primary:"#EEE8D5",Accent:"#268BD2",Muted:"#839496",Light:"#003B4A",WarmBeige:"#073642",TealTint:"#004050",Lavender:"#003848",AmberTint:"#0A3A30",PdfFill:"#0A3028",PdfText:"#DC322F"}}),t._addTheme("forest",{Name:"Forest",Category:"Fun",Description:"Deep greens and earth browns",Variables:{"--retold-bg-primary":"#1A2018","--retold-bg-secondary":"#141A12","--retold-bg-tertiary":"#1E2620","--retold-bg-panel":"#1C221A","--retold-bg-viewer":"#101410","--retold-bg-hover":"#283828","--retold-bg-selected":"#344834","--retold-bg-thumb":"#141A12","--retold-text-primary":"#D0DCC8","--retold-text-secondary":"#B0C4A8","--retold-text-muted":"#809878","--retold-text-dim":"#607858","--retold-text-placeholder":"#486040","--retold-accent":"#6AAF5C","--retold-accent-hover":"#88CC78","--retold-border":"#2A3A28","--retold-border-light":"#3A4A38","--retold-danger":"#CC4422","--retold-danger-muted":"#884422","--retold-scrollbar":"#2A3A28","--retold-scrollbar-hover":"#3A4A38","--retold-selection-bg":"rgba(106, 175, 92, 0.25)","--retold-focus-outline":"#6AAF5C","--retold-font-family":"'Palatino Linotype', 'Book Antiqua', Palatino, serif","--retold-font-mono":"'Courier New', monospace"},IconColors:{Primary:"#B0C4A8",Accent:"#6AAF5C",Muted:"#607858",Light:"#1E2620",WarmBeige:"#22281E",TealTint:"#1A221A",Lavender:"#1E2420",AmberTint:"#262218",PdfFill:"#261A18",PdfText:"#CC4422"}})}},{key:"_addTheme",value:function(t,e){this._themes[t]=e,this._themeOrder.push(t)}},{key:"applyTheme",value:function(t){var e=this._themes[t];e||(e=this._themes.twilight,t="twilight"),this._currentTheme=t;for(var n=":root {\n",i=e.Variables,o=Object.keys(i),r=0;r<o.length;r++)n+="\t"+o[r]+": "+i[o[r]]+";\n";if(n+="}\n","undefined"!=typeof document){var a=document.getElementById("retold-remote-theme");a||((a=document.createElement("style")).id="retold-remote-theme",document.head.appendChild(a)),a.textContent=n}var s=this.pict.providers["RetoldRemote-Icons"];s&&e.IconColors&&s.setColors(e.IconColors);var l=this.pict.AppData.RetoldRemote;return l&&(l.Theme=t),!0}},{key:"getThemeList",value:function(){for(var t=[],e=0;e<this._themeOrder.length;e++){var n=this._themeOrder[e],i=this._themes[n];t.push({key:n,name:i.Name,category:i.Category,description:i.Description})}return t}},{key:"getCurrentTheme",value:function(){return this._currentTheme}},{key:"getTheme",value:function(t){return this._themes[t]||null}}])}(t("pict-provider"));i.default_configuration={ProviderIdentifier:"RetoldRemote-Theme",AutoInitialize:!0,AutoInitializeOrdinal:0},e.exports=i},{"pict-provider":108}],146:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._intersectionObserver=null,o}return _inherits(e,t),_createClass(e,[{key:"renderGallery",value:function(){var t=document.getElementById("RetoldRemote-Gallery-Container");if(t){var e=this.pict.AppData.RetoldRemote,n=e.GalleryItems||[],i=e.ViewMode||"list",o=e.ThumbnailSize||"medium",r=e.GalleryCursorIndex||0,a=this._buildHeaderHTML(e.FilterState?e.FilterState.MediaType:"all");if(a+=this._buildFilterPanelHTML(),a+=this._buildFilterChipsHTML(),0===n.length){a+='<div class="retold-remote-empty">';var s=this.pict.providers["RetoldRemote-Icons"];return a+='<div class="retold-remote-empty-icon"><span class="retold-remote-icon retold-remote-icon-xl">'+(s?s.getIcon("gallery-empty",96):"")+"</span></div>",a+="<div>Empty folder</div>",a+="</div>",void(t.innerHTML=a)}a+="gallery"===i?this._buildGridHTML(n,o,r):this._buildListHTML(n,r),t.innerHTML=a,this._setupLazyLoading();var l=this.pict.providers["RetoldRemote-GalleryNavigation"];l&&l.recalculateColumns()}}},{key:"_buildHeaderHTML",value:function(t){var e=this.pict.AppData.RetoldRemote,n=[{key:"all",label:"All"},{key:"images",label:"Images"},{key:"video",label:"Video"},{key:"audio",label:"Audio"},{key:"documents",label:"Docs"}],i='<div class="retold-remote-gallery-header">';i+='<div class="retold-remote-gallery-filter">';for(var o=0;o<n.length;o++){var r=n[o];i+='<button class="retold-remote-gallery-filter-btn'+(r.key===t?" active":"")+"\" onclick=\"pict.views['RetoldRemote-Gallery'].setFilter('"+r.key+"')\">"+r.label+"</button>"}i+="</div>",i+='<div class="retold-remote-gallery-sort">',i+='<select class="retold-remote-gallery-sort-select" id="RetoldRemote-Gallery-Sort" onchange="pict.views[\'RetoldRemote-Gallery\'].onSortChange(this.value)">';for(var a=[{value:"folder-first:asc",label:"Folders first"},{value:"name:asc",label:"Name A–Z"},{value:"name:desc",label:"Name Z–A"},{value:"modified:desc",label:"Newest modified"},{value:"modified:asc",label:"Oldest modified"},{value:"created:desc",label:"Newest created"},{value:"created:asc",label:"Oldest created"}],s=(e.SortField||"folder-first")+":"+(e.SortDirection||"asc"),l=0;l<a.length;l++){var c=a[l].value===s?" selected":"";i+='<option value="'+a[l].value+'"'+c+">"+a[l].label+"</option>"}i+="</select>",i+="</div>";var d=this.pict.providers["RetoldRemote-GalleryFilterSort"],p=d?d.getActiveFilterChips().length:0;i+='<button class="retold-remote-gallery-filter-btn retold-remote-gallery-filter-toggle'+(p>0?" has-filters":"")+'" onclick="pict.views[\'RetoldRemote-Gallery\'].toggleFilterPanel()">⚙ Filters',p>0&&(i+='<span class="retold-remote-gallery-filter-count">'+p+"</span>"),i+="</button>";var u=e.SearchQuery||"";return i+='<input type="text" class="retold-remote-gallery-search" id="RetoldRemote-Gallery-Search" placeholder="Search files... (/)" value="'+this._escapeHTML(u)+'" oninput="pict.views[\'RetoldRemote-Gallery\'].onSearchInput(this.value)">',i+="</div>"}},{key:"_buildFilterPanelHTML",value:function(){var t=this.pict.AppData.RetoldRemote;if(!t.FilterPanelOpen)return"";var e=this.pict.providers["RetoldRemote-GalleryFilterSort"],n=e?e.getAvailableExtensions():[],i=t.FilterState||{},o='<div class="retold-remote-filter-panel">';o+='<div class="retold-remote-filter-panel-grid">',o+='<div class="retold-remote-filter-section">',o+='<div class="retold-remote-filter-section-title">File Type</div>',o+='<div class="retold-remote-filter-ext-list">';for(var r=i.Extensions||[],a=0;a<n.length;a++){var s=n[a];o+='<label class="retold-remote-filter-ext-item">',o+='<input type="checkbox" '+(0===r.length||r.indexOf(s.ext)>=0?"checked ":"")+"onchange=\"pict.views['RetoldRemote-Gallery'].onExtensionToggle('"+s.ext+"', this.checked)\">",o+=" ."+s.ext+' <span class="retold-remote-filter-ext-count">('+s.count+")</span>",o+="</label>"}return o+="</div>",o+="</div>",o+='<div class="retold-remote-filter-section">',o+='<div class="retold-remote-filter-section-title">File Size</div>',o+='<div class="retold-remote-filter-row">',o+='<input type="number" class="retold-remote-filter-input" placeholder="Min KB" value="'+(null!==i.SizeMin&&void 0!==i.SizeMin?Math.round(i.SizeMin/1024):"")+"\" onchange=\"pict.views['RetoldRemote-Gallery'].onSizeFilterChange('min', this.value)\">",o+='<span class="retold-remote-filter-label">to</span>',o+='<input type="number" class="retold-remote-filter-input" placeholder="Max KB" value="'+(null!==i.SizeMax&&void 0!==i.SizeMax?Math.round(i.SizeMax/1024):"")+"\" onchange=\"pict.views['RetoldRemote-Gallery'].onSizeFilterChange('max', this.value)\">",o+='<span class="retold-remote-filter-label">KB</span>',o+="</div>",o+="</div>",o+='<div class="retold-remote-filter-section">',o+='<div class="retold-remote-filter-section-title">Modified Date</div>',o+='<div class="retold-remote-filter-row">',o+='<input type="date" class="retold-remote-filter-input" value="'+(i.DateModifiedAfter||"")+"\" onchange=\"pict.views['RetoldRemote-Gallery'].onDateFilterChange('DateModifiedAfter', this.value)\">",o+='<span class="retold-remote-filter-label">to</span>',o+='<input type="date" class="retold-remote-filter-input" value="'+(i.DateModifiedBefore||"")+"\" onchange=\"pict.views['RetoldRemote-Gallery'].onDateFilterChange('DateModifiedBefore', this.value)\">",o+="</div>",o+="</div>",o+='<div class="retold-remote-filter-section">',o+='<div class="retold-remote-filter-section-title">Presets</div>',o+=this._buildPresetControlsHTML(),o+="</div>",o+='<div class="retold-remote-filter-actions">',o+='<button class="retold-remote-filter-btn-sm" onclick="pict.views[\'RetoldRemote-Gallery\'].clearAllFilters()">Clear All Filters</button>',o+="</div>",o+="</div>",o+="</div>"}},{key:"_buildPresetControlsHTML",value:function(){var t=this.pict.AppData.RetoldRemote.FilterPresets||[],e='<div class="retold-remote-filter-preset-row">';if(t.length>0){e+='<select class="retold-remote-filter-preset-select" id="RetoldRemote-Filter-PresetSelect" onchange="pict.views[\'RetoldRemote-Gallery\'].loadFilterPreset(this.value)">',e+='<option value="">Load preset...</option>';for(var n=0;n<t.length;n++)e+='<option value="'+n+'">'+this._escapeHTML(t[n].Name)+"</option>";e+="</select>",e+='<button class="retold-remote-filter-btn-sm" onclick="pict.views[\'RetoldRemote-Gallery\'].deleteSelectedPreset()">✕</button>'}return e+='<input type="text" class="retold-remote-filter-preset-input" id="RetoldRemote-Filter-PresetName" placeholder="Preset name...">',e+='<button class="retold-remote-filter-btn-sm" onclick="pict.views[\'RetoldRemote-Gallery\'].saveFilterPreset()">Save</button>',e+="</div>"}},{key:"_buildFilterChipsHTML",value:function(){var t=this.pict.providers["RetoldRemote-GalleryFilterSort"];if(!t)return"";var e=t.getActiveFilterChips();if(0===e.length)return"";for(var n='<div class="retold-remote-filter-chips">',i=0;i<e.length;i++){var o=e[i];n+='<span class="retold-remote-filter-chip">'+this._escapeHTML(o.label)+" <button class=\"retold-remote-filter-chip-remove\" onclick=\"pict.views['RetoldRemote-Gallery'].removeFilterChip('"+this._escapeHTML(o.key)+"')\">&times;</button></span>"}return n+='<button class="retold-remote-filter-chip-clear" onclick="pict.views[\'RetoldRemote-Gallery\'].clearAllFilters()">Clear all</button>',n+="</div>"}},{key:"_buildGridHTML",value:function(t,e,n){for(var i='<div class="retold-remote-grid size-'+e+'">',o=this.pict.providers["RetoldRemote-Provider"],r=this.pict.providers["RetoldRemote-Icons"],a=0;a<t.length;a++){var s=t[a],l=a===n?" selected":"",c=(s.Extension||"").toLowerCase(),d=this._getCategory(c,s.Type);if(i+='<div class="retold-remote-tile'+l+'" data-index="'+a+"\" onclick=\"pict.views['RetoldRemote-Gallery'].onTileClick("+a+")\" ondblclick=\"pict.views['RetoldRemote-Gallery'].onTileDoubleClick("+a+')">',i+='<div class="retold-remote-tile-thumb">',"folder"===s.Type)i+='<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIcon("folder",48):"")+"</span></div>",i+='<span class="retold-remote-tile-badge retold-remote-tile-badge-folder">Folder</span>';else if("image"===d&&o){var p=o.getThumbnailURL(s.Path,400,300);i+=p?'<img data-src="'+p+'" alt="'+this._escapeHTML(s.Name)+'" loading="lazy">':'<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIcon("file-image",48):"")+"</span></div>",i+='<span class="retold-remote-tile-badge retold-remote-tile-badge-image">'+c+"</span>"}else if("video"===d){if(o){var u=o.getThumbnailURL(s.Path,400,300);i+=u?'<img data-src="'+u+'" alt="'+this._escapeHTML(s.Name)+'" loading="lazy">':'<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIcon("file-video",48):"")+"</span></div>"}else i+='<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIcon("file-video",48):"")+"</span></div>";i+='<span class="retold-remote-tile-badge retold-remote-tile-badge-video">Video</span>'}else"audio"===d?(i+='<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIcon("file-audio",48):"")+"</span></div>",i+='<span class="retold-remote-tile-badge retold-remote-tile-badge-audio">Audio</span>'):"document"===d?(i+='<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIconForEntry(s,48):"")+"</span></div>",i+='<span class="retold-remote-tile-badge retold-remote-tile-badge-document">'+c+"</span>"):i+='<div class="retold-remote-tile-thumb-icon"><span class="retold-remote-icon retold-remote-icon-md">'+(r?r.getIconForEntry(s,48):"")+"</span></div>";i+="</div>",i+='<div class="retold-remote-tile-label" title="'+this._escapeHTML(s.Name)+'">'+this._escapeHTML(s.Name)+"</div>","file"===s.Type&&void 0!==s.Size?i+='<div class="retold-remote-tile-meta">'+this._formatFileSize(s.Size)+"</div>":"folder"===s.Type&&(i+='<div class="retold-remote-tile-meta">Folder</div>'),i+="</div>"}return i+="</div>"}},{key:"_buildListHTML",value:function(t,e){for(var n='<div class="retold-remote-list">',i=this.pict.providers["RetoldRemote-Icons"],o=0;o<t.length;o++){var r=t[o],a=o===e?" selected":"",s="";i&&(s='<span class="retold-remote-icon retold-remote-icon-sm">'+i.getIconForEntry(r,16)+"</span>"),n+='<div class="retold-remote-list-row'+a+'" data-index="'+o+"\" onclick=\"pict.views['RetoldRemote-Gallery'].onTileClick("+o+")\" ondblclick=\"pict.views['RetoldRemote-Gallery'].onTileDoubleClick("+o+')">',n+='<div class="retold-remote-list-icon">'+s+"</div>",n+='<div class="retold-remote-list-name">'+this._escapeHTML(r.Name)+"</div>","file"===r.Type&&void 0!==r.Size?n+='<div class="retold-remote-list-size">'+this._formatFileSize(r.Size)+"</div>":n+='<div class="retold-remote-list-size"></div>',r.Modified?n+='<div class="retold-remote-list-date">'+new Date(r.Modified).toLocaleDateString()+"</div>":n+='<div class="retold-remote-list-date"></div>',n+="</div>"}return n+="</div>"}},{key:"_setupLazyLoading",value:function(){var t=this;this._intersectionObserver&&this._intersectionObserver.disconnect();var e=document.querySelectorAll(".retold-remote-tile-thumb img[data-src]");if(0!==e.length){this._intersectionObserver=new IntersectionObserver(function(e){for(var n=0;n<e.length;n++)if(e[n].isIntersecting){var i=e[n].target;i.src=i.getAttribute("data-src"),i.removeAttribute("data-src"),t._intersectionObserver.unobserve(i)}},{rootMargin:"200px"});for(var n=0;n<e.length;n++)this._intersectionObserver.observe(e[n])}}},{key:"onTileClick",value:function(t){var e=this.pict.providers["RetoldRemote-GalleryNavigation"];e&&e.moveCursor(t)}},{key:"onTileDoubleClick",value:function(t){this.pict.AppData.RetoldRemote.GalleryCursorIndex=t;var e=this.pict.providers["RetoldRemote-GalleryNavigation"];e&&e.openCurrent()}},{key:"setFilter",value:function(t){var e=this.pict.AppData.RetoldRemote;e.GalleryFilter=t,e.FilterState.MediaType=t;var n=this.pict.providers["RetoldRemote-GalleryFilterSort"];n&&n.applyFilterSort()}},{key:"onSearchInput",value:function(t){this.pict.AppData.RetoldRemote.SearchQuery=(t||"").toLowerCase();var e=this.pict.providers["RetoldRemote-GalleryFilterSort"];e&&e.applyFilterSort()}},{key:"onSortChange",value:function(t){var e=t.split(":"),n=this.pict.AppData.RetoldRemote;n.SortField=e[0],n.SortDirection=e[1]||"asc";var i=this.pict.providers["RetoldRemote-GalleryFilterSort"];i&&i.applyFilterSort(),this.pict.PictApplication&&this.pict.PictApplication.saveSettings&&this.pict.PictApplication.saveSettings()}},{key:"toggleFilterPanel",value:function(){var t=this.pict.AppData.RetoldRemote;t.FilterPanelOpen=!t.FilterPanelOpen,this.renderGallery(),this.pict.PictApplication&&this.pict.PictApplication.saveSettings&&this.pict.PictApplication.saveSettings()}},{key:"onExtensionToggle",value:function(t,e){var n=this.pict.AppData.RetoldRemote.FilterState,i=this.pict.providers["RetoldRemote-GalleryFilterSort"];if(e)n.Extensions.length>0&&n.Extensions.push(t);else if(0===n.Extensions.length&&i){var o=i.getAvailableExtensions();n.Extensions=o.map(function(t){return t.ext}).filter(function(e){return e!==t})}else n.Extensions=n.Extensions.filter(function(e){return e!==t});i&&i.applyFilterSort()}},{key:"onSizeFilterChange",value:function(t,e){var n=this.pict.AppData.RetoldRemote.FilterState,i=e&&""!==e?1024*parseInt(e,10):null;"min"===t?n.SizeMin=i:n.SizeMax=i;var o=this.pict.providers["RetoldRemote-GalleryFilterSort"];o&&o.applyFilterSort()}},{key:"onDateFilterChange",value:function(t,e){this.pict.AppData.RetoldRemote.FilterState[t]=e||null;var n=this.pict.providers["RetoldRemote-GalleryFilterSort"];n&&n.applyFilterSort()}},{key:"removeFilterChip",value:function(t){var e=this.pict.providers["RetoldRemote-GalleryFilterSort"];e&&(e.removeFilter(t),e.applyFilterSort())}},{key:"clearAllFilters",value:function(){var t=this.pict.providers["RetoldRemote-GalleryFilterSort"];t&&(t.clearAllFilters(),t.applyFilterSort())}},{key:"saveFilterPreset",value:function(){var t=document.getElementById("RetoldRemote-Filter-PresetName");if(t&&t.value.trim()){var e=this.pict.providers["RetoldRemote-GalleryFilterSort"];e&&e.savePreset(t.value.trim()),this.pict.PictApplication&&this.pict.PictApplication.saveSettings&&this.pict.PictApplication.saveSettings(),this.renderGallery()}}},{key:"loadFilterPreset",value:function(t){if(""!==t&&null!=t){var e=this.pict.providers["RetoldRemote-GalleryFilterSort"];e&&(e.loadPreset(parseInt(t,10)),e.applyFilterSort()),this.pict.PictApplication&&this.pict.PictApplication.saveSettings&&this.pict.PictApplication.saveSettings()}}},{key:"deleteSelectedPreset",value:function(){var t=document.getElementById("RetoldRemote-Filter-PresetSelect");if(t&&""!==t.value){var e=this.pict.providers["RetoldRemote-GalleryFilterSort"];e&&e.deletePreset(parseInt(t.value,10)),this.pict.PictApplication&&this.pict.PictApplication.saveSettings&&this.pict.PictApplication.saveSettings(),this.renderGallery()}}},{key:"_getCategory",value:function(t,e){if("folder"===e)return"folder";var n=this.pict.providers["RetoldRemote-GalleryFilterSort"];if(n)return n.getCategory(t);var i=(t||"").replace(/^\./,"").toLowerCase();return"png"===i||"jpg"===i||"jpeg"===i||"gif"===i||"webp"===i?"image":"mp4"===i||"webm"===i||"mov"===i?"video":"mp3"===i||"wav"===i||"ogg"===i?"audio":"pdf"===i?"document":"other"}},{key:"_formatFileSize",value:function(t){if(!t||0===t)return"0 B";var e=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(1024));return n>=e.length&&(n=e.length-1),(t/Math.pow(1024,n)).toFixed(0===n?0:1)+" "+e[n]}},{key:"_escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}}])}(t("pict-view"));i.default_configuration={ViewIdentifier:"RetoldRemote-Gallery",DefaultRenderable:"RetoldRemote-Gallery-Grid",DefaultDestinationAddress:"#RetoldRemote-Gallery-Container",AutoRender:!1,CSS:"\n\t\t.retold-remote-gallery-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tmargin-bottom: 8px;\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t.retold-remote-gallery-filter\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 4px;\n\t\t}\n\t\t.retold-remote-gallery-filter-btn\n\t\t{\n\t\t\tpadding: 3px 10px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.72rem;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.15s, border-color 0.15s, background 0.15s;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-gallery-filter-btn:hover\n\t\t{\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tborder-color: var(--retold-scrollbar-hover);\n\t\t}\n\t\t.retold-remote-gallery-filter-btn.active\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t\tborder-color: var(--retold-accent);\n\t\t\tbackground: rgba(128, 128, 128, 0.1);\n\t\t}\n\t\t.retold-remote-gallery-filter-toggle\n\t\t{\n\t\t\tposition: relative;\n\t\t}\n\t\t.retold-remote-gallery-filter-toggle.has-filters\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-gallery-filter-count\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tmin-width: 14px;\n\t\t\theight: 14px;\n\t\t\tline-height: 14px;\n\t\t\tpadding: 0 3px;\n\t\t\tborder-radius: 7px;\n\t\t\tbackground: var(--retold-accent);\n\t\t\tcolor: var(--retold-bg-tertiary);\n\t\t\tfont-size: 0.58rem;\n\t\t\tfont-weight: 700;\n\t\t\ttext-align: center;\n\t\t\tmargin-left: 4px;\n\t\t}\n\t\t/* Sort dropdown */\n\t\t.retold-remote-gallery-sort\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.retold-remote-gallery-sort-select\n\t\t{\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.72rem;\n\t\t\tcursor: pointer;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-gallery-sort-select:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-gallery-search\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmax-width: 300px;\n\t\t\tpadding: 4px 10px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-primary);\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-gallery-search:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-gallery-search::placeholder\n\t\t{\n\t\t\tcolor: var(--retold-text-placeholder);\n\t\t}\n\t\t/* Filter chips */\n\t\t.retold-remote-filter-chips\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 6px;\n\t\t\tmargin-bottom: 8px;\n\t\t\talign-items: center;\n\t\t}\n\t\t.retold-remote-filter-chip\n\t\t{\n\t\t\tdisplay: inline-flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t\tpadding: 2px 8px;\n\t\t\tborder: 1px solid var(--retold-border-light);\n\t\t\tborder-radius: 12px;\n\t\t\tbackground: rgba(128, 128, 128, 0.08);\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-size: 0.68rem;\n\t\t}\n\t\t.retold-remote-filter-chip-remove\n\t\t{\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.82rem;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0 2px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.retold-remote-filter-chip-remove:hover\n\t\t{\n\t\t\tcolor: var(--retold-danger);\n\t\t}\n\t\t.retold-remote-filter-chip-clear\n\t\t{\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tfont-size: 0.68rem;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 4px;\n\t\t}\n\t\t.retold-remote-filter-chip-clear:hover\n\t\t{\n\t\t\tcolor: var(--retold-danger);\n\t\t}\n\t\t/* Filter panel */\n\t\t.retold-remote-filter-panel\n\t\t{\n\t\t\tmargin-bottom: 12px;\n\t\t\tpadding: 12px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 6px;\n\t\t\tbackground: var(--retold-bg-panel);\n\t\t}\n\t\t.retold-remote-filter-panel-grid\n\t\t{\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: 1fr 1fr;\n\t\t\tgap: 12px 24px;\n\t\t}\n\t\t.retold-remote-filter-section\n\t\t{\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.retold-remote-filter-section-title\n\t\t{\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.retold-remote-filter-ext-list\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tgap: 2px 10px;\n\t\t}\n\t\t.retold-remote-filter-ext-item\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.retold-remote-filter-ext-item input\n\t\t{\n\t\t\taccent-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-filter-ext-count\n\t\t{\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tfont-size: 0.65rem;\n\t\t}\n\t\t.retold-remote-filter-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.retold-remote-filter-input\n\t\t{\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-size: 0.72rem;\n\t\t\twidth: 100px;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-filter-input:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-filter-label\n\t\t{\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tfont-size: 0.68rem;\n\t\t}\n\t\t.retold-remote-filter-actions\n\t\t{\n\t\t\tgrid-column: 1 / -1;\n\t\t\tdisplay: flex;\n\t\t\tgap: 8px;\n\t\t\talign-items: center;\n\t\t\tpadding-top: 8px;\n\t\t\tborder-top: 1px solid var(--retold-border);\n\t\t\tmargin-top: 8px;\n\t\t}\n\t\t.retold-remote-filter-preset-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 6px;\n\t\t\talign-items: center;\n\t\t\tflex-wrap: wrap;\n\t\t}\n\t\t.retold-remote-filter-preset-select\n\t\t{\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-size: 0.72rem;\n\t\t\tmin-width: 100px;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-filter-preset-input\n\t\t{\n\t\t\tpadding: 3px 6px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-size: 0.72rem;\n\t\t\twidth: 120px;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-filter-preset-input:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-filter-btn-sm\n\t\t{\n\t\t\tpadding: 2px 8px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.68rem;\n\t\t\tcursor: pointer;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-filter-btn-sm:hover\n\t\t{\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tborder-color: var(--retold-scrollbar-hover);\n\t\t}\n\t\t/* Grid layout */\n\t\t.retold-remote-grid\n\t\t{\n\t\t\tdisplay: grid;\n\t\t\tgap: 12px;\n\t\t}\n\t\t.retold-remote-grid.size-small\n\t\t{\n\t\t\tgrid-template-columns: repeat(auto-fill, minmax(120px, 1fr));\n\t\t}\n\t\t.retold-remote-grid.size-medium\n\t\t{\n\t\t\tgrid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n\t\t}\n\t\t.retold-remote-grid.size-large\n\t\t{\n\t\t\tgrid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n\t\t}\n\t\t/* Tile */\n\t\t.retold-remote-tile\n\t\t{\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tborder: 2px solid transparent;\n\t\t\tborder-radius: 6px;\n\t\t\tcursor: pointer;\n\t\t\toverflow: hidden;\n\t\t\ttransition: border-color 0.15s, transform 0.1s;\n\t\t}\n\t\t.retold-remote-tile:hover\n\t\t{\n\t\t\tborder-color: var(--retold-border-light);\n\t\t}\n\t\t.retold-remote-tile.selected\n\t\t{\n\t\t\tborder-color: var(--retold-accent);\n\t\t\tbox-shadow: 0 0 0 1px rgba(128, 128, 128, 0.3);\n\t\t}\n\t\t.retold-remote-tile-thumb\n\t\t{\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\tpadding-bottom: 75%; /* 4:3 aspect ratio */\n\t\t\tbackground: var(--retold-bg-thumb);\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.retold-remote-tile-thumb img\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tobject-fit: cover;\n\t\t}\n\t\t.retold-remote-tile-thumb-icon\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: var(--retold-text-placeholder);\n\t\t}\n\t\t.retold-remote-tile-badge\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 6px;\n\t\t\tright: 6px;\n\t\t\tpadding: 1px 6px;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.6rem;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t}\n\t\t.retold-remote-tile-badge-image { background: rgba(102, 194, 184, 0.8); color: #fff; }\n\t\t.retold-remote-tile-badge-video { background: rgba(180, 102, 194, 0.8); color: #fff; }\n\t\t.retold-remote-tile-badge-audio { background: rgba(194, 160, 102, 0.8); color: #fff; }\n\t\t.retold-remote-tile-badge-document { background: rgba(194, 102, 102, 0.8); color: #fff; }\n\t\t.retold-remote-tile-badge-folder { background: rgba(102, 140, 194, 0.8); color: #fff; }\n\t\t.retold-remote-tile-duration\n\t\t{\n\t\t\tposition: absolute;\n\t\t\tbottom: 6px;\n\t\t\tright: 6px;\n\t\t\tpadding: 1px 6px;\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: rgba(0, 0, 0, 0.7);\n\t\t\tfont-size: 0.65rem;\n\t\t\tcolor: var(--retold-text-primary);\n\t\t}\n\t\t.retold-remote-tile-label\n\t\t{\n\t\t\tpadding: 6px 8px 2px 8px;\n\t\t\tfont-size: 0.75rem;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.retold-remote-tile-meta\n\t\t{\n\t\t\tpadding: 0 8px 6px 8px;\n\t\t\tfont-size: 0.65rem;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t/* List mode */\n\t\t.retold-remote-list\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 2px;\n\t\t}\n\t\t.retold-remote-list-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 12px;\n\t\t\tpadding: 6px 12px;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.retold-remote-list-row:hover\n\t\t{\n\t\t\tbackground: var(--retold-bg-hover);\n\t\t}\n\t\t.retold-remote-list-row.selected\n\t\t{\n\t\t\tbackground: var(--retold-bg-selected);\n\t\t}\n\t\t.retold-remote-list-icon\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 24px;\n\t\t\ttext-align: center;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t.retold-remote-list-name\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.retold-remote-list-size\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 80px;\n\t\t\ttext-align: right;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t.retold-remote-list-date\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 140px;\n\t\t\ttext-align: right;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t/* Empty state */\n\t\t.retold-remote-empty\n\t\t{\n\t\t\ttext-align: center;\n\t\t\tpadding: 60px 20px;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t.retold-remote-empty-icon\n\t\t{\n\t\t\tfont-size: 3rem;\n\t\t\tmargin-bottom: 12px;\n\t\t}\n\t\t/* Help panel flyout */\n\t\t#RetoldRemote-Help-Panel\n\t\t{\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t}\n\t\t.retold-remote-help-backdrop\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground: rgba(0, 0, 0, 0.5);\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tjustify-content: flex-end;\n\t\t}\n\t\t.retold-remote-help-flyout\n\t\t{\n\t\t\twidth: 340px;\n\t\t\tmax-height: calc(100vh - 32px);\n\t\t\tmargin: 16px;\n\t\t\tbackground: var(--retold-bg-panel);\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 8px;\n\t\t\toverflow-y: auto;\n\t\t\tbox-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);\n\t\t\tanimation: retold-help-slide-in 0.15s ease-out;\n\t\t}\n\t\t@keyframes retold-help-slide-in\n\t\t{\n\t\t\tfrom { transform: translateX(20px); opacity: 0; }\n\t\t\tto { transform: translateX(0); opacity: 1; }\n\t\t}\n\t\t.retold-remote-help-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 14px 16px 10px 16px;\n\t\t\tborder-bottom: 1px solid var(--retold-border);\n\t\t}\n\t\t.retold-remote-help-title\n\t\t{\n\t\t\tfont-size: 0.88rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--retold-text-primary);\n\t\t}\n\t\t.retold-remote-help-close\n\t\t{\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tfont-size: 1.2rem;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0 4px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.retold-remote-help-close:hover\n\t\t{\n\t\t\tcolor: var(--retold-danger);\n\t\t}\n\t\t.retold-remote-help-section\n\t\t{\n\t\t\tpadding: 12px 16px 8px 16px;\n\t\t}\n\t\t.retold-remote-help-section + .retold-remote-help-section\n\t\t{\n\t\t\tborder-top: 1px solid var(--retold-border);\n\t\t}\n\t\t.retold-remote-help-section-title\n\t\t{\n\t\t\tfont-size: 0.65rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--retold-accent);\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.8px;\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.retold-remote-help-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 12px;\n\t\t\tpadding: 3px 0;\n\t\t}\n\t\t.retold-remote-help-key\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tmin-width: 72px;\n\t\t\tpadding: 2px 8px;\n\t\t\tborder: 1px solid var(--retold-border-light);\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: rgba(255, 255, 255, 0.04);\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-family: var(--retold-font-mono, monospace);\n\t\t\tfont-size: 0.72rem;\n\t\t\ttext-align: center;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.retold-remote-help-desc\n\t\t{\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.74rem;\n\t\t}\n\t\t.retold-remote-help-footer\n\t\t{\n\t\t\tpadding: 10px 16px;\n\t\t\tborder-top: 1px solid var(--retold-border);\n\t\t\tfont-size: 0.68rem;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\ttext-align: center;\n\t\t}\n\t\t.retold-remote-help-footer strong\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t}\n\t",Templates:[],Renderables:[]},e.exports=i},{"pict-view":125}],147:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._zoomLevel=1,o._naturalWidth=0,o._naturalHeight=0,o._resizeHandler=null,o._indicatorTimeout=null,o}return _inherits(e,t),_createClass(e,[{key:"initImage",value:function(){var t=document.getElementById("RetoldRemote-ImageViewer-Img");if(t){this._naturalWidth=t.naturalWidth,this._naturalHeight=t.naturalHeight,this._zoomLevel=1,this._applyDisplay(),this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler);var e=this,n=null;this._resizeHandler=function(){clearTimeout(n),n=setTimeout(function(){e._applyDisplay()},100)},window.addEventListener("resize",this._resizeHandler)}}},{key:"_getFitMode",value:function(){return this.pict.AppData.RetoldRemote.ImageFitMode||"auto"}},{key:"setFitMode",value:function(t){this.pict.AppData.RetoldRemote.ImageFitMode=t,this._zoomLevel=1,this._applyDisplay(),this.pict.PictApplication&&this.pict.PictApplication.saveSettings&&this.pict.PictApplication.saveSettings()}},{key:"cycleFitMode",value:function(){var t;switch(this._getFitMode()){case"fit":t="auto";break;case"auto":t="original";break;default:t="fit"}this.setFitMode(t),this._showFitModeIndicator(t)}},{key:"toggleZoom",value:function(){this._naturalWidth&&(1===this._zoomLevel?this._zoomLevel=2:this._zoomLevel=1,this._applyDisplay())}},{key:"zoomIn",value:function(){this._zoomLevel=Math.min(1.25*this._zoomLevel,8),this._applyDisplay()}},{key:"zoomOut",value:function(){this._zoomLevel=Math.max(this._zoomLevel/1.25,.25),this._applyDisplay()}},{key:"zoomReset",value:function(){this._zoomLevel=1,this._applyDisplay()}},{key:"_applyDisplay",value:function(){var t=document.getElementById("RetoldRemote-ImageViewer-Img");if(t&&this._naturalWidth){var e=t.parentElement;if(e){var n=this._getBaseSize(e),i=Math.round(n.width*this._zoomLevel),o=Math.round(n.height*this._zoomLevel);t.style.maxWidth="none",t.style.maxHeight="none",t.style.objectFit="",t.style.width=i+"px",t.style.height=o+"px",t.style.transform="",this._zoomLevel>1||i>e.clientWidth||o>e.clientHeight?t.style.cursor="zoom-out":t.style.cursor="zoom-in"}}}},{key:"_getBaseSize",value:function(t){var e=this._naturalWidth,n=this._naturalHeight,i=t.clientWidth,o=t.clientHeight;if(!i||!o)return{width:e,height:n};var r=e/n;switch(this._getFitMode()){case"fit":var a=i,s=i/r;return s>o&&(s=o,a=o*r),{width:a,height:s};case"auto":if(e<=i&&n<=o)return{width:e,height:n};var l=i,c=i/r;return c>o&&(c=o,l=o*r),{width:l,height:c};default:return{width:e,height:n}}}},{key:"_showFitModeIndicator",value:function(t){var e={fit:"Fit to Window",auto:"Original if Smaller",original:"Original Size"}[t]||t,n=document.getElementById("RetoldRemote-FitIndicator");if(!n){(n=document.createElement("div")).id="RetoldRemote-FitIndicator",n.className="retold-remote-fit-indicator";var i=document.querySelector(".retold-remote-viewer-body");i&&i.appendChild(n)}n.textContent=e,n.classList.add("visible"),this._indicatorTimeout&&clearTimeout(this._indicatorTimeout),this._indicatorTimeout=setTimeout(function(){n.classList.remove("visible")},1200)}},{key:"cleanup",value:function(){this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._indicatorTimeout&&(clearTimeout(this._indicatorTimeout),this._indicatorTimeout=null)}}])}(t("pict-view"));i.default_configuration={ViewIdentifier:"RetoldRemote-ImageViewer",DefaultRenderable:"RetoldRemote-ImageViewer",DefaultDestinationAddress:"#RetoldRemote-Viewer-Container",AutoRender:!1,CSS:"\n\t\t#RetoldRemote-ImageViewer-Img\n\t\t{\n\t\t\timage-orientation: from-image;\n\t\t\ttransition: width 0.15s ease, height 0.15s ease;\n\t\t\tdisplay: block;\n\t\t}\n\t\t.retold-remote-fit-indicator\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\tbackground: rgba(0, 0, 0, 0.7);\n\t\t\tcolor: #fff;\n\t\t\tpadding: 8px 18px;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tpointer-events: none;\n\t\t\tz-index: 20;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.3s ease;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.retold-remote-fit-indicator.visible\n\t\t{\n\t\t\topacity: 1;\n\t\t}\n\t"},e.exports=i},{"pict-view":125}],148:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._sidebarDragging=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(){_superPropGet(e,"onAfterRender",this,3)([]),this.pict.CSSMap.injectCSS(),this._setupResizeHandle();var t=this.pict.AppData.RetoldRemote;if(t&&t.SidebarCollapsed){var n=document.querySelector(".content-editor-sidebar-wrap");n&&n.classList.add("collapsed")}if(t&&t.SidebarWidth){var i=document.querySelector(".content-editor-sidebar-wrap");i&&!i.classList.contains("collapsed")&&(i.style.width=t.SidebarWidth+"px")}var o=this;window.addEventListener("hashchange",function(){o.pict.PictApplication.resolveHash()})}},{key:"toggleSidebar",value:function(){var t=document.querySelector(".content-editor-sidebar-wrap");if(t){t.classList.toggle("collapsed"),this.pict.AppData.RetoldRemote.SidebarCollapsed=t.classList.contains("collapsed"),this.pict.PictApplication.saveSettings();var e=this.pict.providers["RetoldRemote-GalleryNavigation"];e&&setTimeout(function(){return e.recalculateColumns()},250)}}},{key:"switchSidebarTab",value:function(t){if(document.querySelectorAll(".content-editor-sidebar-tab").forEach(function(e){e.classList.toggle("active",e.getAttribute("data-tab")===t)}),document.querySelectorAll(".content-editor-sidebar-pane").forEach(function(e){e.style.display=e.getAttribute("data-pane")===t?"":"none"}),"settings"===t){var e=this.pict.views["RetoldRemote-SettingsPanel"];e&&e.render()}}},{key:"_setupResizeHandle",value:function(){var t=this,e=document.querySelector(".content-editor-resize-handle"),n=document.querySelector(".content-editor-sidebar-wrap");if(e&&n){var i=0,o=0;e.addEventListener("mousedown",function(s){t._sidebarDragging=!0,i=s.clientX,o=n.offsetWidth,e.classList.add("dragging"),document.addEventListener("mousemove",r),document.addEventListener("mouseup",a),s.preventDefault()})}function r(e){if(t._sidebarDragging){var r=o+(e.clientX-i);r=Math.max(150,Math.min(r,600)),n.style.width=r+"px"}}function a(){t._sidebarDragging=!1,e.classList.remove("dragging"),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",a),t.pict.AppData.RetoldRemote.SidebarWidth=n.offsetWidth,t.pict.PictApplication.saveSettings();var i=t.pict.providers["RetoldRemote-GalleryNavigation"];i&&i.recalculateColumns()}}}])}(t("pict-view"));i.default_configuration={ViewIdentifier:"ContentEditor-Layout",DefaultRenderable:"RetoldRemote-Layout-Shell",DefaultDestinationAddress:"#ContentEditor-Application-Container",AutoRender:!1,CSS:'\n\t\t#ContentEditor-Application-Container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\tbackground: var(--retold-bg-primary);\n\t\t\tcolor: var(--retold-text-primary);\n\t\t\tfont-family: var(--retold-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);\n\t\t}\n\t\t#ContentEditor-TopBar-Container\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-body\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar */\n\t\t.content-editor-sidebar-wrap\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tposition: relative;\n\t\t\ttransition: width 0.2s ease;\n\t\t}\n\t\t.content-editor-sidebar-inner\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-sidebar-tabs\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-bottom: 1px solid var(--retold-border);\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t}\n\t\t.content-editor-sidebar-tab\n\t\t{\n\t\t\tflex: 1;\n\t\t\tpadding: 7px 0;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-color 0.15s;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.content-editor-sidebar-tab:hover\n\t\t{\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t}\n\t\t.content-editor-sidebar-tab.active\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t\tborder-bottom-color: var(--retold-accent);\n\t\t}\n\t\t.content-editor-sidebar-pane\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container\n\t\t{\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t}\n\t\t/* Collapsed state */\n\t\t.content-editor-sidebar-wrap.collapsed\n\t\t{\n\t\t\twidth: 0 !important;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-inner\n\t\t{\n\t\t\tvisibility: hidden;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-resize-handle\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Collapse toggle */\n\t\t.content-editor-sidebar-toggle\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: -20px;\n\t\t\twidth: 20px;\n\t\t\theight: 28px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-left: none;\n\t\t\tborder-radius: 0 4px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tz-index: 10;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 11px;\n\t\t\tline-height: 1;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-toggle:hover\n\t\t{\n\t\t\tcolor: var(--retold-text-primary);\n\t\t}\n\t\t/* Resize handle */\n\t\t.content-editor-resize-handle\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 5px;\n\t\t\tcursor: col-resize;\n\t\t\tbackground: transparent;\n\t\t\tborder-right: 1px solid var(--retold-border);\n\t\t\ttransition: background 0.15s;\n\t\t}\n\t\t.content-editor-resize-handle:hover,\n\t\t.content-editor-resize-handle.dragging\n\t\t{\n\t\t\tbackground: var(--retold-accent);\n\t\t\tborder-right-color: var(--retold-accent);\n\t\t}\n\t\t/* File browser overrides for sidebar */\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser\n\t\t{\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-browse-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-view-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-modified,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-modified\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-header\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row\n\t\t{\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tborder-bottom-color: var(--retold-border);\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row:hover\n\t\t{\n\t\t\tbackground: var(--retold-bg-hover);\n\t\t\tcolor: var(--retold-text-primary);\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row.selected\n\t\t{\n\t\t\tbackground: var(--retold-bg-selected);\n\t\t\tcolor: var(--retold-accent);\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-breadcrumbs\n\t\t{\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t\tborder-bottom-color: var(--retold-border);\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-fb-breadcrumb-link\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t}\n\t\t/* Main content area */\n\t\t#RetoldRemote-Content-Container\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tposition: relative;\n\t\t}\n\t\t#RetoldRemote-Gallery-Container\n\t\t{\n\t\t\tpadding: 12px;\n\t\t\tmin-height: 100%;\n\t\t}\n\t\t#RetoldRemote-Viewer-Container\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tbackground: var(--retold-bg-viewer);\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Also hide the editor container from the parent */\n\t\t#ContentEditor-Editor-Container\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t',Templates:[{Hash:"RetoldRemote-Layout-Shell",Template:'\n\t\t\t\t<div id="ContentEditor-TopBar-Container"></div>\n\t\t\t\t<div class="content-editor-body">\n\t\t\t\t\t<div class="content-editor-sidebar-wrap" style="width: 250px;">\n\t\t\t\t\t\t<div class="content-editor-sidebar-toggle" onclick="pict.views[\'ContentEditor-Layout\'].toggleSidebar()">&#9664;</div>\n\t\t\t\t\t\t<div class="content-editor-sidebar-inner">\n\t\t\t\t\t\t\t<div class="content-editor-sidebar-tabs">\n\t\t\t\t\t\t\t\t<button class="content-editor-sidebar-tab active" data-tab="files" onclick="pict.views[\'ContentEditor-Layout\'].switchSidebarTab(\'files\')">Files</button>\n\t\t\t\t\t\t\t\t<button class="content-editor-sidebar-tab" data-tab="settings" onclick="pict.views[\'ContentEditor-Layout\'].switchSidebarTab(\'settings\')">Settings</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="content-editor-sidebar-pane" data-pane="files" id="ContentEditor-Sidebar-Container"></div>\n\t\t\t\t\t\t\t<div class="content-editor-sidebar-pane" data-pane="settings" id="RetoldRemote-Settings-Container" style="display:none"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="content-editor-resize-handle"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id="RetoldRemote-Content-Container">\n\t\t\t\t\t\t<div id="RetoldRemote-Gallery-Container"></div>\n\t\t\t\t\t\t<div id="RetoldRemote-Viewer-Container"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t'}],Renderables:[{RenderableHash:"RetoldRemote-Layout-Shell",TemplateHash:"RetoldRemote-Layout-Shell",DestinationAddress:"#ContentEditor-Application-Container"}]},e.exports=i},{"pict-view":125}],149:[function(t,e,n){var i=t("pict-view"),o=t("pict-section-code"),r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"showMedia",value:function(t,e){var n=this.pict.AppData.RetoldRemote;n.ActiveMode="viewer",n.CurrentViewerFile=t,n.CurrentViewerMediaType=e;var i=document.getElementById("RetoldRemote-Gallery-Container"),o=document.getElementById("RetoldRemote-Viewer-Container");i&&(i.style.display="none"),o&&(o.style.display="block");var r=t.replace(/^.*\//,""),a=this.pict.providers["RetoldRemote-Provider"],s=a?a.getContentURL(t):"/content/"+encodeURIComponent(t),l='<div class="retold-remote-viewer">';switch(l+='<div class="retold-remote-viewer-header">',l+='<button class="retold-remote-viewer-nav-btn" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\'].closeViewer()" title="Back (Esc)">&larr; Back</button>',l+='<button class="retold-remote-viewer-nav-btn" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\'].prevFile()" title="Previous (k)">&lsaquo; Prev</button>',l+='<div class="retold-remote-viewer-title">'+this._escapeHTML(r)+"</div>",l+='<button class="retold-remote-viewer-nav-btn" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\'].nextFile()" title="Next (j)">Next &rsaquo;</button>',l+='<button class="retold-remote-viewer-nav-btn" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\']._toggleFileInfo()" title="Info (i)">&#9432;</button>',l+='<button class="retold-remote-viewer-nav-btn" onclick="pict.providers[\'RetoldRemote-GalleryNavigation\']._toggleFullscreen()" title="Fullscreen (f)">&#9634;</button>',l+="</div>",l+='<div class="retold-remote-viewer-body">',e){case"image":l+=this._buildImageHTML(s,r);break;case"video":l+=this._buildVideoHTML(s,r);break;case"audio":l+=this._buildAudioHTML(s,r);break;case"text":l+=this._buildTextHTML(s,r,t);break;case"document":l+=this._buildDocumentHTML(s,r,t);break;default:l+=this._buildFallbackHTML(s,r)}l+='<div class="retold-remote-fileinfo-overlay" id="RetoldRemote-FileInfo-Overlay">',l+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Loading...</span></div>',l+="</div>",l+="</div>",l+="</div>",o&&(o.innerHTML=l),this._loadFileInfo(t),"text"===e&&this._loadCodeViewer(s,t);var c=this.pict.views["ContentEditor-TopBar"];c&&c.updateInfo()}},{key:"_buildImageHTML",value:function(t,e){return'<img src="'+t+'" alt="'+this._escapeHTML(e)+'" style="max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in;" id="RetoldRemote-ImageViewer-Img" onload="pict.views[\'RetoldRemote-ImageViewer\'].initImage()" onclick="pict.views[\'RetoldRemote-ImageViewer\'].toggleZoom()">'}},{key:"_buildVideoHTML",value:function(t,e){return'<video controls autoplay preload="metadata" style="max-width: 100%; max-height: 100%;" id="RetoldRemote-VideoPlayer"><source src="'+t+'">Your browser does not support the video tag.</video>'}},{key:"_buildAudioHTML",value:function(t,e){var n=this.pict.providers["RetoldRemote-Icons"];return'<div style="text-align: center; padding: 40px;"><div style="margin-bottom: 24px;">'+(n?'<span class="retold-remote-icon retold-remote-icon-lg">'+n.getIcon("music-note",64)+"</span>":"&#127925;")+'</div><div style="font-size: 1.1rem; color: var(--retold-text-secondary); margin-bottom: 24px;">'+this._escapeHTML(e)+'</div><audio controls autoplay preload="metadata" id="RetoldRemote-AudioPlayer" style="width: 100%; max-width: 500px;"><source src="'+t+'">Your browser does not support the audio tag.</audio></div>'}},{key:"_buildDocumentHTML",value:function(t,e,n){if("pdf"===n.replace(/^.*\./,"").toLowerCase())return'<iframe src="'+t+'" style="width: 100%; height: 100%; border: none;"></iframe>';var i=this.pict.providers["RetoldRemote-Icons"];return'<div style="text-align: center; padding: 40px;"><div style="margin-bottom: 24px;">'+(i?'<span class="retold-remote-icon retold-remote-icon-lg">'+i.getIcon("document-large",64)+"</span>":"&#128196;")+'</div><div style="font-size: 1.1rem; color: var(--retold-text-secondary); margin-bottom: 24px;">'+this._escapeHTML(e)+'</div><a href="'+t+'" target="_blank" style="color: var(--retold-accent); font-size: 0.9rem;">Open in new tab</a></div>'}},{key:"_buildTextHTML",value:function(t,e,n){return'<div class="retold-remote-code-viewer-container" id="RetoldRemote-CodeViewer-Container"><div class="retold-remote-code-viewer-loading">Loading...</div></div>'}},{key:"_getHighlightLanguage",value:function(t){if({js:!0,mjs:!0,cjs:!0,ts:!0,tsx:!0,jsx:!0}[t])return"javascript";if("json"===t)return"json";if({html:!0,htm:!0,xml:!0,svg:!0}[t])return"html";return{css:!0,scss:!0,sass:!0,less:!0}[t]?"css":"sql"===t?"sql":"javascript"}},{key:"_loadCodeViewer",value:function(t,e){var n=this,i=e.replace(/^.*\./,"").toLowerCase();fetch(t).then(function(t){if(!t.ok)throw new Error("HTTP "+t.status);return t.text()}).then(function(t){var e=document.getElementById("RetoldRemote-CodeViewer-Container");if(e){var r=n._getHighlightLanguage(i);if(n._activeCodeJar&&(n._activeCodeJar.destroy(),n._activeCodeJar=null),"undefined"==typeof window||"function"!=typeof window.CodeJar){e.innerHTML='<div class="retold-remote-code-viewer-loading">CodeJar not loaded; showing plain text.</div>';var a=document.createElement("pre");return a.style.cssText="padding:16px 20px; margin:0; color:var(--retold-text-primary); font-family:monospace; white-space:pre; tab-size:4; overflow:auto; height:100%;",a.textContent=t,void e.appendChild(a)}e.innerHTML="";var s=document.createElement("div");s.className="pict-code-editor-wrap";var l=document.createElement("div");l.className="pict-code-line-numbers",s.appendChild(l);var c=document.createElement("div");c.className="pict-code-editor language-"+r,s.appendChild(c),e.appendChild(s);var d=o.createHighlighter(r);n._activeCodeJar=window.CodeJar(c,d,{tab:"\t",catchTab:!1,addClosing:!1}),c.style.whiteSpace="pre",c.style.overflowWrap="normal",n._activeCodeJar.updateCode(t),c.setAttribute("contenteditable","false");for(var p=t.split("\n").length,u="",h=1;h<=p;h++)u+="<span>"+h+"</span>";l.innerHTML=u}}).catch(function(t){var e=document.getElementById("RetoldRemote-CodeViewer-Container");e&&(e.innerHTML='<div class="retold-remote-code-viewer-loading">Failed to load file: '+t.message+"</div>")})}},{key:"_buildFallbackHTML",value:function(t,e){var n=this.pict.providers["RetoldRemote-Icons"];return'<div style="text-align: center; padding: 40px;"><div style="margin-bottom: 24px;">'+(n?'<span class="retold-remote-icon retold-remote-icon-lg">'+n.getIcon("document-large",64)+"</span>":"&#128196;")+'</div><div style="font-size: 1.1rem; color: var(--retold-text-secondary); margin-bottom: 24px;">'+this._escapeHTML(e)+'</div><a href="'+t+'" target="_blank" style="color: var(--retold-accent); font-size: 0.9rem;">Download / Open in new tab</a></div>'}},{key:"_loadFileInfo",value:function(t){var e=this,n=this.pict.providers["RetoldRemote-Provider"];n&&n.fetchMediaProbe(t,function(t,n){var i=document.getElementById("RetoldRemote-FileInfo-Overlay");if(i&&n){var o="";if(void 0!==n.Size&&(o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Size</span><span class="retold-remote-fileinfo-value">'+e._formatFileSize(n.Size)+"</span></div>"),n.Width&&n.Height&&(o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Dimensions</span><span class="retold-remote-fileinfo-value">'+n.Width+" x "+n.Height+"</span></div>"),n.Duration){var r=Math.floor(n.Duration/60),a=Math.floor(n.Duration%60);o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Duration</span><span class="retold-remote-fileinfo-value">'+r+":"+(a<10?"0":"")+a+"</span></div>"}n.Codec&&(o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Codec</span><span class="retold-remote-fileinfo-value">'+n.Codec+"</span></div>"),n.Format&&(o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Format</span><span class="retold-remote-fileinfo-value">'+n.Format+"</span></div>"),n.Modified&&(o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Modified</span><span class="retold-remote-fileinfo-value">'+new Date(n.Modified).toLocaleString()+"</span></div>"),n.Path&&(o+='<div class="retold-remote-fileinfo-row"><span class="retold-remote-fileinfo-label">Path</span><span class="retold-remote-fileinfo-value">'+n.Path+"</span></div>"),i.innerHTML=o}})}},{key:"_formatFileSize",value:function(t){if(!t||0===t)return"0 B";var e=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(1024));return n>=e.length&&(n=e.length-1),(t/Math.pow(1024,n)).toFixed(0===n?0:1)+" "+e[n]}},{key:"_escapeHTML",value:function(t){return t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}}])}(i);r.default_configuration={ViewIdentifier:"RetoldRemote-MediaViewer",DefaultRenderable:"RetoldRemote-MediaViewer",DefaultDestinationAddress:"#RetoldRemote-Viewer-Container",AutoRender:!1,CSS:"\n\t\t.retold-remote-viewer\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t}\n\t\t.retold-remote-viewer-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 12px;\n\t\t\tpadding: 8px 16px;\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t\tborder-bottom: 1px solid var(--retold-border);\n\t\t\tflex-shrink: 0;\n\t\t\tz-index: 5;\n\t\t}\n\t\t.retold-remote-viewer-nav-btn\n\t\t{\n\t\t\tpadding: 4px 10px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.8rem;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.15s, border-color 0.15s;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-viewer-nav-btn:hover\n\t\t{\n\t\t\tcolor: var(--retold-text-primary);\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-viewer-title\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.retold-remote-viewer-body\n\t\t{\n\t\t\tflex: 1;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\toverflow: auto;\n\t\t\tposition: relative;\n\t\t}\n\t\t/* File info overlay */\n\t\t.retold-remote-fileinfo-overlay\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 48px;\n\t\t\tright: 16px;\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 16px;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-size: 0.78rem;\n\t\t\tz-index: 10;\n\t\t\tmin-width: 200px;\n\t\t\tdisplay: none;\n\t\t}\n\t\t.retold-remote-fileinfo-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 3px 0;\n\t\t}\n\t\t.retold-remote-fileinfo-label\n\t\t{\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t.retold-remote-fileinfo-value\n\t\t{\n\t\t\tcolor: var(--retold-text-primary);\n\t\t}\n\t\t/* Code viewer container */\n\t\t.retold-remote-code-viewer-container\n\t\t{\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.retold-remote-code-viewer-loading\n\t\t{\n\t\t\tpadding: 16px 20px;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tfont-style: italic;\n\t\t\tfont-size: 0.82rem;\n\t\t}\n\t\t/* pict-section-code dark theme overrides */\n\t\t.retold-remote-code-viewer-container .pict-code-editor-wrap\n\t\t{\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\theight: 100%;\n\t\t\tfont-family: var(--retold-font-mono, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', monospace);\n\t\t\tfont-size: 0.82rem;\n\t\t\tline-height: 1.6;\n\t\t}\n\t\t.retold-remote-code-viewer-container .pict-code-line-numbers\n\t\t{\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t\tborder-right: 1px solid var(--retold-border);\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tfont-size: 0.78rem;\n\t\t\tline-height: 1.6;\n\t\t\tpadding: 10px 0;\n\t\t}\n\t\t.retold-remote-code-viewer-container .pict-code-editor\n\t\t{\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-primary);\n\t\t\tpadding: 10px 10px 10px 12px;\n\t\t\ttab-size: 4;\n\t\t\t-moz-tab-size: 4;\n\t\t\tcaret-color: var(--retold-accent);\n\t\t\tborder-radius: 0;\n\t\t}\n\t\t/* Syntax highlighting colors for dark themes */\n\t\t.retold-remote-code-viewer-container .pict-code-editor .keyword { color: #C678DD; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .string { color: #98C379; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .number { color: #D19A66; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .comment { color: #5C6370; font-style: italic; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .operator { color: #56B6C2; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .punctuation { color: #ABB2BF; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .function-name { color: #61AFEF; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .property { color: #E06C75; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .tag { color: #E06C75; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .attr-name { color: #D19A66; }\n\t\t.retold-remote-code-viewer-container .pict-code-editor .attr-value { color: #98C379; }\n\t"},e.exports=r},{"pict-section-code":158,"pict-view":125}],150:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(){_superPropGet(e,"onAfterRender",this,3)([]),this._renderSettingsContent()}},{key:"_renderSettingsContent",value:function(){var t=document.getElementById("RetoldRemote-Settings-Container");if(t){var e=this.pict.AppData.RetoldRemote,n=e.ServerCapabilities||{},i='<div class="retold-remote-settings">';i+='<div class="retold-remote-settings-section">',i+='<div class="retold-remote-settings-section-title">Appearance</div>',i+='<div class="retold-remote-settings-row">',i+='<span class="retold-remote-settings-label">Theme</span>',i+='<select class="retold-remote-settings-select" onchange="pict.views[\'RetoldRemote-SettingsPanel\'].changeTheme(this.value)">';var o=this.pict.providers["RetoldRemote-Theme"];if(o){for(var r=o.getThemeList(),a=o.getCurrentTheme(),s="",l=0;l<r.length;l++){var c=r[l];c.category!==s&&(s&&(i+="</optgroup>"),i+='<optgroup label="'+c.category+'">',s=c.category),i+='<option value="'+c.key+'"'+(c.key===a?" selected":"")+">"+c.name+"</option>"}s&&(i+="</optgroup>")}i+="</select>",i+="</div>",i+="</div>",i+='<div class="retold-remote-settings-section">',i+='<div class="retold-remote-settings-section-title">Gallery</div>',i+='<div class="retold-remote-settings-row">',i+='<span class="retold-remote-settings-label">Thumbnail size</span>',i+="<select class=\"retold-remote-settings-select\" onchange=\"pict.views['RetoldRemote-SettingsPanel'].changeSetting('ThumbnailSize', this.value)\">",i+='<option value="small"'+("small"===e.ThumbnailSize?" selected":"")+">Small</option>",i+='<option value="medium"'+("medium"===e.ThumbnailSize?" selected":"")+">Medium</option>",i+='<option value="large"'+("large"===e.ThumbnailSize?" selected":"")+">Large</option>",i+="</select>",i+="</div>",i+='<div class="retold-remote-settings-row">',i+='<span class="retold-remote-settings-label">Default view</span>',i+="<select class=\"retold-remote-settings-select\" onchange=\"pict.views['RetoldRemote-SettingsPanel'].changeSetting('ViewMode', this.value)\">",i+='<option value="gallery"'+("gallery"===e.ViewMode?" selected":"")+">Gallery</option>",i+='<option value="list"'+("list"===e.ViewMode?" selected":"")+">List</option>",i+="</select>",i+="</div>",i+='<div class="retold-remote-settings-row">',i+='<span class="retold-remote-settings-label">Show hidden files</span>',i+='<input type="checkbox" class="retold-remote-settings-checkbox"'+(e.ShowHiddenFiles?" checked":"")+" onchange=\"pict.views['RetoldRemote-SettingsPanel'].toggleHiddenFiles(this.checked)\">",i+="</div>",i+='<div class="retold-remote-settings-row">',i+='<span class="retold-remote-settings-label">Nav bar in distraction-free</span>',i+='<input type="checkbox" class="retold-remote-settings-checkbox"'+(e.DistractionFreeShowNav?" checked":"")+" onchange=\"pict.views['RetoldRemote-SettingsPanel'].toggleDistractionFreeNav(this.checked)\">",i+="</div>",i+="</div>",i+='<div class="retold-remote-settings-section">',i+='<div class="retold-remote-settings-section-title">Server Capabilities</div>',i+='<div class="retold-remote-settings-capabilities">';for(var d=[{key:"sharp",label:"Sharp (image thumbnails)"},{key:"imagemagick",label:"ImageMagick (image fallback)"},{key:"ffmpeg",label:"ffmpeg (video thumbnails)"},{key:"ffprobe",label:"ffprobe (media metadata)"}],p=0;p<d.length;p++){var u=d[p],h=n[u.key];i+='<div class="retold-remote-settings-cap-row">',i+='<span class="retold-remote-settings-cap-label">'+u.label+"</span>",i+='<span class="'+(h?"retold-remote-settings-cap-yes":"retold-remote-settings-cap-no")+'">'+(h?"Available":"Not found")+"</span>",i+="</div>"}i+='<div class="retold-remote-settings-cap-row" style="margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--retold-border);">',i+='<span class="retold-remote-settings-cap-label">Hashed filenames</span>',i+='<span class="'+(e.HashedFilenames?"retold-remote-settings-cap-yes":"retold-remote-settings-cap-no")+'">'+(e.HashedFilenames?"Enabled":"Disabled")+"</span>",i+="</div>",i+="</div>",i+="</div>",i+='<div class="retold-remote-settings-section">',i+='<div class="retold-remote-settings-section-title">Keyboard Shortcuts</div>';for(var f=[{key:"Arrow keys",desc:"Navigate gallery"},{key:"Enter",desc:"Open item"},{key:"Escape",desc:"Back / close"},{key:"j / k",desc:"Next / prev in viewer"},{key:"f",desc:"Fullscreen"},{key:"i",desc:"File info"},{key:"Space",desc:"Play / pause"},{key:"+ / -",desc:"Zoom in / out"},{key:"0",desc:"Reset zoom"},{key:"g",desc:"Toggle grid / list"},{key:"/",desc:"Focus search"}],v=0;v<f.length;v++)i+='<div class="retold-remote-settings-cap-row">',i+='<span class="retold-remote-settings-cap-label">'+f[v].desc+"</span>",i+='<span style="color: var(--retold-accent); font-family: var(--retold-font-mono, monospace);">'+f[v].key+"</span>",i+="</div>";i+="</div>",i+="</div>",t.innerHTML=i}}},{key:"changeTheme",value:function(t){var e=this.pict.providers["RetoldRemote-Theme"];e&&(e.applyTheme(t),this.pict.PictApplication.saveSettings(),this._renderSettingsContent())}},{key:"changeSetting",value:function(t,e){var n=this.pict.AppData.RetoldRemote;if(n[t]=e,this.pict.PictApplication.saveSettings(),"gallery"===n.ActiveMode){var i=this.pict.views["RetoldRemote-Gallery"];i&&i.renderGallery()}}},{key:"toggleHiddenFiles",value:function(t){var e=this;this.pict.AppData.RetoldRemote.ShowHiddenFiles=t,this.pict.PictApplication.saveSettings(),this.pict.PictApplication.syncHiddenFilesSetting(function(){e.pict.PictApplication.loadFileList()})}},{key:"toggleDistractionFreeNav",value:function(t){var e=this.pict.AppData.RetoldRemote;if(e.DistractionFreeShowNav=t,this.pict.PictApplication.saveSettings(),e._distractionFreeMode){var n=document.querySelector(".retold-remote-viewer-header");n&&(n.style.display=t?"":"none")}}}])}(t("pict-view"));i.default_configuration={ViewIdentifier:"RetoldRemote-SettingsPanel",DefaultRenderable:"RetoldRemote-SettingsPanel",DefaultDestinationAddress:"#RetoldRemote-Settings-Container",AutoRender:!1,CSS:"\n\t\t.retold-remote-settings\n\t\t{\n\t\t\tpadding: 12px;\n\t\t}\n\t\t.retold-remote-settings-section\n\t\t{\n\t\t\tmargin-bottom: 16px;\n\t\t}\n\t\t.retold-remote-settings-section-title\n\t\t{\n\t\t\tfont-size: 0.7rem;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.retold-remote-settings-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 4px 0;\n\t\t}\n\t\t.retold-remote-settings-label\n\t\t{\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t}\n\t\t.retold-remote-settings-select\n\t\t{\n\t\t\tpadding: 3px 8px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: var(--retold-bg-tertiary);\n\t\t\tcolor: var(--retold-text-secondary);\n\t\t\tfont-size: 0.75rem;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-settings-checkbox\n\t\t{\n\t\t\taccent-color: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-settings-capabilities\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tpadding: 8px;\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.72rem;\n\t\t}\n\t\t.retold-remote-settings-cap-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 2px 0;\n\t\t}\n\t\t.retold-remote-settings-cap-label\n\t\t{\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t.retold-remote-settings-cap-yes\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t}\n\t\t.retold-remote-settings-cap-no\n\t\t{\n\t\t\tcolor: var(--retold-danger-muted);\n\t\t}\n\t"},e.exports=i},{"pict-view":125}],151:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(){_superPropGet(e,"onAfterRender",this,3)([]),this.updateLocation(),this.updateInfo()}},{key:"updateLocation",value:function(){var t=document.getElementById("RetoldRemote-TopBar-Location");if(t){this.pict.AppData.RetoldRemote;var e=this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation||"";if(e){for(var n=e.split("/").filter(function(t){return t}),i='<span class="retold-remote-topbar-location-crumb" onclick="pict.PictApplication.loadFileList(\'\')">/</span>',o=0;o<n.length;o++){i+='<span class="retold-remote-topbar-sep">/</span>',i+='<span class="retold-remote-topbar-location-crumb" onclick="pict.PictApplication.loadFileList(\''+n.slice(0,o+1).join("/")+"')\">"+n[o]+"</span>"}t.innerHTML=i}else t.innerHTML='<span class="retold-remote-topbar-location-crumb" onclick="pict.PictApplication.loadFileList(\'\')">/</span>'}}},{key:"updateInfo",value:function(){var t=document.getElementById("RetoldRemote-TopBar-Info");if(t){var e=this.pict.AppData.RetoldRemote,n=e.FolderSummary;if("viewer"!==e.ActiveMode)if(n){var i=[];n.Folders>0&&i.push(n.Folders+" folders"),n.Images>0&&i.push(n.Images+" images"),n.Videos>0&&i.push(n.Videos+" videos"),n.Audio>0&&i.push(n.Audio+" audio"),n.Documents>0&&i.push(n.Documents+" docs"),n.Other>0&&i.push(n.Other+" other"),t.textContent=i.join(" · ")}else t.textContent="";else{var o=(e.GalleryItems||[])[e.GalleryCursorIndex||0];o&&(t.textContent=o.Name)}}}}])}(t("pict-view"));i.default_configuration={ViewIdentifier:"ContentEditor-TopBar",DefaultRenderable:"RetoldRemote-TopBar",DefaultDestinationAddress:"#ContentEditor-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.retold-remote-topbar\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\theight: 40px;\n\t\t\tpadding: 0 16px;\n\t\t\tbackground: var(--retold-bg-secondary);\n\t\t\tborder-bottom: 1px solid var(--retold-border);\n\t\t\tgap: 16px;\n\t\t}\n\t\t.retold-remote-topbar-brand\n\t\t{\n\t\t\tfont-size: 0.85rem;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: var(--retold-accent);\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.retold-remote-topbar-location\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.retold-remote-topbar-location-crumb\n\t\t{\n\t\t\tcolor: var(--retold-accent);\n\t\t\tcursor: pointer;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.retold-remote-topbar-location-crumb:hover\n\t\t{\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.retold-remote-topbar-sep\n\t\t{\n\t\t\tcolor: var(--retold-text-placeholder);\n\t\t\tmargin: 0 3px;\n\t\t}\n\t\t.retold-remote-topbar-info\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 0.75rem;\n\t\t\tcolor: var(--retold-text-dim);\n\t\t}\n\t\t.retold-remote-topbar-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.retold-remote-topbar-btn\n\t\t{\n\t\t\tpadding: 4px 10px;\n\t\t\tborder: 1px solid var(--retold-border);\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: transparent;\n\t\t\tcolor: var(--retold-text-muted);\n\t\t\tfont-size: 0.75rem;\n\t\t\tcursor: pointer;\n\t\t\ttransition: color 0.15s, border-color 0.15s;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.retold-remote-topbar-btn:hover\n\t\t{\n\t\t\tcolor: var(--retold-text-primary);\n\t\t\tborder-color: var(--retold-accent);\n\t\t}\n\t",Templates:[{Hash:"RetoldRemote-TopBar",Template:'\n\t\t\t\t<div class="retold-remote-topbar">\n\t\t\t\t\t<div class="retold-remote-topbar-brand">Retold Remote</div>\n\t\t\t\t\t<div class="retold-remote-topbar-location" id="RetoldRemote-TopBar-Location"></div>\n\t\t\t\t\t<div class="retold-remote-topbar-info" id="RetoldRemote-TopBar-Info"></div>\n\t\t\t\t\t<div class="retold-remote-topbar-actions">\n\t\t\t\t\t\t<button class="retold-remote-topbar-btn" onclick="pict.views[\'ContentEditor-Layout\'].toggleSidebar()" title="Toggle Sidebar">&#9776;</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t'}],Renderables:[{RenderableHash:"RetoldRemote-TopBar",TemplateHash:"RetoldRemote-TopBar",DestinationAddress:"#ContentEditor-TopBar-Container"}]},e.exports=i},{"pict-view":125}],152:[function(t,e,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],153:[function(t,e,n){arguments[4][2][0].apply(n,arguments)},{"../package.json":152,dup:2}],154:[function(t,e,n){arguments[4][51][0].apply(n,arguments)},{dup:51}],155:[function(t,e,n){arguments[4][52][0].apply(n,arguments)},{"../package.json":154,dup:52,"fable-serviceproviderbase":153}],156:[function(t,e,n){arguments[4][20][0].apply(n,arguments)},{dup:20}],157:[function(t,e,n){arguments[4][21][0].apply(n,arguments)},{dup:21}],158:[function(t,e,n){var i=t("pict-view"),o=t("./Pict-Code-Highlighter.js"),r=t("./Pict-Section-Code-DefaultConfiguration.js"),a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o.codeJar=null,o._highlightFunction=null,o._language=o.options.Language||"javascript",o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._codeJarPrototype=null,this.targetElement=!1,this._highlightFunction=o(this._language),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeJarPrototype",value:function(t){if("function"!=typeof t)return"undefined"!=typeof window&&"function"==typeof window.CodeJar?(this.log.trace("PICT-Code Found CodeJar in window.CodeJar."),void(this._codeJarPrototype=window.CodeJar)):(this.log.error("PICT-Code No CodeJar prototype found. Include codejar via script tag or call connectCodeJarPrototype(CodeJar) explicitly."),!1);this._codeJarPrototype=t}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){var t=this;if(this._codeJarPrototype||this.connectCodeJarPrototype(),!this._codeJarPrototype)return this.log.error("PICT-Code Cannot initialize editor; no CodeJar prototype available."),!1;if(this.codeJar)return this.log.error("PICT-Code editor is already initialized!"),!1;var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-Code Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._buildEditorDOM();var n=this._resolveCodeContent(),i={};this.options.Tab&&(i.tab=this.options.Tab),this.options.IndentOn&&(i.indentOn=this.options.IndentOn),this.options.MoveToNewLine&&(i.moveToNewLine=this.options.MoveToNewLine),void 0!==this.options.AddClosing&&(i.addClosing=this.options.AddClosing),void 0!==this.options.CatchTab&&(i.catchTab=this.options.CatchTab),this.customConfigureEditorOptions(i);var o=this._editorElement;this.codeJar=this._codeJarPrototype(o,this._highlightFunction,i),this._resetEditorWrapStyles(),n&&this.codeJar.updateCode(n),this.codeJar.onUpdate(function(e){t._updateLineNumbers(),t.onCodeChange(e)}),this._updateLineNumbers(),this.options.ReadOnly&&o.setAttribute("contenteditable","false")}},{key:"_buildEditorDOM",value:function(){this.targetElement.innerHTML="";var t=document.createElement("div");if(t.className="pict-code-editor-wrap",this.options.LineNumbers){var e=document.createElement("div");e.className="pict-code-line-numbers",t.appendChild(e),this._lineNumbersElement=e}var n=document.createElement("div");n.className="pict-code-editor language-"+this._language,this.options.LineNumbers||(n.className+=" pict-code-no-line-numbers"),t.appendChild(n),this.targetElement.appendChild(t),this._editorElement=n,this._wrapElement=t}},{key:"_updateLineNumbers",value:function(){if(this.options.LineNumbers&&this._lineNumbersElement&&this._editorElement){for(var t=(this._editorElement.textContent||"").split("\n").length,e="",n=1;n<=t;n++)e+="<span>".concat(n,"</span>");this._lineNumbersElement.innerHTML=e}}},{key:"_resetEditorWrapStyles",value:function(){this._editorElement&&(this._editorElement.style.whiteSpace="pre",this._editorElement.style.overflowWrap="normal")}},{key:"_resolveCodeContent",value:function(){if(this.options.CodeDataAddress){var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.CodeDataAddress);if("string"==typeof e)return e;this.log.warn("PICT-Code Address [".concat(this.options.CodeDataAddress,"] did not return a string; it was ").concat(_typeof(e),"."))}return this.options.DefaultCode||""}},{key:"customConfigureEditorOptions",value:function(t){}},{key:"onCodeChange",value:function(t){if(this.options.CodeDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.CodeDataAddress,t)}}},{key:"getCode",value:function(){return this.codeJar?this.codeJar.toString():(this.log.warn("PICT-Code getCode called before editor initialized."),"")}},{key:"setCode",value:function(t){this.codeJar?(this.codeJar.updateCode(t),this._updateLineNumbers()):this.log.warn("PICT-Code setCode called before editor initialized.")}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,this._highlightFunction=o(t),this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"setHighlightFunction",value:function(t){var e=this;if("function"==typeof t){if(this._highlightFunction=t,this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}else this.log.error("PICT-Code setHighlightFunction requires a function.")}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this._editorElement&&this._editorElement.setAttribute("contenteditable",t?"false":"true")}},{key:"destroy",value:function(){this.codeJar&&(this.codeJar.destroy(),this.codeJar=null)}},{key:"marshalToView",value:function(){if(_superPropGet(e,"marshalToView",this,3)([]),this.codeJar&&this.options.CodeDataAddress){var t=this._resolveCodeContent();"string"==typeof t&&(this.codeJar.updateCode(t),this._updateLineNumbers())}}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this.codeJar&&this.options.CodeDataAddress&&this.onCodeChange(this.codeJar.toString())}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.createHighlighter=o},{"./Pict-Code-Highlighter.js":156,"./Pict-Section-Code-DefaultConfiguration.js":157,"pict-view":155}]},{},[140])(140)});
120
+ //# sourceMappingURL=retold-remote.compatible.min.js.map