summaryrefslogtreecommitdiffstats
path: root/js/photos-public.js
blob: 666ca94194603b75f3484c2dd76b233ed21e35e4 (plain)
1
2
3
/*! For license information please see photos-public.js.LICENSE.txt */
(()=>{var e,n,r={90478:(e,t,n)=>{"use strict";var r=n(50791),a=Object.prototype.hasOwnProperty,i={align:"text-align",valign:"vertical-align",height:"height",width:"width"};function o(e){var t;if("tr"===e.tagName||"td"===e.tagName||"th"===e.tagName)for(t in i)a.call(i,t)&&void 0!==e.properties[t]&&(s(e,i[t],e.properties[t]),delete e.properties[t])}function s(e,t,n){var r=(e.properties.style||"").trim();r&&!/;\s*/.test(r)&&(r+=";"),r&&(r+=" ");var a=r+t+": "+n+";";e.properties.style=a}e.exports=function(e){return r(e,"element",o),e}},93790:e=>{"use strict";function t(e){if("string"==typeof e)return function(e){return t;function t(t){return Boolean(t&&t.type===e)}}(e);if(null==e)return a;if("object"==typeof e)return("length"in e?r:n)(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function n(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function r(e){var n=function(e){for(var n=[],r=e.length,a=-1;++a<r;)n[a]=t(e[a]);return n}(e),r=n.length;return function(){var e=-1;for(;++e<r;)if(n[e].apply(this,arguments))return!0;return!1}}function a(){return!0}e.exports=t},11150:(e,t,n)=>{"use strict";e.exports=s;var r=n(93790),a=!0,i="skip",o=!1;function s(e,t,n,a){var s;function l(e,r,c){var d,f=[];return(t&&!s(e,r,c[c.length-1]||null)||(f=u(n(e,c)))[0]!==o)&&e.children&&f[0]!==i?(d=u(function(e,t){var n,r=-1,i=a?-1:1,s=(a?e.length:r)+i;for(;s>r&&s<e.length;){if((n=l(e[s],s,t))[0]===o)return n;s="number"==typeof n[1]?n[1]:s+i}}(e.children,c.concat(e))),d[0]===o?d:f):f}"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),s=r(t),l(e,null,[])}function u(e){return null!==e&&"object"==typeof e&&"length"in e?e:"number"==typeof e?[a,e]:[e]}s.CONTINUE=a,s.SKIP=i,s.EXIT=o},50791:(e,t,n)=>{"use strict";e.exports=s;var r=n(11150),a=r.CONTINUE,i=r.SKIP,o=r.EXIT;function s(e,t,n,a){"function"==typeof t&&"function"!=typeof n&&(a=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],a=r?r.children.indexOf(e):null;return n(e,a,r)}),a)}s.CONTINUE=a,s.SKIP=i,s.EXIT=o},45994:(e,t,n)=>{"use strict";n.d(t,{IH:()=>u,_S:()=>l,ts:()=>m});var r=n(78595),a=n(25108);const i=document.getElementsByTagName("head")[0];let o=i?i.getAttribute("data-requesttoken"):null;const s=[];function u(){return o}function l(e){s.push(e)}(0,r.Ld)("csrf-token-update",(e=>{o=e.token,s.forEach((t=>{try{t(e.token)}catch(e){a.error("error updating CSRF token observer",e)}}))}));const c=(e,t)=>e?e.getAttribute(t):null,d=document.getElementsByTagName("head")[0],f=c(d,"data-user"),p=c(d,"data-user-displayname"),h="undefined"!=typeof OC&&OC.isUserAdmin();function m(){return null===f?null:{uid:f,displayName:p,isAdmin:h}}},22200:(e,t,n)=>{"use strict";var r=n(25108);Object.defineProperty(t,"__esModule",{value:!0});var a=n(74854),i=document.getElementsByTagName("head")[0],o=i?i.getAttribute("data-requesttoken"):null,s=[];a.subscribe("csrf-token-update",(function(e){o=e.token,s.forEach((function(t){try{t(e.token)}catch(e){r.error("error updating CSRF token observer",e)}}))}));var u=function(e,t){return e?e.getAttribute(t):null},l=document.getElementsByTagName("head")[0],c=u(l,"data-user"),d=u(l,"data-user-displayname"),f="undefined"!=typeof OC&&OC.isUserAdmin();t.getCurrentUser=function(){return null===c?null:{uid:c,displayName:d,isAdmin:f}},t.getRequestToken=function(){return o},t.onRequestTokenUpdate=function(e){s.push(e)}},26937:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(9669),a=n.n(r),i=n(45994),o=n(79753),s=n(25108);const u=Symbol("csrf-retry"),l=Symbol("retryDelay"),c=a().create({headers:{requesttoken:(0,i.IH)()??""}}),d=Object.assign(c,{CancelToken:a().CancelToken,isCancel:a().isCancel});var f;d.interceptors.response.use((e=>e),(f=d,async e=>{const{config:t,response:n,request:{responseURL:r}}=e,{status:a}=n;if(412===a&&"CSRF check failed"===n?.data?.message&&void 0===t[u]){s.warn(`Request to ${r} failed because of a CSRF mismatch. Fetching a new token`);const{data:{token:e}}=await f.get((0,o.generateUrl)("/csrftoken"));return s.debug(`New request token ${e} fetched`),f.defaults.headers.requesttoken=e,f({...t,headers:{...t.headers,requesttoken:e},[u]:!0})}return Promise.reject(e)})),d.interceptors.response.use((e=>e),(e=>async t=>{const{config:n,response:r,request:{responseURL:a}}=t,{status:i,headers:o}