2022-06-06 15:44:19 +02:00
/ * !
* TOAST UI ImageEditor
* @ version 3.15 . 3
* @ license MIT
* /
2023-02-13 20:30:20 +01:00
! function ( t , e ) { "object" == typeof exports && "object" == typeof module ? module . exports = e ( require ( "tui-color-picker" ) ) : "function" == typeof define && define . amd ? define ( [ "tui-color-picker" ] , e ) : "object" == typeof exports ? exports . tui = e ( require ( "tui-color-picker" ) ) : ( t . tui = t . tui || { } , t . tui . ImageEditor = e ( t . tui . colorPicker ) ) } ( self , ( function ( t ) { return function ( ) { var e = { 2777 : function ( t , e , i ) {
2022-06-06 15:44:19 +02:00
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
2023-02-13 20:30:20 +01:00
var n , r , o , a , s , l , c , u , h , f , g , d , v , p , m , y , b , x , C , I , _ , M , S = S || { version : "4.6.0" } ; if ( e . fabric = S , "undefined" != typeof document && "undefined" != typeof window ) document instanceof ( "undefined" != typeof HTMLDocument ? HTMLDocument : Document ) ? S . document = document : S . document = document . implementation . createHTMLDocument ( "" ) , S . window = window ; else { var w = new ( i ( 4960 ) . JSDOM ) ( decodeURIComponent ( "%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E" ) , { features : { FetchExternalResources : [ "img" ] } , resources : "usable" } ) . window ; S . document = w . document , S . jsdomImplForWrapper = i ( 6759 ) . implForWrapper , S . nodeCanvas = i ( 6272 ) . Canvas , S . window = w , DOMParser = S . window . DOMParser } function k ( t , e ) { var i = t . canvas , n = e . targetCanvas , r = n . getContext ( "2d" ) ; r . translate ( 0 , n . height ) , r . scale ( 1 , - 1 ) ; var o = i . height - n . height ; r . drawImage ( i , 0 , o , n . width , n . height , 0 , 0 , n . width , n . height ) } function T ( t , e ) { var i = e . targetCanvas . getContext ( "2d" ) , n = e . destinationWidth , r = e . destinationHeight , o = n * r * 4 , a = new Uint8Array ( this . imageBuffer , 0 , o ) , s = new Uint8ClampedArray ( this . imageBuffer , 0 , o ) ; t . readPixels ( 0 , 0 , n , r , t . RGBA , t . UNSIGNED _BYTE , a ) ; var l = new ImageData ( s , n , r ) ; i . putImageData ( l , 0 , 0 ) } S . isTouchSupported = "ontouchstart" in S . window || "ontouchstart" in S . document || S . window && S . window . navigator && S . window . navigator . maxTouchPoints > 0 , S . isLikelyNode = "undefined" != typeof Buffer && "undefined" == typeof window , S . SHARED _ATTRIBUTES = [ "display" , "transform" , "fill" , "fill-opacity" , "fill-rule" , "opacity" , "stroke" , "stroke-dasharray" , "stroke-linecap" , "stroke-dashoffset" , "stroke-linejoin" , "stroke-miterlimit" , "stroke-opacity" , "stroke-width" , "id" , "paint-order" , "vector-effect" , "instantiated_by_use" , "clip-path" ] , S . DPI = 96 , S . reNum = "(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)" , S . commaWsp = "(?:\\s+,?\\s*|,\\s*)" , S . rePathCommand = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi , S . reNonWord = /[ \n\.,;!\?\-]/ , S . fontPaths = { } , S . iMatrix = [ 1 , 0 , 0 , 1 , 0 , 0 ] , S . svgNS = "http://www.w3.org/2000/svg" , S . perfLimitSizeTotal = 2097152 , S . maxCacheSideLimit = 4096 , S . minCacheSideLimit = 256 , S . charWidthsCache = { } , S . textureSize = 2048 , S . disableStyleCopyPaste = ! 1 , S . enableGLFiltering = ! 0 , S . devicePixelRatio = S . window . devicePixelRatio || S . window . webkitDevicePixelRatio || S . window . mozDevicePixelRatio || 1 , S . browserShadowBlurConstant = 1 , S . arcToSegmentsCache = { } , S . boundsOfCurveCache = { } , S . cachesBoundsOfCurve = ! 0 , S . forceGLPutImageData = ! 1 , S . initFilterBackend = function ( ) { return S . enableGLFiltering && S . isWebglSupported && S . isWebglSupported ( S . textureSize ) ? new S . WebglFilterBackend ( { tileSize : S . textureSize } ) : S . Canvas2dFilterBackend ? new S . Canvas2dFilterBackend : void 0 } , "undefined" != typeof document && "undefined" != typeof window && ( window . fabric = S ) , function ( ) { function t ( t , e ) { if ( this . _ _eventListeners [ t ] ) { var i = this . _ _eventListeners [ t ] ; e ? i [ i . indexOf ( e ) ] = ! 1 : S . util . array . fill ( i , ! 1 ) } } function e ( t , e ) { var i = function ( ) { e . apply ( this , arguments ) , this . off ( t , i ) } . bind ( this ) ; this . on ( t , i ) } S . Observable = { fire : function ( t , e ) { if ( ! this . _ _eventListeners ) return this ; var i = this . _ _eventListeners [ t ] ; if ( ! i ) return this ; for ( var n = 0 , r = i . length ; n < r ; n ++ ) i [ n ] && i [ n ] . call ( this , e || { } ) ; return this . _ _eventListeners [ t ] = i . filter ( ( function ( t ) { return ! 1 !== t } ) ) , this } , on : function ( t , e ) { if ( this . _ _eventListeners || ( this . _ _eventListeners = { } ) , 1 === arguments . length ) for ( var i in t ) this . on ( i , t [ i ] ) ; else this . _ _eventListeners [ t ] || ( this . _ _eventListeners [ t ] = [ ] ) , this . _ _eventListeners [ t ] . push ( e ) ; return this } , once : function ( t , i ) { if ( 1 === arguments . length ) for ( var n in t ) e . call ( this , n , t [ n ] ) ; else e . call ( this , t , i ) ; return this } , off : function ( e , i ) { if ( ! this . _ _eventListeners ) return this ; if ( 0 === arguments . length ) for ( e in this . _ _eventListeners ) t . call ( this , e ) ; else if ( 1 === arguments . length && "object" == typeof arguments [ 0 ] ) for ( var n in e ) t . call ( this , n , e [ n ] ) ; else t . call ( this , e , i ) ; return this } } } ( ) , S . Collection = { _objects : [ ] , add : function ( ) { if ( this . _objects . push . apply ( this . _objects , arguments ) , this . _onObjectAdded ) for ( var t = 0 , e = arguments . length ; t < e ; t ++ ) this . _onObjectAdded ( arguments [ t ] ) ; return this . renderOnAddRemove && this . requestRenderAll ( ) , this } , insertAt : function ( t , e , i ) { var n = this . _objects ; return i ? n [ e ] = t : n . splice ( e , 0 , t ) , this . _onObjectAdded && this . _onObjectAdded ( t ) , this . renderOnAdd
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */ , "document" in self && ( ( ! ( "classList" in document . createElement ( "_" ) ) || document . createElementNS && ! ( "classList" in document . createElementNS ( "http://www.w3.org/2000/svg" , "g" ) ) ) && function ( t ) { if ( "Element" in t ) { var i = "classList" , n = t . Element . prototype , r = Object , a = e ( ) ( String . prototype ) || function ( ) { return this . replace ( /^\s+|\s+$/g , "" ) } , l = o ( ) ( Array . prototype ) || function ( t ) { for ( var e = 0 , i = this . length ; e < i ; e ++ ) if ( e in this && this [ e ] === t ) return e ; return - 1 } , u = function ( t , e ) { this . name = t , this . code = DOMException [ t ] , this . message = e } , h = function ( t , e ) { if ( "" === e ) throw new u ( "SYNTAX_ERR" , "The token must not be empty." ) ; if ( /\s/ . test ( e ) ) throw new u ( "INVALID_CHARACTER_ERR" , "The token must not contain space characters." ) ; return l . call ( t , e ) } , f = function ( t ) { for ( var e = a . call ( t . getAttribute ( "class" ) || "" ) , i = e ? e . split ( /\s+/ ) : [ ] , n = 0 , r = i . length ; n < r ; n ++ ) this . push ( i [ n ] ) ; this . _updateClassName = function ( ) { t . setAttribute ( "class" , this . toString ( ) ) } } , g = f . prototype = [ ] , d = function ( ) { return new f ( this ) } ; if ( u . prototype = Error . prototype , g . item = function ( t ) { return this [ t ] || null } , g . contains = function ( t ) { return ~ h ( this , t + "" ) } , g . add = function ( ) { var t , e = arguments , i = 0 , n = e . length , r = ! 1 ; do { t = e [ i ] + "" , ~ h ( this , t ) || ( this . push ( t ) , r = ! 0 ) } while ( ++ i < n ) ; r && this . _updateClassName ( ) } , g . remove = function ( ) { var t , e , i = arguments , n = 0 , r = i . length , o = ! 1 ; do { for ( t = i [ n ] + "" , e = h ( this , t ) ; ~ e ; ) { var a ; s ( ) ( a = this ) . call ( a , e , 1 ) , o = ! 0 , e = h ( this , t ) } } while ( ++ n < r ) ; o && this . _updateClassName ( ) } , g . toggle = function ( t , e ) { var i = this . contains ( t ) , n = i ? ! 0 !== e && "remove" : ! 1 !== e && "add" ; return n && this [ n ] ( t ) , ! 0 === e || ! 1 === e ? e : ! i } , g . replace = function ( t , e ) { var i = h ( t + "" ) ; ~ i && ( s ( ) ( this ) . call ( this , i , 1 , e ) , this . _updateClassName ( ) ) } , g . toString = function ( ) { return this . join ( " " ) } , c ( ) ) { var v = { get : d , enumerable : ! 0 , configurable : ! 0 } ; try { c ( ) ( n , i , v ) } catch ( t ) { void 0 !== t . number && - 2146823252 !== t . number || ( v . enumerable = ! 1 , c ( ) ( n , i , v ) ) } } else r . prototype . _ _defineGetter _ _ && n . _ _defineGetter _ _ ( i , d ) } } ( self ) , function ( ) { var t = document . createElement ( "_" ) ; if ( t . classList . add ( "c1" , "c2" ) , ! t . classList . contains ( "c2" ) ) { var e = function ( t ) { var e = DOMTokenList . prototype [ t ] ; DOMTokenList . prototype [ t ] = function ( t ) { var i , n = arguments . length ; for ( i = 0 ; i < n ; i ++ ) t = arguments [ i ] , e . call ( this , t ) } } ; e ( "add" ) , e ( "remove" ) } if ( t . classList . toggle ( "c3" , ! 1 ) , t . classList . contains ( "c3" ) ) { var i = DOMTokenList . prototype . toggle ; DOMTokenList . prototype . toggle = function ( t , e ) { return 1 in arguments && ! this . contains ( t ) == ! e ? e : i . call ( this , t ) } } "replace" in document . createElement ( "_" ) . classList || ( DOMTokenList . prototype . replace = function ( t , e ) { var i = this . toString ( ) . split ( " " ) , n = o ( ) ( i ) . call ( i , t + "" ) ; ~ n && ( i = h ( ) ( i ) . call ( i , n ) , this . remove . apply ( this , i ) , this . add ( e ) , this . add . apply ( this , h ( ) ( i ) . call ( i , 1 ) ) ) } ) , t = null } ( ) )
2022-06-06 15:44:19 +02:00
/ * !
* @ copyright Copyright ( c ) 2017 IcoMoon . io
* @ license Licensed under MIT license
* See https : //github.com/Keyamoon/svgxuse
* @ version 1.2 . 6
2023-02-13 20:30:20 +01:00
* /,function(){if("undefined"!=typeof window&&window.addEventListener){var t,e,i,n=g()(null),r=function(){clearTimeout(e),e=v()(t,100)},o=function(){},a=function(t){function e(t){var e;return void 0!==t.protocol?e=t:(e=document.createElement("a")).href=t,e.protocol.replace(/ : /g,"")+e.host}var i,n,r;return window.XMLHttpRequest&&(i=new XMLHttpRequest,n=e(location),r=e(t),i=void 0===i.withCredentials&&""!==r&&r!==n?XDomainRequest||void 0:XMLHttpRequest),i},s="http:/ / www . w3 . org / 1999 / xlink ";t=function(){var t,e,i,l,c,u,h,f,g,d,p=0;function m(){var t;0===(p-=1)&&(o(),window.addEventListener(" resize ",r,!1),window.addEventListener(" orientationchange ",r,!1),window.MutationObserver?((t=new MutationObserver(r)).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),o=function(){try{t.disconnect(),window.removeEventListener(" resize ",r,!1),window.removeEventListener(" orientationchange ",r,!1)}catch(t){}}):(document.documentElement.addEventListener(" DOMSubtreeModified ",r,!1),o=function(){document.documentElement.removeEventListener(" DOMSubtreeModified ",r,!1),window.removeEventListener(" resize ",r,!1),window.removeEventListener(" orientationchange ",r,!1)}))}function y(t){return function(){!0!==n[t.base]&&(t.useEl.setAttributeNS(s," xlink : href "," # "+t.hash),t.useEl.hasAttribute(" href ")&&t.useEl.setAttribute(" href "," # "+t.hash))}}function b(t){return function(){var e,i=document.body,n=document.createElement(" x ");t.onload=null,n.innerHTML=t.responseText,(e=n.getElementsByTagName(" svg ")[0])&&(e.setAttribute(" aria - hidden "," true "),e.style.position=" absolute ",e.style.width=0,e.style.height=0,e.style.overflow=" hidden ",i.insertBefore(e,i.firstChild)),m()}}function x(t){return function(){t.onerror=null,t.ontimeout=null,m()}}for(o(),g=document.getElementsByTagName(" use "),c=0;c<g.length;c+=1){try{e=g[c].getBoundingClientRect()}catch(t){e=!1}t=(f=(l=g[c].getAttribute(" href ")||g[c].getAttributeNS(s," href ")||g[c].getAttribute(" xlink : href "))&&l.split?l.split(" # "):[" "," "])[0],i=f[1],u=e&&0===e.left&&0===e.right&&0===e.top&&0===e.bottom,e&&0===e.width&&0===e.height&&!u?(g[c].hasAttribute(" href ")&&g[c].setAttributeNS(s," xlink : href ",l),t.length&&(!0!==(d=n[t])&&v()(y({useEl:g[c],base:t,hash:i}),0),void 0===d&&void 0!==(h=a(t))&&(d=new h,n[t]=d,d.onload=b(d),d.onerror=x(d),d.ontimeout=x(d),d.open(" GET ",t),d.send(),p+=1))):u?t.length&&n[t]&&v()(y({useEl:g[c],base:t,hash:i}),0):void 0===n[t]?n[t]=!0:n[t].onload&&(n[t].abort(),delete n[t].onload,n[t]=!0)}g=" ",p+=1,m()},i=function(){window.removeEventListener(" load ",i,!1),e=v()(t,0)}," complete "!==document.readyState?window.addEventListener(" load ",i,!1):i()}}();var p=n(1845);function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var y=n(184),b=n(662),x=n(7172);var C=n(711);function I(t,e){var i;if(t){if(" string "==typeof t)return m(t,e);var n=C(i=Object.prototype.toString.call(t)).call(i,8,-1);return" Object "===n&&t.constructor&&(n=t.constructor.name)," Map "===n||" Set "===n?x(t):" Arguments "===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function _(t){return function(t){if(p(t))return m(t)}(t)||function(t){if(void 0!==y&&null!=b(t)||null!=t[" @ @ iterator "])return x(t)}(t)||I(t)||function(){throw new TypeError(" Invalid attempt to spread non - iterable instance . \ nIn order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ")}()}var M=n(7077);function S(t,e,i){return e in t?M(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function w(t,e){if(!(t instanceof e))throw new TypeError(" Cannot call a class as a function ")}function k(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0," value " in n && ( n . writable = ! 0 ) , M ( t , n . key , n ) } } function T ( t , e , i ) { return e && k ( t . prototype , e ) , i && k ( t , i ) , t } var D = n ( 4426 ) , A = n . n ( D ) , j = n ( 9406 ) , O = n . n ( j ) , E = n ( 8189 ) , L = n . n ( E ) , N = n ( 3972 ) , P = n . n ( N ) , z = n ( 2777 ) , B = n ( 961 ) , R = n . n ( B ) , F = n ( 5695 ) , Y = n . n ( F ) , W = n ( 8592 ) , H = n . n ( W ) , U = n ( 9052 ) , G = n . n ( U ) , X = n ( 2560 ) , Z = n . n ( X ) , V = n ( 2461 ) , J = n . n ( V ) ; function Q ( t , e ) { return function ( t ) { if ( p ( t ) ) return t } ( t ) || function ( t , e ) { var i = null ==